From 8721a51b83e9263c55fd36dc33876f2bac61d4ea Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Wed, 6 Sep 2023 03:13:16 +0100 Subject: [PATCH] fix(logs): log retention custom resource timed out during deploy (#26995) We use a custom resource to set the log retention for log groups created by the Lambda service. This custom resource handler code has a built-in retry mechanism to avoid throttling when executing many LogRetention CRs. Users can customize the number of possible retries, potentially retrying for a long time. This can cause the situation that further retries should be attempted, but the Lambda Function timeout is exceeded. The change sets the lambda execution timeout to its maximum value to allow for up to 15 minutes of retries. If the retry budget is exhausted, the handler will throw an error and exit early. Closes #24485 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../AppSyncJsResolverTestStack.assets.json | 12 +- .../AppSyncJsResolverTestStack.template.json | 3 +- ...efaultTestDeployAssert57AD8D20.assets.json | 12 +- ...aultTestDeployAssert57AD8D20.template.json | 6 +- .../index.js | 187 -- .../index.d.ts | 0 .../index.js | 192 ++ .../index.ts | 12 +- .../index.js | 1383 +++++----- .../integ.js-resolver.js.snapshot/cdk.out | 2 +- .../integ.js-resolver.js.snapshot/integ.json | 2 +- .../manifest.json | 6 +- .../integ.js-resolver.js.snapshot/tree.json | 14 +- .../AppSyncIntegLogRetention.assets.json | 12 +- .../AppSyncIntegLogRetention.template.json | 3 +- ...efaultTestDeployAssert4E6713E1.assets.json | 12 +- ...aultTestDeployAssert4E6713E1.template.json | 4 +- .../index.js | 183 -- .../index.ts | 214 -- .../index.d.ts | 0 .../index.js | 192 ++ .../index.ts | 12 +- .../index.js | 1383 +++++----- .../integ.log-retention.js.snapshot/cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 6 +- .../integ.log-retention.js.snapshot/tree.json | 12 +- .../ChatbotLogRetentionInteg.assets.json | 12 +- .../ChatbotLogRetentionInteg.template.json | 3 +- .../index.js | 183 -- .../index.d.ts | 0 .../index.js | 192 ++ .../index.ts | 12 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 4 +- .../tree.json | 4 +- .../integ.core-deps.js.snapshot/manifest.json | 2 +- .../replace-depends-on-test.assets.json | 4 +- .../replace-depends-on-test.template.json | 1 + .../integ.core-deps.js.snapshot/tree.json | 10 +- ...efaultTestDeployAssert6F2623C9.assets.json | 4 +- ...aultTestDeployAssert6F2623C9.template.json | 2 +- .../integ.cognito.js.snapshot/manifest.json | 2 +- ...efaultTestDeployAssert2476ECB6.assets.json | 4 +- ...aultTestDeployAssert2476ECB6.template.json | 2 +- .../integ.alb.oidc.js.snapshot/manifest.json | 2 +- ...g-elasticsearch-custom-kms-key.assets.json | 4 +- ...elasticsearch-custom-kms-key.template.json | 4 +- .../manifest.json | 14 +- ...lasticsearch-unsignedbasicauth.assets.json | 4 +- ...sticsearch-unsignedbasicauth.template.json | 2 +- .../manifest.json | 8 +- ...efaultTestDeployAssert353EE07A.assets.json | 4 +- ...aultTestDeployAssert353EE07A.template.json | 20 +- .../log-group-events.assets.json | 4 +- .../log-group-events.template.json | 6 +- .../integ.log-group.js.snapshot/manifest.json | 34 +- .../integ.log-group.js.snapshot/tree.json | 30 +- .../aws-cdk-lambda-log-retention.assets.json | 4 +- ...aws-cdk-lambda-log-retention.template.json | 1 + .../manifest.json | 2 +- .../integ.log-retention.js.snapshot/tree.json | 6 +- ...efaultTestDeployAssert7BC530B7.assets.json | 4 +- ...aultTestDeployAssert7BC530B7.template.json | 4 +- .../lambda-logssubscription-integ.assets.json | 4 +- ...ambda-logssubscription-integ.template.json | 2 +- .../integ.lambda.js.snapshot/manifest.json | 10 +- ...efaultTestDeployAssert6D1A1A1C.assets.json | 2 +- ...k-log-retention-integ-retries0.assets.json | 6 +- ...log-retention-integ-retries0.template.json | 1 + ...k-log-retention-integ-retries1.assets.json | 6 +- ...log-retention-integ-retries1.template.json | 1 + ...k-log-retention-integ-retries2.assets.json | 6 +- ...log-retention-integ-retries2.template.json | 1 + .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 2409 ++--------------- .../tree.json | 10 +- ...efaultTestDeployAssert6ACC5A74.assets.json | 2 +- .../index.js | 187 -- .../index.d.ts | 0 .../index.js | 192 ++ .../index.ts | 27 +- .../aws-cdk-log-retention-integ.assets.json | 12 +- .../aws-cdk-log-retention-integ.template.json | 3 +- .../integ.log-retention.js.snapshot/cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 13 +- .../integ.log-retention.js.snapshot/tree.json | 6 +- .../test/aws-logs/test/integ.log-retention.ts | 2 +- ...nteg-opensearch-custom-kms-key.assets.json | 4 +- ...eg-opensearch-custom-kms-key.template.json | 2 +- .../manifest.json | 8 +- .../cdk-integ-opensearch.assets.json | 4 +- .../cdk-integ-opensearch.template.json | 8 +- .../manifest.json | 26 +- ...g-opensearch-unsignedbasicauth.assets.json | 4 +- ...opensearch-unsignedbasicauth.template.json | 2 +- .../manifest.json | 8 +- .../aws-cdk-rds-instance.assets.json | 4 +- .../aws-cdk-rds-instance.template.json | 1 + .../manifest.json | 2 +- .../integ.instance.lit.js.snapshot/tree.json | 4 +- ...-s3-bucket-auto-delete-objects.assets.json | 4 +- ...3-bucket-auto-delete-objects.template.json | 2 +- .../manifest.json | 8 +- .../aws-cdk-customresources-vpc.assets.json | 4 +- .../aws-cdk-customresources-vpc.template.json | 2 +- .../manifest.json | 8 +- .../aws-cdk-sdk-js-v3.assets.json | 4 +- .../aws-cdk-sdk-js-v3.template.json | 10 +- .../aws-cdk-sdk-js.assets.json | 4 +- .../aws-cdk-sdk-js.template.json | 10 +- .../manifest.json | 64 +- ...efaultTestDeployAssert6A1BBA9D.assets.json | 2 +- .../index.js | 187 -- .../index.d.ts | 0 .../index.js | 192 ++ .../index.ts | 229 ++ .../aws-cdk-neptune-integ.assets.json | 12 +- .../aws-cdk-neptune-integ.template.json | 3 +- .../test/integ.cluster.js.snapshot/cdk.out | 2 +- .../test/integ.cluster.js.snapshot/integ.json | 2 +- .../integ.cluster.js.snapshot/manifest.json | 9 +- .../test/integ.cluster.js.snapshot/tree.json | 6 +- .../aws-cdk-lib/aws-logs/lib/log-retention.ts | 1 + .../aws-logs/test/log-retention.test.ts | 16 + 128 files changed, 3056 insertions(+), 5182 deletions(-) delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js rename packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/{asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9 => asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0}/index.d.ts (100%) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js rename packages/{@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9 => @aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0}/index.ts (92%) rename packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/{asset.18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.bundle => asset.c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.bundle}/index.js (98%) delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.js delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.ts rename packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/{asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e => asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0}/index.d.ts (100%) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js rename packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/{integ.js-resolver.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9 => integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0}/index.ts (92%) rename packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/{asset.18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.bundle => asset.c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.bundle}/index.js (98%) delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.js rename packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/{asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e => asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0}/index.d.ts (100%) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js rename packages/@aws-cdk-testing/framework-integ/test/{aws-logs/test/integ.log-retention.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9 => aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0}/index.ts (92%) delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js rename packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/{asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9 => asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0}/index.d.ts (100%) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js rename packages/@aws-cdk-testing/framework-integ/test/{aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e => aws-logs/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0}/index.ts (86%) delete mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js rename packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/{asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9 => asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0}/index.d.ts (100%) create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/AppSyncJsResolverTestStack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/AppSyncJsResolverTestStack.assets.json index 3bc3c1cb8b1b7..21f6ae852b395 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/AppSyncJsResolverTestStack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/AppSyncJsResolverTestStack.assets.json @@ -1,15 +1,15 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { - "4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9": { + "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0": { "source": { - "path": "asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9", + "path": "asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9.zip", + "objectKey": "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -53,7 +53,7 @@ } } }, - "39bbb561d1400a68adab4e3b7ca0a4b5af2936645d1bd8ce29d72a4e7985c830": { + "0351d32f030d2f7023c76f5a073f44cdcf81c0ddc63dae64a49d9d33269539ee": { "source": { "path": "AppSyncJsResolverTestStack.template.json", "packaging": "file" @@ -61,7 +61,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "39bbb561d1400a68adab4e3b7ca0a4b5af2936645d1bd8ce29d72a4e7985c830.json", + "objectKey": "0351d32f030d2f7023c76f5a073f44cdcf81c0ddc63dae64a49d9d33269539ee.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-appsync/test/integ.js-resolver.js.snapshot/AppSyncJsResolverTestStack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/AppSyncJsResolverTestStack.template.json index 6e15dd028ecf6..8a72c71731269 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/AppSyncJsResolverTestStack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/AppSyncJsResolverTestStack.template.json @@ -272,11 +272,12 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9.zip" + "S3Key": "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0.zip" }, "Role": { "Fn::GetAtt": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/JsResolverIntegTestDefaultTestDeployAssert57AD8D20.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/JsResolverIntegTestDefaultTestDeployAssert57AD8D20.assets.json index 62c9865f02042..e306b895fe192 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/JsResolverIntegTestDefaultTestDeployAssert57AD8D20.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/JsResolverIntegTestDefaultTestDeployAssert57AD8D20.assets.json @@ -1,20 +1,20 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { - "18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f": { + "c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce": { "source": { - "path": "asset.18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.bundle", + "path": "asset.c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.zip", + "objectKey": "c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "9b28bfafd748e7836cc59ca3e1167ed0048cf831b6df7efa11648ffa3c43e10e": { + "763d169d10d22f0a01c5cab6482fd43062c1c41461ccb9546f484d0d8a4239bd": { "source": { "path": "JsResolverIntegTestDefaultTestDeployAssert57AD8D20.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9b28bfafd748e7836cc59ca3e1167ed0048cf831b6df7efa11648ffa3c43e10e.json", + "objectKey": "763d169d10d22f0a01c5cab6482fd43062c1c41461ccb9546f484d0d8a4239bd.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-appsync/test/integ.js-resolver.js.snapshot/JsResolverIntegTestDefaultTestDeployAssert57AD8D20.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/JsResolverIntegTestDefaultTestDeployAssert57AD8D20.template.json index faf7092e2d7e4..678072631bd96 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/JsResolverIntegTestDefaultTestDeployAssert57AD8D20.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/JsResolverIntegTestDefaultTestDeployAssert57AD8D20.template.json @@ -49,7 +49,7 @@ "Payload.data.addTest.id", "Payload.data.addTest.id" ], - "salt": "1691091128259" + "salt": "1693924790471" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -158,7 +158,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.zip" + "S3Key": "c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -226,7 +226,7 @@ } }, "flattenResponse": "false", - "salt": "1691091128260" + "salt": "1693924790503" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js deleted file mode 100644 index 9788d2663bdd4..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js +++ /dev/null @@ -1,187 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = void 0; -/* eslint-disable no-console */ -// eslint-disable-next-line import/no-extraneous-dependencies -const Logs = require("@aws-sdk/client-cloudwatch-logs"); -/** - * Creates a log group and doesn't throw if it exists. - */ -async function createLogGroupSafe(logGroupName, client, withDelay) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.CreateLogGroupCommand(params); - await client.send(command); - } - catch (error) { - if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { - // The log group is already created by the lambda execution - return; - } - throw error; - } - }); -} -/** - * Deletes a log group and doesn't throw if it does not exist. - */ -async function deleteLogGroup(logGroupName, client, withDelay) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.DeleteLogGroupCommand(params); - await client.send(command); - } - catch (error) { - if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { - // The log group doesn't exist - return; - } - throw error; - } - }); -} -/** - * Puts or deletes a retention policy on a log group. - */ -async function setRetentionPolicy(logGroupName, client, withDelay, retentionInDays) { - await withDelay(async () => { - if (!retentionInDays) { - const params = { logGroupName }; - const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); - await client.send(deleteCommand); - } - else { - const params = { logGroupName, retentionInDays }; - const putCommand = new Logs.PutRetentionPolicyCommand(params); - await client.send(putCommand); - } - }); -} -async function handler(event, context) { - try { - console.log(JSON.stringify({ ...event, ResponseURL: '...' })); - // The target log group - const logGroupName = event.ResourceProperties.LogGroupName; - // The region of the target log group - const logGroupRegion = event.ResourceProperties.LogGroupRegion; - // Parse to AWS SDK retry options - const withDelay = makeWithDelay(parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries)); - const sdkConfig = { - logger: console, - region: logGroupRegion, - }; - const client = new Logs.CloudWatchLogsClient(sdkConfig); - if (event.RequestType === 'Create' || event.RequestType === 'Update') { - // Act on the target log group - await createLogGroupSafe(logGroupName, client, withDelay); - await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); - // Configure the Log Group for the Custom Resource function itself - if (event.RequestType === 'Create') { - const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ - logger: console, - region: process.env.AWS_REGION, - }); - // Set a retention policy of 1 day on the logs of this very function. - // Due to the async nature of the log group creation, the log group for this function might - // still be not created yet at this point. Therefore we attempt to create it. - // In case it is being created, createLogGroupSafe will handle the conflict. - await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); - // If createLogGroupSafe fails, the log group is not created even after multiple attempts. - // In this case we have nothing to set the retention policy on but an exception will skip - // the next line. - await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); - } - } - // When the requestType is delete, delete the log group if the removal policy is delete - if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { - await deleteLogGroup(logGroupName, client, withDelay); - // else retain the log group - } - await respond('SUCCESS', 'OK', logGroupName); - } - catch (e) { - console.log(e); - await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); - } - function respond(responseStatus, reason, physicalResourceId) { - const responseBody = JSON.stringify({ - Status: responseStatus, - Reason: reason, - PhysicalResourceId: physicalResourceId, - StackId: event.StackId, - RequestId: event.RequestId, - LogicalResourceId: event.LogicalResourceId, - Data: { - // Add log group name as part of the response so that it's available via Fn::GetAtt - LogGroupName: event.ResourceProperties.LogGroupName, - }, - }); - console.log('Responding', responseBody); - // eslint-disable-next-line @typescript-eslint/no-require-imports - const parsedUrl = require('url').parse(event.ResponseURL); - const requestOptions = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { - 'content-type': '', - 'content-length': Buffer.byteLength(responseBody, 'utf8'), - }, - }; - return new Promise((resolve, reject) => { - try { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const request = require('https').request(requestOptions, resolve); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); - } -} -exports.handler = handler; -function parseIntOptional(value, base = 10) { - if (value === undefined) { - return undefined; - } - return parseInt(value, base); -} -function makeWithDelay(maxRetries = 5, delayBase = 100, delayCap = 10 * 1000) { - // If we try to update the log group, then due to the async nature of - // Lambda logging there could be a race condition when the same log group is - // already being created by the lambda execution. This can sometime result in - // an error "OperationAbortedException: A conflicting operation is currently - // in progress...Please try again." - // To avoid an error, we do as requested and try again. - return async (block) => { - let attempts = 0; - do { - try { - return await block(); - } - catch (error) { - if (error instanceof Logs.OperationAbortedException || error.name === 'OperationAbortedException') { - if (attempts < maxRetries) { - attempts++; - await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); - continue; - } - else { - // The log group is still being changed by another execution but we are out of retries - throw new Error('Out of attempts to change log group'); - } - } - throw error; - } - } while (true); // exit happens on retry count check - }; -} -function calculateDelay(attempt, base, cap) { - return Math.round(Math.random() * Math.min(cap, base * 2 ** attempt)); -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNkRBQTZEO0FBQzdELHdEQUF3RDtBQWV4RDs7R0FFRztBQUNILEtBQUssVUFBVSxrQkFBa0IsQ0FBQyxZQUFvQixFQUFFLE1BQWlDLEVBQUUsU0FBd0Q7SUFDakosTUFBTSxTQUFTLENBQUMsS0FBSyxJQUFJLEVBQUU7UUFDekIsSUFBSTtZQUNGLE1BQU0sTUFBTSxHQUFHLEVBQUUsWUFBWSxFQUFFLENBQUM7WUFDaEMsTUFBTSxPQUFPLEdBQUcsSUFBSSxJQUFJLENBQUMscUJBQXFCLENBQUMsTUFBTSxDQUFDLENBQUM7WUFDdkQsTUFBTSxNQUFNLENBQUMsSUFBSSxDQU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3V0IG9mIHJldHJpZXNcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignT3V0IG9mIGF0dGVtcHRzIHRvIGNoYW5nZSBsb2cgZ3JvdXAnKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICB9XG4gICAgfSB3aGlsZSAodHJ1ZSk7IC8vIGV4aXQgaGFwcGVucyBvbiByZXRyeSBjb3VudCBjaGVja1xuICB9O1xufVxuXG5mdW5jdGlvbiBjYWxjdWxhdGVEZWxheShhdHRlbXB0OiBudW1iZXIsIGJhc2U6IG51bWJlciwgY2FwOiBudW1iZXIpOiBudW1iZXIge1xuICByZXR1cm4gTWF0aC5yb3VuZChNYXRoLnJhbmRvbSgpICogTWF0aC5taW4oY2FwLCBiYXNlICogMiAqKiBhdHRlbXB0KSk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js new file mode 100644 index 0000000000000..8d4f5cf13f88d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js @@ -0,0 +1,192 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +/* eslint-disable no-console */ +// eslint-disable-next-line import/no-extraneous-dependencies +const Logs = require("@aws-sdk/client-cloudwatch-logs"); +/** + * Creates a log group and doesn't throw if it exists. + */ +async function createLogGroupSafe(logGroupName, client, withDelay) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.CreateLogGroupCommand(params); + await client.send(command); + } + catch (error) { + if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { + // The log group is already created by the lambda execution + return; + } + throw error; + } + }); +} +/** + * Deletes a log group and doesn't throw if it does not exist. + */ +async function deleteLogGroup(logGroupName, client, withDelay) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.DeleteLogGroupCommand(params); + await client.send(command); + } + catch (error) { + if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { + // The log group doesn't exist + return; + } + throw error; + } + }); +} +/** + * Puts or deletes a retention policy on a log group. + */ +async function setRetentionPolicy(logGroupName, client, withDelay, retentionInDays) { + await withDelay(async () => { + if (!retentionInDays) { + const params = { logGroupName }; + const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); + await client.send(deleteCommand); + } + else { + const params = { logGroupName, retentionInDays }; + const putCommand = new Logs.PutRetentionPolicyCommand(params); + await client.send(putCommand); + } + }); +} +async function handler(event, context) { + try { + console.log(JSON.stringify({ ...event, ResponseURL: '...' })); + // The target log group + const logGroupName = event.ResourceProperties.LogGroupName; + // The region of the target log group + const logGroupRegion = event.ResourceProperties.LogGroupRegion; + // Parse to AWS SDK retry options + const maxRetries = parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries) ?? 5; + const withDelay = makeWithDelay(maxRetries); + const sdkConfig = { + logger: console, + region: logGroupRegion, + maxAttempts: Math.max(5, maxRetries), // Use a minimum for SDK level retries, because it might include retryable failures that withDelay isn't checking for + }; + const client = new Logs.CloudWatchLogsClient(sdkConfig); + if (event.RequestType === 'Create' || event.RequestType === 'Update') { + // Act on the target log group + await createLogGroupSafe(logGroupName, client, withDelay); + await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); + // Configure the Log Group for the Custom Resource function itself + if (event.RequestType === 'Create') { + const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ + logger: console, + region: process.env.AWS_REGION, + }); + // Set a retention policy of 1 day on the logs of this very function. + // Due to the async nature of the log group creation, the log group for this function might + // still be not created yet at this point. Therefore we attempt to create it. + // In case it is being created, createLogGroupSafe will handle the conflict. + await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); + // If createLogGroupSafe fails, the log group is not created even after multiple attempts. + // In this case we have nothing to set the retention policy on but an exception will skip + // the next line. + await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); + } + } + // When the requestType is delete, delete the log group if the removal policy is delete + if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { + await deleteLogGroup(logGroupName, client, withDelay); + // else retain the log group + } + await respond('SUCCESS', 'OK', logGroupName); + } + catch (e) { + console.log(e); + await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); + } + function respond(responseStatus, reason, physicalResourceId) { + const responseBody = JSON.stringify({ + Status: responseStatus, + Reason: reason, + PhysicalResourceId: physicalResourceId, + StackId: event.StackId, + RequestId: event.RequestId, + LogicalResourceId: event.LogicalResourceId, + Data: { + // Add log group name as part of the response so that it's available via Fn::GetAtt + LogGroupName: event.ResourceProperties.LogGroupName, + }, + }); + console.log('Responding', responseBody); + // eslint-disable-next-line @typescript-eslint/no-require-imports + const parsedUrl = require('url').parse(event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { + 'content-type': '', + 'content-length': Buffer.byteLength(responseBody, 'utf8'), + }, + }; + return new Promise((resolve, reject) => { + try { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const request = require('https').request(requestOptions, resolve); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); + } +} +exports.handler = handler; +function parseIntOptional(value, base = 10) { + if (value === undefined) { + return undefined; + } + return parseInt(value, base); +} +function makeWithDelay(maxRetries, delayBase = 100, delayCap = 10 * 1000) { + // If we try to update the log group, then due to the async nature of + // Lambda logging there could be a race condition when the same log group is + // already being created by the lambda execution. This can sometime result in + // an error "OperationAbortedException: A conflicting operation is currently + // in progress...Please try again." + // To avoid an error, we do as requested and try again. + return async (block) => { + let attempts = 0; + do { + try { + return await block(); + } + catch (error) { + if (error instanceof Logs.OperationAbortedException + || error.name === 'OperationAbortedException' + || error.name === 'ThrottlingException' // There is no class to check with instanceof, see https://github.com/aws/aws-sdk-js-v3/issues/5140 + ) { + if (attempts < maxRetries) { + attempts++; + await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); + continue; + } + else { + // The log group is still being changed by another execution but we are out of retries + throw new Error('Out of attempts to change log group'); + } + } + throw error; + } + } while (true); // exit happens on retry count check + }; +} +function calculateDelay(attempt, base, cap) { + return Math.round(Math.random() * Math.min(cap, base * 2 ** attempt)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNkRBQTZEO0FBQzdELHdEQUF3RDtBQWV4RDs7R0FFRztBQUNILEtBQUssVUFBVSxrQk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FcnJvcignT3V0IG9mIGF0dGVtcHRzIHRvIGNoYW5nZSBsb2cgZ3JvdXAnKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICB9XG4gICAgfSB3aGlsZSAodHJ1ZSk7IC8vIGV4aXQgaGFwcGVucyBvbiByZXRyeSBjb3VudCBjaGVja1xuICB9O1xufVxuXG5mdW5jdGlvbiBjYWxjdWxhdGVEZWxheShhdHRlbXB0OiBudW1iZXIsIGJhc2U6IG51bWJlciwgY2FwOiBudW1iZXIpOiBudW1iZXIge1xuICByZXR1cm4gTWF0aC5yb3VuZChNYXRoLnJhbmRvbSgpICogTWF0aC5taW4oY2FwLCBiYXNlICogMiAqKiBhdHRlbXB0KSk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts similarity index 92% rename from packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts index eea89d75c8795..88843fe3fa016 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts @@ -91,11 +91,13 @@ export async function handler(event: LogRetentionEvent, context: AWSLambda.Conte const logGroupRegion = event.ResourceProperties.LogGroupRegion; // Parse to AWS SDK retry options - const withDelay = makeWithDelay(parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries)); + const maxRetries = parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries) ?? 5; + const withDelay = makeWithDelay(maxRetries); const sdkConfig: Logs.CloudWatchLogsClientConfig = { logger: console, region: logGroupRegion, + maxAttempts: Math.max(5, maxRetries), // Use a minimum for SDK level retries, because it might include retryable failures that withDelay isn't checking for }; const client = new Logs.CloudWatchLogsClient(sdkConfig); @@ -185,7 +187,7 @@ function parseIntOptional(value?: string, base = 10): number | undefined { } function makeWithDelay( - maxRetries: number = 5, + maxRetries: number, delayBase: number = 100, delayCap = 10 * 1000, // 10s ): (block: () => Promise) => Promise { @@ -202,7 +204,11 @@ function makeWithDelay( try { return await block(); } catch (error: any) { - if (error instanceof Logs.OperationAbortedException || error.name === 'OperationAbortedException') { + if ( + error instanceof Logs.OperationAbortedException + || error.name === 'OperationAbortedException' + || error.name === 'ThrottlingException' // There is no class to check with instanceof, see https://github.com/aws/aws-sdk-js-v3/issues/5140 + ) { if (attempts < maxRetries ) { attempts++; await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.bundle/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.bundle/index.js similarity index 98% rename from packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.bundle/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.bundle/index.js index b553f2182f8e2..c90588a2c6499 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.bundle/index.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.bundle/index.js @@ -1539,6 +1539,102 @@ var require_eventStream = __commonJS({ } }); +// ../../../node_modules/@smithy/types/dist-cjs/extensions/checksum.js +var require_checksum2 = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/extensions/checksum.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveChecksumRuntimeConfig = exports.getChecksumConfiguration = exports.AlgorithmId = void 0; + var AlgorithmId; + (function(AlgorithmId2) { + AlgorithmId2["MD5"] = "md5"; + AlgorithmId2["CRC32"] = "crc32"; + AlgorithmId2["CRC32C"] = "crc32c"; + AlgorithmId2["SHA1"] = "sha1"; + AlgorithmId2["SHA256"] = "sha256"; + })(AlgorithmId = exports.AlgorithmId || (exports.AlgorithmId = {})); + var getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== void 0) { + checksumAlgorithms.push({ + algorithmId: () => AlgorithmId.SHA256, + checksumConstructor: () => runtimeConfig.sha256 + }); + } + if (runtimeConfig.md5 != void 0) { + checksumAlgorithms.push({ + algorithmId: () => AlgorithmId.MD5, + checksumConstructor: () => runtimeConfig.md5 + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + } + }; + }; + exports.getChecksumConfiguration = getChecksumConfiguration; + var resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }; + exports.resolveChecksumRuntimeConfig = resolveChecksumRuntimeConfig; + } +}); + +// ../../../node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js +var require_defaultClientConfiguration = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveDefaultRuntimeConfig = exports.getDefaultClientConfiguration = void 0; + var checksum_1 = require_checksum2(); + var getDefaultClientConfiguration = (runtimeConfig) => { + return { + ...(0, checksum_1.getChecksumConfiguration)(runtimeConfig) + }; + }; + exports.getDefaultClientConfiguration = getDefaultClientConfiguration; + var resolveDefaultRuntimeConfig = (config) => { + return { + ...(0, checksum_1.resolveChecksumRuntimeConfig)(config) + }; + }; + exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; + } +}); + +// ../../../node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js +var require_defaultExtensionConfiguration = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + } +}); + +// ../../../node_modules/@smithy/types/dist-cjs/extensions/index.js +var require_extensions = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/extensions/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AlgorithmId = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_defaultClientConfiguration(), exports); + tslib_1.__exportStar(require_defaultExtensionConfiguration(), exports); + var checksum_1 = require_checksum2(); + Object.defineProperty(exports, "AlgorithmId", { enumerable: true, get: function() { + return checksum_1.AlgorithmId; + } }); + } +}); + // ../../../node_modules/@smithy/types/dist-cjs/http.js var require_http = __commonJS({ "../../../node_modules/@smithy/types/dist-cjs/http.js"(exports) { @@ -1757,6 +1853,7 @@ var require_dist_cjs = __commonJS({ tslib_1.__exportStar(require_endpoint(), exports); tslib_1.__exportStar(require_endpoints(), exports); tslib_1.__exportStar(require_eventStream(), exports); + tslib_1.__exportStar(require_extensions(), exports); tslib_1.__exportStar(require_http(), exports); tslib_1.__exportStar(require_identity2(), exports); tslib_1.__exportStar(require_logger(), exports); @@ -3997,7 +4094,7 @@ var require_getCanonicalQuery = __commonJS({ if (typeof value === "string") { serialized[key] = `${(0, util_uri_escape_1.escapeUri)(key)}=${(0, util_uri_escape_1.escapeUri)(value)}`; } else if (Array.isArray(value)) { - serialized[key] = value.slice(0).sort().reduce((encoded, value2) => encoded.concat([`${(0, util_uri_escape_1.escapeUri)(key)}=${(0, util_uri_escape_1.escapeUri)(value2)}`]), []).join("&"); + serialized[key] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${(0, util_uri_escape_1.escapeUri)(key)}=${(0, util_uri_escape_1.escapeUri)(value2)}`]), []).sort().join("&"); } } return keys.map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); @@ -4699,6 +4796,9 @@ var require_partitions = __commonJS({ "eu-west-3": { description: "Europe (Paris)" }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, "me-central-1": { description: "Middle East (UAE)" }, @@ -5222,7 +5322,7 @@ var require_blob_types = __commonJS({ }); // ../../../node_modules/@aws-sdk/types/dist-cjs/checksum.js -var require_checksum2 = __commonJS({ +var require_checksum3 = __commonJS({ "../../../node_modules/@aws-sdk/types/dist-cjs/checksum.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -5516,7 +5616,7 @@ var require_dist_cjs17 = __commonJS({ tslib_1.__exportStar(require_abort2(), exports); tslib_1.__exportStar(require_auth2(), exports); tslib_1.__exportStar(require_blob_types(), exports); - tslib_1.__exportStar(require_checksum2(), exports); + tslib_1.__exportStar(require_checksum3(), exports); tslib_1.__exportStar(require_client2(), exports); tslib_1.__exportStar(require_command2(), exports); tslib_1.__exportStar(require_connection2(), exports); @@ -10041,6 +10141,85 @@ var require_emitWarningIfUnsupportedVersion = __commonJS({ } }); +// ../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/checksum.js +var require_checksum4 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/checksum.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveChecksumRuntimeConfig = exports.getChecksumConfiguration = exports.AlgorithmId = void 0; + var types_1 = require_dist_cjs(); + Object.defineProperty(exports, "AlgorithmId", { enumerable: true, get: function() { + return types_1.AlgorithmId; + } }); + var getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== void 0) { + checksumAlgorithms.push({ + algorithmId: () => types_1.AlgorithmId.SHA256, + checksumConstructor: () => runtimeConfig.sha256 + }); + } + if (runtimeConfig.md5 != void 0) { + checksumAlgorithms.push({ + algorithmId: () => types_1.AlgorithmId.MD5, + checksumConstructor: () => runtimeConfig.md5 + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + } + }; + }; + exports.getChecksumConfiguration = getChecksumConfiguration; + var resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }; + exports.resolveChecksumRuntimeConfig = resolveChecksumRuntimeConfig; + } +}); + +// ../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/defaultExtensionConfiguration.js +var require_defaultExtensionConfiguration2 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/defaultExtensionConfiguration.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveDefaultRuntimeConfig = exports.getDefaultClientConfiguration = exports.getDefaultExtensionConfiguration = void 0; + var checksum_1 = require_checksum4(); + var getDefaultExtensionConfiguration = (runtimeConfig) => { + return { + ...(0, checksum_1.getChecksumConfiguration)(runtimeConfig) + }; + }; + exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration; + exports.getDefaultClientConfiguration = exports.getDefaultExtensionConfiguration; + var resolveDefaultRuntimeConfig = (config) => { + return { + ...(0, checksum_1.resolveChecksumRuntimeConfig)(config) + }; + }; + exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; + } +}); + +// ../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/index.js +var require_extensions2 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_defaultExtensionConfiguration2(), exports); + } +}); + // ../../../node_modules/@smithy/smithy-client/dist-cjs/extended-encode-uri-component.js var require_extended_encode_uri_component = __commonJS({ "../../../node_modules/@smithy/smithy-client/dist-cjs/extended-encode-uri-component.js"(exports) { @@ -10356,6 +10535,7 @@ var require_dist_cjs35 = __commonJS({ tslib_1.__exportStar(require_default_error_handler(), exports); tslib_1.__exportStar(require_defaults_mode(), exports); tslib_1.__exportStar(require_emitWarningIfUnsupportedVersion(), exports); + tslib_1.__exportStar(require_extensions2(), exports); tslib_1.__exportStar(require_exceptions(), exports); tslib_1.__exportStar(require_extended_encode_uri_component(), exports); tslib_1.__exportStar(require_get_array_if_single_item(), exports); @@ -10394,7 +10574,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.382.0", + version: "3.398.0", scripts: { build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", "build:cjs": "tsc -p tsconfig.cjs.json", @@ -10414,37 +10594,37 @@ var require_package = __commonJS({ 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.398.0", + "@aws-sdk/credential-provider-node": "3.398.0", + "@aws-sdk/middleware-host-header": "3.398.0", + "@aws-sdk/middleware-logger": "3.398.0", + "@aws-sdk/middleware-recursion-detection": "3.398.0", + "@aws-sdk/middleware-signing": "3.398.0", + "@aws-sdk/middleware-user-agent": "3.398.0", + "@aws-sdk/types": "3.398.0", + "@aws-sdk/util-endpoints": "3.398.0", + "@aws-sdk/util-user-agent-browser": "3.398.0", + "@aws-sdk/util-user-agent-node": "3.398.0", + "@smithy/config-resolver": "^2.0.5", + "@smithy/fetch-http-handler": "^2.0.5", + "@smithy/hash-node": "^2.0.5", + "@smithy/invalid-dependency": "^2.0.5", + "@smithy/middleware-content-length": "^2.0.5", + "@smithy/middleware-endpoint": "^2.0.5", + "@smithy/middleware-retry": "^2.0.5", + "@smithy/middleware-serde": "^2.0.5", "@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.5", + "@smithy/node-http-handler": "^2.0.5", + "@smithy/protocol-http": "^2.0.5", + "@smithy/smithy-client": "^2.0.5", + "@smithy/types": "^2.2.2", + "@smithy/url-parser": "^2.0.5", "@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-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.5", + "@smithy/util-defaults-mode-node": "^2.0.5", "@smithy/util-retry": "^2.0.0", "@smithy/util-utf8": "^2.0.0", tslib: "^2.5.0" @@ -10533,7 +10713,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.382.0", + version: "3.398.0", scripts: { build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", "build:cjs": "tsc -p tsconfig.cjs.json", @@ -10555,37 +10735,37 @@ 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.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.398.0", + "@aws-sdk/middleware-host-header": "3.398.0", + "@aws-sdk/middleware-logger": "3.398.0", + "@aws-sdk/middleware-recursion-detection": "3.398.0", + "@aws-sdk/middleware-sdk-sts": "3.398.0", + "@aws-sdk/middleware-signing": "3.398.0", + "@aws-sdk/middleware-user-agent": "3.398.0", + "@aws-sdk/types": "3.398.0", + "@aws-sdk/util-endpoints": "3.398.0", + "@aws-sdk/util-user-agent-browser": "3.398.0", + "@aws-sdk/util-user-agent-node": "3.398.0", + "@smithy/config-resolver": "^2.0.5", + "@smithy/fetch-http-handler": "^2.0.5", + "@smithy/hash-node": "^2.0.5", + "@smithy/invalid-dependency": "^2.0.5", + "@smithy/middleware-content-length": "^2.0.5", + "@smithy/middleware-endpoint": "^2.0.5", + "@smithy/middleware-retry": "^2.0.5", + "@smithy/middleware-serde": "^2.0.5", "@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.5", + "@smithy/node-http-handler": "^2.0.5", + "@smithy/protocol-http": "^2.0.5", + "@smithy/smithy-client": "^2.0.5", + "@smithy/types": "^2.2.2", + "@smithy/url-parser": "^2.0.5", "@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-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.5", + "@smithy/util-defaults-mode-node": "^2.0.5", "@smithy/util-retry": "^2.0.0", "@smithy/util-utf8": "^2.0.0", "fast-xml-parser": "4.2.5", @@ -14804,7 +14984,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.382.0", + version: "3.398.0", scripts: { build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", "build:cjs": "tsc -p tsconfig.cjs.json", @@ -14824,34 +15004,34 @@ 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.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.398.0", + "@aws-sdk/middleware-logger": "3.398.0", + "@aws-sdk/middleware-recursion-detection": "3.398.0", + "@aws-sdk/middleware-user-agent": "3.398.0", + "@aws-sdk/types": "3.398.0", + "@aws-sdk/util-endpoints": "3.398.0", + "@aws-sdk/util-user-agent-browser": "3.398.0", + "@aws-sdk/util-user-agent-node": "3.398.0", + "@smithy/config-resolver": "^2.0.5", + "@smithy/fetch-http-handler": "^2.0.5", + "@smithy/hash-node": "^2.0.5", + "@smithy/invalid-dependency": "^2.0.5", + "@smithy/middleware-content-length": "^2.0.5", + "@smithy/middleware-endpoint": "^2.0.5", + "@smithy/middleware-retry": "^2.0.5", + "@smithy/middleware-serde": "^2.0.5", "@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.5", + "@smithy/node-http-handler": "^2.0.5", + "@smithy/protocol-http": "^2.0.5", + "@smithy/smithy-client": "^2.0.5", + "@smithy/types": "^2.2.2", + "@smithy/url-parser": "^2.0.5", "@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-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.5", + "@smithy/util-defaults-mode-node": "^2.0.5", "@smithy/util-retry": "^2.0.0", "@smithy/util-utf8": "^2.0.0", tslib: "^2.5.0" @@ -15027,6 +15207,8 @@ var require_calculateBodyLength = __commonJS({ return body.byteLength; } else if (typeof body.size === "number") { return body.size; + } else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; } else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) { return (0, fs_1.lstatSync)(body.path).size; } else if (typeof body.fd === "number") { @@ -15113,6 +15295,7 @@ var require_runtimeConfig_shared = __commonJS({ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), serviceId: config?.serviceId ?? "SSO", urlParser: config?.urlParser ?? url_parser_1.parseUrl, @@ -15278,6 +15461,28 @@ var require_runtimeConfig = __commonJS({ } }); +// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeExtensions.js +var require_runtimeExtensions = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeExtensions.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveRuntimeExtensions = void 0; + var smithy_client_1 = require_dist_cjs35(); + var asPartial = (t) => t; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration) + }; + }; + exports.resolveRuntimeExtensions = resolveRuntimeExtensions; + } +}); + // ../../../node_modules/@aws-sdk/client-sso/dist-cjs/SSOClient.js var require_SSOClient = __commonJS({ "../../../node_modules/@aws-sdk/client-sso/dist-cjs/SSOClient.js"(exports) { @@ -15298,17 +15503,19 @@ var require_SSOClient = __commonJS({ } }); var EndpointParameters_1 = require_EndpointParameters3(); var runtimeConfig_1 = require_runtimeConfig(); + var runtimeExtensions_1 = require_runtimeExtensions(); var SSOClient = class extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); 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_user_agent_1.resolveUserAgentConfig)(_config_5); - super(_config_6); - this.config = _config_6; + const _config_7 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_6, configuration?.extensions || []); + super(_config_7); + this.config = _config_7; this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); @@ -16182,143 +16389,44 @@ var require_dist_cjs46 = __commonJS({ } }); -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/constants.js -var require_constants8 = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/constants.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.REFRESH_MESSAGE = exports.EXPIRE_WINDOW_MS = void 0; - exports.EXPIRE_WINDOW_MS = 5 * 60 * 1e3; - exports.REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/EndpointParameters.js -var require_EndpointParameters4 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/EndpointParameters.js"(exports) { +// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/bundle/client-sso-oidc-node.js +var require_client_sso_oidc_node = __commonJS({ + "../../../node_modules/@aws-sdk/token-providers/dist-cjs/bundle/client-sso-oidc-node.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.resolveClientEndpointParameters = void 0; + exports.UnsupportedGrantTypeException = exports.UnauthorizedClientException = exports.SlowDownException = exports.SSOOIDCClient = exports.InvalidScopeException = exports.InvalidRequestException = exports.InvalidClientException = exports.InternalServerException = exports.ExpiredTokenException = exports.CreateTokenCommand = exports.AuthorizationPendingException = exports.AccessDeniedException = void 0; + var middleware_host_header_1 = require_dist_cjs3(); + var middleware_logger_1 = require_dist_cjs4(); + var middleware_recursion_detection_1 = require_dist_cjs5(); + var middleware_user_agent_1 = require_dist_cjs19(); + var config_resolver_1 = require_dist_cjs21(); + var middleware_content_length_1 = require_dist_cjs22(); + var middleware_endpoint_1 = require_dist_cjs26(); + var middleware_retry_1 = require_dist_cjs29(); + var smithy_client_1 = require_dist_cjs35(); var resolveClientEndpointParameters = (options) => { + var _a, _b; return { ...options, - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, + useDualstackEndpoint: (_a = options.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false, + useFipsEndpoint: (_b = options.useFipsEndpoint) !== null && _b !== void 0 ? _b : false, defaultSigningName: "awsssooidc" }; }; - exports.resolveClientEndpointParameters = resolveClientEndpointParameters; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/package.json -var require_package4 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/package.json"(exports, module2) { - 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.382.0", - scripts: { - build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build:docs": "typedoc", - "build:es": "tsc -p tsconfig.es.json", - "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", - "build:types": "tsc -p tsconfig.types.json", - "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", - clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", - "extract:docs": "api-extractor run --local", - "generate:client": "node ../../scripts/generate-clients/single-service --solo sso-oidc" - }, - main: "./dist-cjs/index.js", - types: "./dist-types/index.d.ts", - module: "./dist-es/index.js", - sideEffects: false, - 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" - }, - devDependencies: { - "@smithy/service-client-documentation-generator": "^2.0.0", - "@tsconfig/node14": "1.0.3", - "@types/node": "^14.14.31", - concurrently: "7.0.0", - "downlevel-dts": "0.10.1", - rimraf: "3.0.2", - typedoc: "0.23.23", - typescript: "~4.9.5" - }, - engines: { - node: ">=14.0.0" - }, - typesVersions: { - "<4.0": { - "dist-types/*": [ - "dist-types/ts3.4/*" - ] - } - }, - files: [ - "dist-*/**" - ], - author: { - name: "AWS SDK for JavaScript Team", - url: "https://aws.amazon.com/javascript/" - }, - license: "Apache-2.0", - browser: { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" - }, - "react-native": { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" - }, - homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc", - repository: { - type: "git", - url: "https://github.com/aws/aws-sdk-js-v3.git", - directory: "clients/client-sso-oidc" - } - }; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js -var require_ruleset2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ruleSet = void 0; + var package_default = { version: "3.387.0" }; + var util_user_agent_node_1 = require_dist_cjs42(); + var config_resolver_2 = require_dist_cjs21(); + var hash_node_1 = require_dist_cjs43(); + var middleware_retry_2 = require_dist_cjs29(); + var node_config_provider_1 = require_dist_cjs39(); + var node_http_handler_1 = require_dist_cjs33(); + var util_body_length_node_1 = require_dist_cjs44(); + var util_retry_1 = require_dist_cjs28(); + var smithy_client_2 = require_dist_cjs35(); + var url_parser_1 = require_dist_cjs24(); + var util_base64_1 = require_dist_cjs31(); + var util_utf8_1 = require_dist_cjs13(); + var util_endpoints_1 = require_dist_cjs18(); var p = "required"; var q = "fn"; var r = "argv"; @@ -16339,128 +16447,61 @@ var require_ruleset2 = __commonJS({ var n = [h]; var o = [i]; var _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [k], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] }; - exports.ruleSet = _data; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js -var require_endpointResolver2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.defaultEndpointResolver = void 0; - var util_endpoints_1 = require_dist_cjs18(); - var ruleset_1 = require_ruleset2(); + var ruleSet = _data; var defaultEndpointResolver = (endpointParams, context = {}) => { - return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + return (0, util_endpoints_1.resolveEndpoint)(ruleSet, { endpointParams, logger: context.logger }); }; - exports.defaultEndpointResolver = defaultEndpointResolver; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js -var require_runtimeConfig_shared2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getRuntimeConfig = void 0; - var smithy_client_1 = require_dist_cjs35(); - var url_parser_1 = require_dist_cjs24(); - var util_base64_1 = require_dist_cjs31(); - var util_utf8_1 = require_dist_cjs13(); - var endpointResolver_1 = require_endpointResolver2(); - var getRuntimeConfig = (config) => ({ - apiVersion: "2019-06-10", - 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; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js -var require_runtimeConfig2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getRuntimeConfig = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var package_json_1 = tslib_1.__importDefault(require_package4()); - var util_user_agent_node_1 = require_dist_cjs42(); - var config_resolver_1 = require_dist_cjs21(); - var hash_node_1 = require_dist_cjs43(); - var middleware_retry_1 = require_dist_cjs29(); - var node_config_provider_1 = require_dist_cjs39(); - var node_http_handler_1 = require_dist_cjs33(); - var util_body_length_node_1 = require_dist_cjs44(); - var util_retry_1 = require_dist_cjs28(); - var runtimeConfig_shared_1 = require_runtimeConfig_shared2(); - var smithy_client_1 = require_dist_cjs35(); - var util_defaults_mode_node_1 = require_dist_cjs45(); - var smithy_client_2 = require_dist_cjs35(); var getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + return { + apiVersion: "2019-06-10", + base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_1.fromBase64, + base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_1.toBase64, + disableHostPrefix: (_c = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _c !== void 0 ? _c : false, + endpointProvider: (_d = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _d !== void 0 ? _d : defaultEndpointResolver, + logger: (_e = config === null || config === void 0 ? void 0 : config.logger) !== null && _e !== void 0 ? _e : new smithy_client_2.NoOpLogger(), + serviceId: (_f = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _f !== void 0 ? _f : "SSO OIDC", + urlParser: (_g = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _g !== void 0 ? _g : url_parser_1.parseUrl, + utf8Decoder: (_h = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _h !== void 0 ? _h : util_utf8_1.fromUtf8, + utf8Encoder: (_j = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _j !== void 0 ? _j : util_utf8_1.toUtf8 + }; + }; + var smithy_client_3 = require_dist_cjs35(); + var util_defaults_mode_node_1 = require_dist_cjs45(); + var smithy_client_4 = require_dist_cjs35(); + var getRuntimeConfig2 = (config) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; + (0, smithy_client_4.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_3.loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig(config); return { ...clientSharedValues, ...config, runtime: "node", defaultsMode, - 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, + bodyLengthChecker: (_a = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _a !== void 0 ? _a : util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: (_b = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _b !== void 0 ? _b : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + maxAttempts: (_c = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _c !== void 0 ? _c : (0, node_config_provider_1.loadConfig)(middleware_retry_2.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: (_d = config === null || config === void 0 ? void 0 : config.region) !== null && _d !== void 0 ? _d : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_REGION_CONFIG_OPTIONS, config_resolver_2.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: (_e = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _e !== void 0 ? _e : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + retryMode: (_f = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _f !== void 0 ? _f : (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_2.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE }), - 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) + sha256: (_g = config === null || config === void 0 ? void 0 : config.sha256) !== null && _g !== void 0 ? _g : hash_node_1.Hash.bind(null, "sha256"), + streamCollector: (_h = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _h !== void 0 ? _h : node_http_handler_1.streamCollector, + useDualstackEndpoint: (_j = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _j !== void 0 ? _j : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: (_k = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _k !== void 0 ? _k : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) }; }; - exports.getRuntimeConfig = getRuntimeConfig; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/SSOOIDCClient.js -var require_SSOOIDCClient = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/SSOOIDCClient.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SSOOIDCClient = exports.__Client = void 0; - var middleware_host_header_1 = require_dist_cjs3(); - var middleware_logger_1 = require_dist_cjs4(); - var middleware_recursion_detection_1 = require_dist_cjs5(); - var middleware_user_agent_1 = require_dist_cjs19(); - var config_resolver_1 = require_dist_cjs21(); - var middleware_content_length_1 = require_dist_cjs22(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_retry_1 = require_dist_cjs29(); - var smithy_client_1 = require_dist_cjs35(); - Object.defineProperty(exports, "__Client", { enumerable: true, get: function() { - return smithy_client_1.Client; - } }); - var EndpointParameters_1 = require_EndpointParameters4(); - var runtimeConfig_1 = require_runtimeConfig2(); var SSOOIDCClient = class extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); - const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig2(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); @@ -16480,37 +16521,20 @@ var require_SSOOIDCClient = __commonJS({ } }; exports.SSOOIDCClient = SSOOIDCClient; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/SSOOIDCServiceException.js -var require_SSOOIDCServiceException = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/SSOOIDCServiceException.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SSOOIDCServiceException = exports.__ServiceException = void 0; - var smithy_client_1 = require_dist_cjs35(); - Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function() { - return smithy_client_1.ServiceException; - } }); - var SSOOIDCServiceException = class _SSOOIDCServiceException extends smithy_client_1.ServiceException { + var smithy_client_5 = require_dist_cjs35(); + var middleware_endpoint_2 = require_dist_cjs26(); + var middleware_serde_1 = require_dist_cjs25(); + var smithy_client_6 = require_dist_cjs35(); + var protocol_http_1 = require_dist_cjs2(); + var smithy_client_7 = require_dist_cjs35(); + var smithy_client_8 = require_dist_cjs35(); + var SSOOIDCServiceException = class _SSOOIDCServiceException extends smithy_client_8.ServiceException { constructor(options) { super(options); Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); } }; - exports.SSOOIDCServiceException = SSOOIDCServiceException; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/models_0.js -var require_models_03 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/models_0.js"(exports) { - "use strict"; - 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 _AccessDeniedException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException { constructor(opts) { super({ name: "AccessDeniedException", @@ -16525,7 +16549,7 @@ var require_models_03 = __commonJS({ } }; exports.AccessDeniedException = AccessDeniedException; - var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException { constructor(opts) { super({ name: "AuthorizationPendingException", @@ -16540,7 +16564,7 @@ var require_models_03 = __commonJS({ } }; exports.AuthorizationPendingException = AuthorizationPendingException; - var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException { constructor(opts) { super({ name: "ExpiredTokenException", @@ -16555,7 +16579,7 @@ var require_models_03 = __commonJS({ } }; exports.ExpiredTokenException = ExpiredTokenException; - var InternalServerException = class _InternalServerException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InternalServerException = class _InternalServerException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InternalServerException", @@ -16570,7 +16594,7 @@ var require_models_03 = __commonJS({ } }; exports.InternalServerException = InternalServerException; - var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidClientException", @@ -16585,7 +16609,7 @@ var require_models_03 = __commonJS({ } }; exports.InvalidClientException = InvalidClientException; - var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidGrantException", @@ -16599,8 +16623,7 @@ var require_models_03 = __commonJS({ this.error_description = opts.error_description; } }; - exports.InvalidGrantException = InvalidGrantException; - var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidRequestException", @@ -16615,7 +16638,7 @@ var require_models_03 = __commonJS({ } }; exports.InvalidRequestException = InvalidRequestException; - var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidScopeException", @@ -16630,7 +16653,7 @@ var require_models_03 = __commonJS({ } }; exports.InvalidScopeException = InvalidScopeException; - var SlowDownException = class _SlowDownException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var SlowDownException = class _SlowDownException extends SSOOIDCServiceException { constructor(opts) { super({ name: "SlowDownException", @@ -16645,7 +16668,7 @@ var require_models_03 = __commonJS({ } }; exports.SlowDownException = SlowDownException; - var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException { constructor(opts) { super({ name: "UnauthorizedClientException", @@ -16660,7 +16683,7 @@ var require_models_03 = __commonJS({ } }; exports.UnauthorizedClientException = UnauthorizedClientException; - var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException { constructor(opts) { super({ name: "UnsupportedGrantTypeException", @@ -16675,7 +16698,7 @@ var require_models_03 = __commonJS({ } }; exports.UnsupportedGrantTypeException = UnsupportedGrantTypeException; - var InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidClientMetadataException", @@ -16689,28 +16712,14 @@ var require_models_03 = __commonJS({ this.error_description = opts.error_description; } }; - exports.InvalidClientMetadataException = InvalidClientMetadataException; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/protocols/Aws_restJson1.js -var require_Aws_restJson12 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/protocols/Aws_restJson1.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.de_StartDeviceAuthorizationCommand = exports.de_RegisterClientCommand = exports.de_CreateTokenCommand = exports.se_StartDeviceAuthorizationCommand = exports.se_RegisterClientCommand = exports.se_CreateTokenCommand = void 0; - var protocol_http_1 = require_dist_cjs2(); - var smithy_client_1 = require_dist_cjs35(); - var models_0_1 = require_models_03(); - var SSOOIDCServiceException_1 = require_SSOOIDCServiceException(); var se_CreateTokenCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json" }; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/token`; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/token`; let body; - body = JSON.stringify((0, smithy_client_1.take)(input, { + body = JSON.stringify((0, smithy_client_7.take)(input, { clientId: [], clientSecret: [], code: [], @@ -16718,7 +16727,7 @@ var require_Aws_restJson12 = __commonJS({ grantType: [], redirectUri: [], refreshToken: [], - scope: (_) => (0, smithy_client_1._json)(_) + scope: (_) => (0, smithy_client_7._json)(_) })); return new protocol_http_1.HttpRequest({ protocol, @@ -16730,18 +16739,17 @@ var require_Aws_restJson12 = __commonJS({ body }); }; - exports.se_CreateTokenCommand = se_CreateTokenCommand; var se_RegisterClientCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json" }; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/client/register`; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/client/register`; let body; - body = JSON.stringify((0, smithy_client_1.take)(input, { + body = JSON.stringify((0, smithy_client_7.take)(input, { clientName: [], clientType: [], - scopes: (_) => (0, smithy_client_1._json)(_) + scopes: (_) => (0, smithy_client_7._json)(_) })); return new protocol_http_1.HttpRequest({ protocol, @@ -16753,15 +16761,14 @@ var require_Aws_restJson12 = __commonJS({ body }); }; - exports.se_RegisterClientCommand = se_RegisterClientCommand; var se_StartDeviceAuthorizationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json" }; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/device_authorization`; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/device_authorization`; let body; - body = JSON.stringify((0, smithy_client_1.take)(input, { + body = JSON.stringify((0, smithy_client_7.take)(input, { clientId: [], clientSecret: [], startUrl: [] @@ -16776,26 +16783,24 @@ var require_Aws_restJson12 = __commonJS({ body }); }; - exports.se_StartDeviceAuthorizationCommand = se_StartDeviceAuthorizationCommand; var de_CreateTokenCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CreateTokenCommandError(output, context); } - const contents = (0, smithy_client_1.map)({ + const contents = (0, smithy_client_7.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_1.take)(data, { - accessToken: smithy_client_1.expectString, - expiresIn: smithy_client_1.expectInt32, - idToken: smithy_client_1.expectString, - refreshToken: smithy_client_1.expectString, - tokenType: smithy_client_1.expectString + const data = (0, smithy_client_7.expectNonNull)((0, smithy_client_7.expectObject)(await parseBody(output.body, context)), "body"); + const doc = (0, smithy_client_7.take)(data, { + accessToken: smithy_client_7.expectString, + expiresIn: smithy_client_7.expectInt32, + idToken: smithy_client_7.expectString, + refreshToken: smithy_client_7.expectString, + tokenType: smithy_client_7.expectString }); Object.assign(contents, doc); return contents; }; - exports.de_CreateTokenCommand = de_CreateTokenCommand; var de_CreateTokenCommandError = async (output, context) => { const parsedOutput = { ...output, @@ -16849,22 +16854,21 @@ var require_Aws_restJson12 = __commonJS({ if (output.statusCode !== 200 && output.statusCode >= 300) { return de_RegisterClientCommandError(output, context); } - const contents = (0, smithy_client_1.map)({ + const contents = (0, smithy_client_7.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_1.take)(data, { - authorizationEndpoint: smithy_client_1.expectString, - clientId: smithy_client_1.expectString, - clientIdIssuedAt: smithy_client_1.expectLong, - clientSecret: smithy_client_1.expectString, - clientSecretExpiresAt: smithy_client_1.expectLong, - tokenEndpoint: smithy_client_1.expectString + const data = (0, smithy_client_7.expectNonNull)((0, smithy_client_7.expectObject)(await parseBody(output.body, context)), "body"); + const doc = (0, smithy_client_7.take)(data, { + authorizationEndpoint: smithy_client_7.expectString, + clientId: smithy_client_7.expectString, + clientIdIssuedAt: smithy_client_7.expectLong, + clientSecret: smithy_client_7.expectString, + clientSecretExpiresAt: smithy_client_7.expectLong, + tokenEndpoint: smithy_client_7.expectString }); Object.assign(contents, doc); return contents; }; - exports.de_RegisterClientCommand = de_RegisterClientCommand; var de_RegisterClientCommandError = async (output, context) => { const parsedOutput = { ...output, @@ -16897,22 +16901,21 @@ var require_Aws_restJson12 = __commonJS({ if (output.statusCode !== 200 && output.statusCode >= 300) { return de_StartDeviceAuthorizationCommandError(output, context); } - const contents = (0, smithy_client_1.map)({ + const contents = (0, smithy_client_7.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_1.take)(data, { - deviceCode: smithy_client_1.expectString, - expiresIn: smithy_client_1.expectInt32, - interval: smithy_client_1.expectInt32, - userCode: smithy_client_1.expectString, - verificationUri: smithy_client_1.expectString, - verificationUriComplete: smithy_client_1.expectString + const data = (0, smithy_client_7.expectNonNull)((0, smithy_client_7.expectObject)(await parseBody(output.body, context)), "body"); + const doc = (0, smithy_client_7.take)(data, { + deviceCode: smithy_client_7.expectString, + expiresIn: smithy_client_7.expectInt32, + interval: smithy_client_7.expectInt32, + userCode: smithy_client_7.expectString, + verificationUri: smithy_client_7.expectString, + verificationUriComplete: smithy_client_7.expectString }); Object.assign(contents, doc); return contents; }; - exports.de_StartDeviceAuthorizationCommand = de_StartDeviceAuthorizationCommand; var de_StartDeviceAuthorizationCommandError = async (output, context) => { const parsedOutput = { ...output, @@ -16944,182 +16947,185 @@ var require_Aws_restJson12 = __commonJS({ }); } }; - var throwDefaultError = (0, smithy_client_1.withBaseException)(SSOOIDCServiceException_1.SSOOIDCServiceException); + var throwDefaultError = (0, smithy_client_7.withBaseException)(SSOOIDCServiceException); var de_AccessDeniedExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.AccessDeniedException({ + const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.AuthorizationPendingException({ + const exception = new AuthorizationPendingException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.ExpiredTokenException({ + const exception = new ExpiredTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InternalServerExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InternalServerException({ + const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InvalidClientExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InvalidClientException({ + const exception = new InvalidClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InvalidClientMetadataException({ + const exception = new InvalidClientMetadataException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InvalidGrantExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InvalidGrantException({ + const exception = new InvalidGrantException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InvalidRequestExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InvalidRequestException({ + const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InvalidScopeExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InvalidScopeException({ + const exception = new InvalidScopeException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_SlowDownExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.SlowDownException({ + const exception = new SlowDownException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.UnauthorizedClientException({ + const exception = new UnauthorizedClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.UnsupportedGrantTypeException({ + const exception = new UnsupportedGrantTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; - var deserializeMetadata = (output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] - }); - var collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); + var deserializeMetadata = (output) => { + var _a, _b; + return { + httpStatusCode: output.statusCode, + requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }; + }; + var collectBodyString = (streamBody, context) => (0, smithy_client_7.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); var parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { if (encoded.length) { return JSON.parse(encoded); @@ -17127,12 +17133,13 @@ var require_Aws_restJson12 = __commonJS({ return {}; }); var parseErrorBody = async (errorBody, context) => { + var _a; const value = await parseBody(errorBody, context); - value.message = value.message ?? value.Message; + value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message; return value; }; var loadRestJsonErrorCode = (output, data) => { - const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + const findKey = (object, key) => Object.keys(object).find((k2) => k2.toLowerCase() === key.toLowerCase()); const sanitizeErrorCode = (rawValue) => { let cleanValue = rawValue; if (typeof cleanValue === "number") { @@ -17160,23 +17167,11 @@ var require_Aws_restJson12 = __commonJS({ return sanitizeErrorCode(data["__type"]); } }; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/CreateTokenCommand.js -var require_CreateTokenCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/CreateTokenCommand.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CreateTokenCommand = exports.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs35(); - Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var Aws_restJson1_1 = require_Aws_restJson12(); - var CreateTokenCommand = class _CreateTokenCommand extends smithy_client_1.Command { + var CreateTokenCommand = class _CreateTokenCommand extends smithy_client_6.Command { + constructor(input) { + super(); + this.input = input; + } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -17185,13 +17180,9 @@ var require_CreateTokenCommand = __commonJS({ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } }; } - constructor(input) { - super(); - this.input = input; - } 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_2.getEndpointPlugin)(configuration, _CreateTokenCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; @@ -17207,30 +17198,21 @@ var require_CreateTokenCommand = __commonJS({ return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restJson1_1.se_CreateTokenCommand)(input, context); + return se_CreateTokenCommand(input, context); } deserialize(output, context) { - return (0, Aws_restJson1_1.de_CreateTokenCommand)(output, context); + return de_CreateTokenCommand(output, context); } }; exports.CreateTokenCommand = CreateTokenCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/RegisterClientCommand.js -var require_RegisterClientCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/RegisterClientCommand.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RegisterClientCommand = exports.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs35(); - Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var Aws_restJson1_1 = require_Aws_restJson12(); - var RegisterClientCommand = class _RegisterClientCommand extends smithy_client_1.Command { + var middleware_endpoint_3 = require_dist_cjs26(); + var middleware_serde_2 = require_dist_cjs25(); + var smithy_client_9 = require_dist_cjs35(); + var RegisterClientCommand = class _RegisterClientCommand extends smithy_client_9.Command { + constructor(input) { + super(); + this.input = input; + } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -17239,13 +17221,9 @@ var require_RegisterClientCommand = __commonJS({ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } }; } - constructor(input) { - super(); - this.input = input; - } 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_serde_2.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_3.getEndpointPlugin)(configuration, _RegisterClientCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; @@ -17261,30 +17239,20 @@ var require_RegisterClientCommand = __commonJS({ return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restJson1_1.se_RegisterClientCommand)(input, context); + return se_RegisterClientCommand(input, context); } deserialize(output, context) { - return (0, Aws_restJson1_1.de_RegisterClientCommand)(output, context); + return de_RegisterClientCommand(output, context); } }; - exports.RegisterClientCommand = RegisterClientCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/StartDeviceAuthorizationCommand.js -var require_StartDeviceAuthorizationCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/StartDeviceAuthorizationCommand.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.StartDeviceAuthorizationCommand = exports.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs35(); - Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var Aws_restJson1_1 = require_Aws_restJson12(); - var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends smithy_client_1.Command { + var middleware_endpoint_4 = require_dist_cjs26(); + var middleware_serde_3 = require_dist_cjs25(); + var smithy_client_10 = require_dist_cjs35(); + var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends smithy_client_10.Command { + constructor(input) { + super(); + this.input = input; + } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -17293,13 +17261,9 @@ var require_StartDeviceAuthorizationCommand = __commonJS({ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } }; } - constructor(input) { - super(); - this.input = input; - } 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_serde_3.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_4.getEndpointPlugin)(configuration, _StartDeviceAuthorizationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; @@ -17315,76 +17279,31 @@ var require_StartDeviceAuthorizationCommand = __commonJS({ return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restJson1_1.se_StartDeviceAuthorizationCommand)(input, context); + return se_StartDeviceAuthorizationCommand(input, context); } deserialize(output, context) { - return (0, Aws_restJson1_1.de_StartDeviceAuthorizationCommand)(output, context); + return de_StartDeviceAuthorizationCommand(output, context); } }; - exports.StartDeviceAuthorizationCommand = StartDeviceAuthorizationCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/SSOOIDC.js -var require_SSOOIDC = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/SSOOIDC.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SSOOIDC = void 0; - var smithy_client_1 = require_dist_cjs35(); - var CreateTokenCommand_1 = require_CreateTokenCommand(); - var RegisterClientCommand_1 = require_RegisterClientCommand(); - var StartDeviceAuthorizationCommand_1 = require_StartDeviceAuthorizationCommand(); - var SSOOIDCClient_1 = require_SSOOIDCClient(); var commands = { - CreateTokenCommand: CreateTokenCommand_1.CreateTokenCommand, - RegisterClientCommand: RegisterClientCommand_1.RegisterClientCommand, - StartDeviceAuthorizationCommand: StartDeviceAuthorizationCommand_1.StartDeviceAuthorizationCommand + CreateTokenCommand, + RegisterClientCommand, + StartDeviceAuthorizationCommand }; - var SSOOIDC = class extends SSOOIDCClient_1.SSOOIDCClient { + var SSOOIDC = class extends SSOOIDCClient { }; - exports.SSOOIDC = SSOOIDC; - (0, smithy_client_1.createAggregatedClient)(commands, SSOOIDC); - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/index.js -var require_commands2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_CreateTokenCommand(), exports); - tslib_1.__exportStar(require_RegisterClientCommand(), exports); - tslib_1.__exportStar(require_StartDeviceAuthorizationCommand(), exports); - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/index.js -var require_models2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_models_03(), exports); + (0, smithy_client_5.createAggregatedClient)(commands, SSOOIDC); } }); -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js -var require_dist_cjs47 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports) { +// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/constants.js +var require_constants8 = __commonJS({ + "../../../node_modules/@aws-sdk/token-providers/dist-cjs/constants.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.SSOOIDCServiceException = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_SSOOIDCClient(), exports); - tslib_1.__exportStar(require_SSOOIDC(), exports); - tslib_1.__exportStar(require_commands2(), exports); - tslib_1.__exportStar(require_models2(), exports); - var SSOOIDCServiceException_1 = require_SSOOIDCServiceException(); - Object.defineProperty(exports, "SSOOIDCServiceException", { enumerable: true, get: function() { - return SSOOIDCServiceException_1.SSOOIDCServiceException; - } }); + exports.REFRESH_MESSAGE = exports.EXPIRE_WINDOW_MS = void 0; + exports.EXPIRE_WINDOW_MS = 5 * 60 * 1e3; + exports.REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; } }); @@ -17394,13 +17313,13 @@ var require_getSsoOidcClient = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSsoOidcClient = void 0; - var client_sso_oidc_1 = require_dist_cjs47(); + var client_sso_oidc_node_1 = require_client_sso_oidc_node(); var ssoOidcClientsHash = {}; var getSsoOidcClient = (ssoRegion) => { if (ssoOidcClientsHash[ssoRegion]) { return ssoOidcClientsHash[ssoRegion]; } - const ssoOidcClient = new client_sso_oidc_1.SSOOIDCClient({ region: ssoRegion }); + const ssoOidcClient = new client_sso_oidc_node_1.SSOOIDCClient({ region: ssoRegion }); ssoOidcClientsHash[ssoRegion] = ssoOidcClient; return ssoOidcClient; }; @@ -17414,11 +17333,11 @@ var require_getNewSsoOidcToken = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNewSsoOidcToken = void 0; - var client_sso_oidc_1 = require_dist_cjs47(); + var client_sso_oidc_node_1 = require_client_sso_oidc_node(); var getSsoOidcClient_1 = require_getSsoOidcClient(); var getNewSsoOidcToken = (ssoToken, ssoRegion) => { const ssoOidcClient = (0, getSsoOidcClient_1.getSsoOidcClient)(ssoRegion); - return ssoOidcClient.send(new client_sso_oidc_1.CreateTokenCommand({ + return ssoOidcClient.send(new client_sso_oidc_node_1.CreateTokenCommand({ clientId: ssoToken.clientId, clientSecret: ssoToken.clientSecret, refreshToken: ssoToken.refreshToken, @@ -17598,11 +17517,12 @@ var require_nodeProvider = __commonJS({ }); // ../../../node_modules/@aws-sdk/token-providers/dist-cjs/index.js -var require_dist_cjs48 = __commonJS({ +var require_dist_cjs47 = __commonJS({ "../../../node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_client_sso_oidc_node(), exports); tslib_1.__exportStar(require_fromSso(), exports); tslib_1.__exportStar(require_fromStatic3(), exports); tslib_1.__exportStar(require_nodeProvider(), exports); @@ -17616,10 +17536,9 @@ var require_resolveSSOCredentials = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveSSOCredentials = void 0; var client_sso_1 = require_dist_cjs46(); - var token_providers_1 = require_dist_cjs48(); + var token_providers_1 = require_dist_cjs47(); var property_provider_1 = require_dist_cjs6(); var shared_ini_file_loader_1 = require_dist_cjs38(); - var EXPIRE_WINDOW_MS = 15 * 60 * 1e3; var SHOULD_FAIL_CREDENTIAL_CHAIN = false; var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, profile }) => { let token; @@ -17641,7 +17560,7 @@ var require_resolveSSOCredentials = __commonJS({ throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); } } - if (new Date(token.expiresAt).getTime() - Date.now() <= EXPIRE_WINDOW_MS) { + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); } const { accessToken } = token; @@ -17758,7 +17677,7 @@ var require_types7 = __commonJS({ }); // ../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js -var require_dist_cjs49 = __commonJS({ +var require_dist_cjs48 = __commonJS({ "../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -17776,8 +17695,8 @@ var require_resolveSsoCredentials = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveSsoCredentials = exports.isSsoProfile = void 0; - var credential_provider_sso_1 = require_dist_cjs49(); - var credential_provider_sso_2 = require_dist_cjs49(); + var credential_provider_sso_1 = require_dist_cjs48(); + var credential_provider_sso_2 = require_dist_cjs48(); Object.defineProperty(exports, "isSsoProfile", { enumerable: true, get: function() { return credential_provider_sso_2.isSsoProfile; } }); @@ -17870,7 +17789,7 @@ var require_fromTokenFile = __commonJS({ }); // ../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js -var require_dist_cjs50 = __commonJS({ +var require_dist_cjs49 = __commonJS({ "../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -17886,7 +17805,7 @@ var require_resolveWebIdentityCredentials = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveWebIdentityCredentials = exports.isWebIdentityProfile = void 0; - var credential_provider_web_identity_1 = require_dist_cjs50(); + var credential_provider_web_identity_1 = require_dist_cjs49(); var isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1; exports.isWebIdentityProfile = isWebIdentityProfile; var resolveWebIdentityCredentials = async (profile, options) => (0, credential_provider_web_identity_1.fromTokenFile)({ @@ -17954,7 +17873,7 @@ var require_fromIni = __commonJS({ }); // ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js -var require_dist_cjs51 = __commonJS({ +var require_dist_cjs50 = __commonJS({ "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -17994,10 +17913,10 @@ var require_defaultProvider = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultProvider = void 0; var credential_provider_env_1 = require_dist_cjs37(); - var credential_provider_ini_1 = require_dist_cjs51(); + var credential_provider_ini_1 = require_dist_cjs50(); var credential_provider_process_1 = require_dist_cjs41(); - var credential_provider_sso_1 = require_dist_cjs49(); - var credential_provider_web_identity_1 = require_dist_cjs50(); + var credential_provider_sso_1 = require_dist_cjs48(); + var credential_provider_web_identity_1 = require_dist_cjs49(); var property_provider_1 = require_dist_cjs6(); var shared_ini_file_loader_1 = require_dist_cjs38(); var remoteProvider_1 = require_remoteProvider(); @@ -18009,7 +17928,7 @@ var require_defaultProvider = __commonJS({ }); // ../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js -var require_dist_cjs52 = __commonJS({ +var require_dist_cjs51 = __commonJS({ "../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18019,7 +17938,7 @@ var require_dist_cjs52 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js -var require_ruleset3 = __commonJS({ +var require_ruleset2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18066,13 +17985,13 @@ var require_ruleset3 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js -var require_endpointResolver3 = __commonJS({ +var require_endpointResolver2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultEndpointResolver = void 0; var util_endpoints_1 = require_dist_cjs18(); - var ruleset_1 = require_ruleset3(); + var ruleset_1 = require_ruleset2(); var defaultEndpointResolver = (endpointParams, context = {}) => { return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { endpointParams, @@ -18084,7 +18003,7 @@ var require_endpointResolver3 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js -var require_runtimeConfig_shared3 = __commonJS({ +var require_runtimeConfig_shared2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18093,13 +18012,14 @@ var require_runtimeConfig_shared3 = __commonJS({ var url_parser_1 = require_dist_cjs24(); var util_base64_1 = require_dist_cjs31(); var util_utf8_1 = require_dist_cjs13(); - var endpointResolver_1 = require_endpointResolver3(); + var endpointResolver_1 = require_endpointResolver2(); var getRuntimeConfig = (config) => ({ apiVersion: "2011-06-15", base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), serviceId: config?.serviceId ?? "STS", urlParser: config?.urlParser ?? url_parser_1.parseUrl, @@ -18111,7 +18031,7 @@ var require_runtimeConfig_shared3 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js -var require_runtimeConfig3 = __commonJS({ +var require_runtimeConfig2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18119,7 +18039,7 @@ var require_runtimeConfig3 = __commonJS({ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var package_json_1 = tslib_1.__importDefault(require_package2()); var defaultStsRoleAssumers_1 = require_defaultStsRoleAssumers(); - var credential_provider_node_1 = require_dist_cjs52(); + var credential_provider_node_1 = require_dist_cjs51(); var util_user_agent_node_1 = require_dist_cjs42(); var config_resolver_1 = require_dist_cjs21(); var hash_node_1 = require_dist_cjs43(); @@ -18128,7 +18048,7 @@ var require_runtimeConfig3 = __commonJS({ var node_http_handler_1 = require_dist_cjs33(); var util_body_length_node_1 = require_dist_cjs44(); var util_retry_1 = require_dist_cjs28(); - var runtimeConfig_shared_1 = require_runtimeConfig_shared3(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared2(); var smithy_client_1 = require_dist_cjs35(); var util_defaults_mode_node_1 = require_dist_cjs45(); var smithy_client_2 = require_dist_cjs35(); @@ -18162,6 +18082,28 @@ var require_runtimeConfig3 = __commonJS({ } }); +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js +var require_runtimeExtensions2 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveRuntimeExtensions = void 0; + var smithy_client_1 = require_dist_cjs35(); + var asPartial = (t) => t; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration) + }; + }; + exports.resolveRuntimeExtensions = resolveRuntimeExtensions; + } +}); + // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js var require_STSClient = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js"(exports) { @@ -18182,10 +18124,11 @@ var require_STSClient = __commonJS({ return smithy_client_1.Client; } }); var EndpointParameters_1 = require_EndpointParameters2(); - var runtimeConfig_1 = require_runtimeConfig3(); + var runtimeConfig_1 = require_runtimeConfig2(); + var runtimeExtensions_1 = require_runtimeExtensions2(); var STSClient = class _STSClient extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); @@ -18193,8 +18136,9 @@ var require_STSClient = __commonJS({ 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_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6); - super(_config_7); - this.config = _config_7; + const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); @@ -18587,7 +18531,7 @@ var require_STS = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/index.js -var require_commands3 = __commonJS({ +var require_commands2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18604,7 +18548,7 @@ var require_commands3 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/models/index.js -var require_models3 = __commonJS({ +var require_models2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/models/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18648,7 +18592,7 @@ var require_defaultRoleAssumers = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/index.js -var require_dist_cjs53 = __commonJS({ +var require_dist_cjs52 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18656,8 +18600,8 @@ var require_dist_cjs53 = __commonJS({ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); tslib_1.__exportStar(require_STSClient(), exports); tslib_1.__exportStar(require_STS(), exports); - tslib_1.__exportStar(require_commands3(), exports); - tslib_1.__exportStar(require_models3(), exports); + tslib_1.__exportStar(require_commands2(), exports); + tslib_1.__exportStar(require_models2(), exports); tslib_1.__exportStar(require_defaultRoleAssumers(), exports); var STSServiceException_1 = require_STSServiceException(); Object.defineProperty(exports, "STSServiceException", { enumerable: true, get: function() { @@ -18667,7 +18611,7 @@ var require_dist_cjs53 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/ruleset.js -var require_ruleset4 = __commonJS({ +var require_ruleset3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/ruleset.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18699,13 +18643,13 @@ var require_ruleset4 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/endpointResolver.js -var require_endpointResolver4 = __commonJS({ +var require_endpointResolver3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/endpointResolver.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultEndpointResolver = void 0; var util_endpoints_1 = require_dist_cjs18(); - var ruleset_1 = require_ruleset4(); + var ruleset_1 = require_ruleset3(); var defaultEndpointResolver = (endpointParams, context = {}) => { return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { endpointParams, @@ -18717,7 +18661,7 @@ var require_endpointResolver4 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.shared.js -var require_runtimeConfig_shared4 = __commonJS({ +var require_runtimeConfig_shared3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.shared.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18726,13 +18670,14 @@ var require_runtimeConfig_shared4 = __commonJS({ var url_parser_1 = require_dist_cjs24(); var util_base64_1 = require_dist_cjs31(); var util_utf8_1 = require_dist_cjs13(); - var endpointResolver_1 = require_endpointResolver4(); + var endpointResolver_1 = require_endpointResolver3(); var getRuntimeConfig = (config) => ({ apiVersion: "2016-11-23", base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), serviceId: config?.serviceId ?? "SFN", urlParser: config?.urlParser ?? url_parser_1.parseUrl, @@ -18744,15 +18689,15 @@ var require_runtimeConfig_shared4 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.js -var require_runtimeConfig4 = __commonJS({ +var require_runtimeConfig3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getRuntimeConfig = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var package_json_1 = tslib_1.__importDefault(require_package()); - var client_sts_1 = require_dist_cjs53(); - var credential_provider_node_1 = require_dist_cjs52(); + var client_sts_1 = require_dist_cjs52(); + var credential_provider_node_1 = require_dist_cjs51(); var util_user_agent_node_1 = require_dist_cjs42(); var config_resolver_1 = require_dist_cjs21(); var hash_node_1 = require_dist_cjs43(); @@ -18761,7 +18706,7 @@ var require_runtimeConfig4 = __commonJS({ var node_http_handler_1 = require_dist_cjs33(); var util_body_length_node_1 = require_dist_cjs44(); var util_retry_1 = require_dist_cjs28(); - var runtimeConfig_shared_1 = require_runtimeConfig_shared4(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared3(); var smithy_client_1 = require_dist_cjs35(); var util_defaults_mode_node_1 = require_dist_cjs45(); var smithy_client_2 = require_dist_cjs35(); @@ -18795,6 +18740,28 @@ var require_runtimeConfig4 = __commonJS({ } }); +// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeExtensions.js +var require_runtimeExtensions3 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeExtensions.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveRuntimeExtensions = void 0; + var smithy_client_1 = require_dist_cjs35(); + var asPartial = (t) => t; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration) + }; + }; + exports.resolveRuntimeExtensions = resolveRuntimeExtensions; + } +}); + // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/SFNClient.js var require_SFNClient = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/SFNClient.js"(exports) { @@ -18815,10 +18782,11 @@ var require_SFNClient = __commonJS({ return smithy_client_1.Client; } }); var EndpointParameters_1 = require_EndpointParameters(); - var runtimeConfig_1 = require_runtimeConfig4(); + var runtimeConfig_1 = require_runtimeConfig3(); + var runtimeExtensions_1 = require_runtimeExtensions3(); var SFNClient = class extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); @@ -18826,8 +18794,9 @@ var require_SFNClient = __commonJS({ const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5); const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6); - super(_config_7); - this.config = _config_7; + const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); @@ -18865,7 +18834,7 @@ var require_SFNServiceException = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/models_0.js -var require_models_04 = __commonJS({ +var require_models_03 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/models_0.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -19661,7 +19630,7 @@ var require_Aws_json1_0 = __commonJS({ exports.de_UpdateStateMachineAliasCommand = exports.de_UpdateStateMachineCommand = exports.de_UpdateMapRunCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopExecutionCommand = exports.de_StartSyncExecutionCommand = exports.de_StartExecutionCommand = exports.de_SendTaskSuccessCommand = exports.de_SendTaskHeartbeatCommand = exports.de_SendTaskFailureCommand = exports.de_PublishStateMachineVersionCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStateMachineVersionsCommand = exports.de_ListStateMachinesCommand = exports.de_ListStateMachineAliasesCommand = exports.de_ListMapRunsCommand = exports.de_ListExecutionsCommand = void 0; var protocol_http_1 = require_dist_cjs2(); var smithy_client_1 = require_dist_cjs35(); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var SFNServiceException_1 = require_SFNServiceException(); var se_CreateActivityCommand = async (input, context) => { const headers = sharedHeaders("CreateActivity"); @@ -22024,7 +21993,7 @@ var require_CreateStateMachineAliasCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var CreateStateMachineAliasCommand = class _CreateStateMachineAliasCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22079,7 +22048,7 @@ var require_CreateStateMachineCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var CreateStateMachineCommand = class _CreateStateMachineCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22404,7 +22373,7 @@ var require_DescribeExecutionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var DescribeExecutionCommand = class _DescribeExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22513,7 +22482,7 @@ var require_DescribeStateMachineAliasCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var DescribeStateMachineAliasCommand = class _DescribeStateMachineAliasCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22568,7 +22537,7 @@ var require_DescribeStateMachineCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var DescribeStateMachineCommand = class _DescribeStateMachineCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22623,7 +22592,7 @@ var require_DescribeStateMachineForExecutionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var DescribeStateMachineForExecutionCommand = class _DescribeStateMachineForExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22678,7 +22647,7 @@ var require_GetActivityTaskCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var GetActivityTaskCommand = class _GetActivityTaskCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22733,7 +22702,7 @@ var require_GetExecutionHistoryCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var GetExecutionHistoryCommand = class _GetExecutionHistoryCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23166,7 +23135,7 @@ var require_PublishStateMachineVersionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var PublishStateMachineVersionCommand = class _PublishStateMachineVersionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23221,7 +23190,7 @@ var require_SendTaskFailureCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var SendTaskFailureCommand = class _SendTaskFailureCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23330,7 +23299,7 @@ var require_SendTaskSuccessCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var SendTaskSuccessCommand = class _SendTaskSuccessCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23385,7 +23354,7 @@ var require_StartExecutionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var StartExecutionCommand = class _StartExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23440,7 +23409,7 @@ var require_StartSyncExecutionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var StartSyncExecutionCommand = class _StartSyncExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23495,7 +23464,7 @@ var require_StopExecutionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var StopExecutionCommand = class _StopExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23712,7 +23681,7 @@ var require_UpdateStateMachineAliasCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var UpdateStateMachineAliasCommand = class _UpdateStateMachineAliasCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23767,7 +23736,7 @@ var require_UpdateStateMachineCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var UpdateStateMachineCommand = class _UpdateStateMachineCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23896,7 +23865,7 @@ var require_SFN = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/index.js -var require_commands4 = __commonJS({ +var require_commands3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -24132,17 +24101,17 @@ var require_pagination4 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/index.js -var require_models4 = __commonJS({ +var require_models3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_models_04(), exports); + tslib_1.__exportStar(require_models_03(), exports); } }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/index.js -var require_dist_cjs54 = __commonJS({ +var require_dist_cjs53 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -24150,9 +24119,9 @@ var require_dist_cjs54 = __commonJS({ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); tslib_1.__exportStar(require_SFNClient(), exports); tslib_1.__exportStar(require_SFN(), exports); - tslib_1.__exportStar(require_commands4(), exports); + tslib_1.__exportStar(require_commands3(), exports); tslib_1.__exportStar(require_pagination4(), exports); - tslib_1.__exportStar(require_models4(), exports); + tslib_1.__exportStar(require_models3(), exports); var SFNServiceException_1 = require_SFNServiceException(); Object.defineProperty(exports, "SFNServiceException", { enumerable: true, get: function() { return SFNServiceException_1.SFNServiceException; @@ -30615,9 +30584,6 @@ var require_lib4 = __commonJS({ if (typeof agent === "function") { agent = agent(parsedURL); } - if (!headers.has("Connection") && !agent) { - headers.set("Connection", "close"); - } return Object.assign({}, parsedURL, { method: request2.method, headers: exportNodeCompatibleHeaders(headers), @@ -30889,6 +30855,7 @@ var require_lib4 = __commonJS({ exports.Request = Request; exports.Response = Response2; exports.FetchError = FetchError; + exports.AbortError = AbortError; } }); @@ -31424,7 +31391,7 @@ var import_helpers_internal = __toESM(require_helpers_internal()); // lib/assertions/providers/lambda-handler/base.ts var https = __toESM(require("https")); var url = __toESM(require("url")); -var import_client_sfn = __toESM(require_dist_cjs54()); +var import_client_sfn = __toESM(require_dist_cjs53()); var CustomResourceHandler = class { constructor(event, context) { this.event = event; diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/cdk.out index 560dae10d018f..2313ab5436501 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"33.0.0"} \ No newline at end of file +{"version":"34.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/integ.json index acc07d901892a..42838022d35ec 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "testCases": { "JsResolverIntegTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/manifest.json index 9d04732a21cc9..6d1ed6befdc9d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "artifacts": { "AppSyncJsResolverTestStack.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}/39bbb561d1400a68adab4e3b7ca0a4b5af2936645d1bd8ce29d72a4e7985c830.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0351d32f030d2f7023c76f5a073f44cdcf81c0ddc63dae64a49d9d33269539ee.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -184,7 +184,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}/9b28bfafd748e7836cc59ca3e1167ed0048cf831b6df7efa11648ffa3c43e10e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/763d169d10d22f0a01c5cab6482fd43062c1c41461ccb9546f484d0d8a4239bd.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/tree.json index 477170678a60b..568bafbc35828 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/tree.json @@ -519,7 +519,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "DynamoTable": { @@ -803,7 +803,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "BootstrapVersion": { @@ -841,7 +841,7 @@ "path": "JsResolverIntegTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "DeployAssert": { @@ -861,7 +861,7 @@ "path": "JsResolverIntegTest/DefaultTest/DeployAssert/LambdaInvokeb55e453397dded0a19101717f7183064/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, @@ -941,7 +941,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "AwsApiCallDynamoDBgetItem3bcce89c3400f7c98ac0aa1a95192cda": { @@ -957,7 +957,7 @@ "path": "JsResolverIntegTest/DefaultTest/DeployAssert/AwsApiCallDynamoDBgetItem3bcce89c3400f7c98ac0aa1a95192cda/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, @@ -1037,7 +1037,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/AppSyncIntegLogRetention.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/AppSyncIntegLogRetention.assets.json index 966b7fd9aa8a1..3700e418d00f0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/AppSyncIntegLogRetention.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/AppSyncIntegLogRetention.assets.json @@ -1,20 +1,20 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { - "2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e": { + "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0": { "source": { - "path": "asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e", + "path": "asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e.zip", + "objectKey": "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "e7c04bfd0ba12d51c13f271474996399d040fed6d6791d65ac6b25ee347d7448": { + "b2c44470595b4a4fc5e8be9f7fc467dc2ca5e1c86bfdee79389a6196b2077a24": { "source": { "path": "AppSyncIntegLogRetention.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e7c04bfd0ba12d51c13f271474996399d040fed6d6791d65ac6b25ee347d7448.json", + "objectKey": "b2c44470595b4a4fc5e8be9f7fc467dc2ca5e1c86bfdee79389a6196b2077a24.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-appsync/test/integ.log-retention.js.snapshot/AppSyncIntegLogRetention.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/AppSyncIntegLogRetention.template.json index 64d4caedcc643..bfb5e6e6686e3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/AppSyncIntegLogRetention.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/AppSyncIntegLogRetention.template.json @@ -159,11 +159,12 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e.zip" + "S3Key": "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0.zip" }, "Role": { "Fn::GetAtt": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json index f4a44ea73d11d..dfd97a2f9a851 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json @@ -1,20 +1,20 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { - "18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f": { + "c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce": { "source": { - "path": "asset.18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.bundle", + "path": "asset.c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.zip", + "objectKey": "c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "869a65672181c0e31d21022d453c80206a69580b01601b1985f5e4350eedf4d3": { + "6e888267dce80479493591bf1ff3b6c6bb9a2acc1b1942e0c50a60342478f132": { "source": { "path": "IntegDefaultTestDeployAssert4E6713E1.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "869a65672181c0e31d21022d453c80206a69580b01601b1985f5e4350eedf4d3.json", + "objectKey": "6e888267dce80479493591bf1ff3b6c6bb9a2acc1b1942e0c50a60342478f132.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-appsync/test/integ.log-retention.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json index 5c50a169bf0f1..6f969fd8d176f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json @@ -38,7 +38,7 @@ } }, "flattenResponse": "false", - "salt": "1691069905434" + "salt": "1693924787275" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -92,7 +92,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.zip" + "S3Key": "c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.zip" }, "Timeout": 120, "Handler": "index.handler", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.js deleted file mode 100644 index 2bf93c30071a1..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = void 0; -/* eslint-disable no-console */ -// eslint-disable-next-line import/no-extraneous-dependencies -const Logs = require("@aws-sdk/client-cloudwatch-logs"); -/** - * Creates a log group and doesn't throw if it exists. - */ -async function createLogGroupSafe(logGroupName, client, withDelay) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.CreateLogGroupCommand(params); - await client.send(command); - } - catch (error) { - if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { - // The log group is already created by the lambda execution - return; - } - throw error; - } - }); -} -/** - * Deletes a log group and doesn't throw if it does not exist. - */ -async function deleteLogGroup(logGroupName, client, withDelay) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.DeleteLogGroupCommand(params); - await client.send(command); - } - catch (error) { - if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { - // The log group doesn't exist - return; - } - throw error; - } - }); -} -/** - * Puts or deletes a retention policy on a log group. - */ -async function setRetentionPolicy(logGroupName, client, withDelay, retentionInDays) { - await withDelay(async () => { - if (!retentionInDays) { - const params = { logGroupName }; - const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); - await client.send(deleteCommand); - } - else { - const params = { logGroupName, retentionInDays }; - const putCommand = new Logs.PutRetentionPolicyCommand(params); - await client.send(putCommand); - } - }); -} -async function handler(event, context) { - try { - console.log(JSON.stringify({ ...event, ResponseURL: '...' })); - // The target log group - const logGroupName = event.ResourceProperties.LogGroupName; - // The region of the target log group - const logGroupRegion = event.ResourceProperties.LogGroupRegion; - // Parse to AWS SDK retry options - const withDelay = makeWithDelay(parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries)); - const sdkConfig = { - logger: console, - region: logGroupRegion, - }; - const client = new Logs.CloudWatchLogsClient(sdkConfig); - if (event.RequestType === 'Create' || event.RequestType === 'Update') { - // Act on the target log group - await createLogGroupSafe(logGroupName, client, withDelay); - await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); - // Configure the Log Group for the Custom Resource function itself - if (event.RequestType === 'Create') { - const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ - logger: console, - region: process.env.AWS_REGION, - }); - // Set a retention policy of 1 day on the logs of this very function. - // Due to the async nature of the log group creation, the log group for this function might - // still be not created yet at this point. Therefore we attempt to create it. - // In case it is being created, createLogGroupSafe will handle the conflict. - await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); - // If createLogGroupSafe fails, the log group is not created even after multiple attempts. - // In this case we have nothing to set the retention policy on but an exception will skip - // the next line. - await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); - } - } - // When the requestType is delete, delete the log group if the removal policy is delete - if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { - await deleteLogGroup(logGroupName, client, withDelay); - // else retain the log group - } - await respond('SUCCESS', 'OK', logGroupName); - } - catch (e) { - console.log(e); - await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); - } - function respond(responseStatus, reason, physicalResourceId) { - const responseBody = JSON.stringify({ - Status: responseStatus, - Reason: reason, - PhysicalResourceId: physicalResourceId, - StackId: event.StackId, - RequestId: event.RequestId, - LogicalResourceId: event.LogicalResourceId, - Data: { - // Add log group name as part of the response so that it's available via Fn::GetAtt - LogGroupName: event.ResourceProperties.LogGroupName, - }, - }); - console.log('Responding', responseBody); - // eslint-disable-next-line @typescript-eslint/no-require-imports - const parsedUrl = require('url').parse(event.ResponseURL); - const requestOptions = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { - 'content-type': '', - 'content-length': Buffer.byteLength(responseBody, 'utf8'), - }, - }; - return new Promise((resolve, reject) => { - try { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const request = require('https').request(requestOptions, resolve); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); - } -} -exports.handler = handler; -function parseIntOptional(value, base = 10) { - if (value === undefined) { - return undefined; - } - return parseInt(value, base); -} -function makeWithDelay(maxRetries = 10, delay = 100) { - // If we try to update the log group, then due to the async nature of - // Lambda logging there could be a race condition when the same log group is - // already being created by the lambda execution. This can sometime result in - // an error "OperationAbortedException: A conflicting operation is currently - // in progress...Please try again." - // To avoid an error, we do as requested and try again. - return async (block) => { - do { - try { - return await block(); - } - catch (error) { - if (error instanceof Logs.OperationAbortedException || error.name === 'OperationAbortedException') { - if (maxRetries > 0) { - maxRetries--; - await new Promise(resolve => setTimeout(resolve, delay)); - continue; - } - else { - // The log group is still being changed by another execution but we are out of retries - throw new Error('Out of attempts to change log group'); - } - } - throw error; - } - } while (true); // exit happens on retry count check - }; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNk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UgKHRydWUpOyAvLyBleGl0IGhhcHBlbnMgb24gcmV0cnkgY291bnQgY2hlY2tcbiAgfTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.ts deleted file mode 100644 index 4ae0dd69afdcd..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.ts +++ /dev/null @@ -1,214 +0,0 @@ -/* eslint-disable no-console */ -// eslint-disable-next-line import/no-extraneous-dependencies -import * as Logs from '@aws-sdk/client-cloudwatch-logs'; - -interface LogRetentionEvent extends Omit { - ResourceProperties: { - ServiceToken: string; - LogGroupName: string; - LogGroupRegion?: string; - RetentionInDays?: string; - SdkRetry?: { - maxRetries?: string; - }; - RemovalPolicy?: string - }; -} - -/** - * Creates a log group and doesn't throw if it exists. - */ -async function createLogGroupSafe(logGroupName: string, client: Logs.CloudWatchLogsClient, withDelay: (block: () => Promise) => Promise) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.CreateLogGroupCommand(params); - await client.send(command); - - } catch (error: any) { - if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { - // The log group is already created by the lambda execution - return; - } - - throw error; - } - }); -} - -/** - * Deletes a log group and doesn't throw if it does not exist. - */ -async function deleteLogGroup(logGroupName: string, client: Logs.CloudWatchLogsClient, withDelay: (block: () => Promise) => Promise) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.DeleteLogGroupCommand(params); - await client.send(command); - - } catch (error: any) { - if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { - // The log group doesn't exist - return; - } - - throw error; - } - }); -} - -/** - * Puts or deletes a retention policy on a log group. - */ -async function setRetentionPolicy( - logGroupName: string, - client: Logs.CloudWatchLogsClient, - withDelay: (block: () => Promise) => Promise, - retentionInDays?: number, -) { - - await withDelay(async () => { - if (!retentionInDays) { - const params = { logGroupName }; - const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); - await client.send(deleteCommand); - } else { - const params = { logGroupName, retentionInDays }; - const putCommand = new Logs.PutRetentionPolicyCommand(params); - await client.send(putCommand); - } - }); -} - -export async function handler(event: LogRetentionEvent, context: AWSLambda.Context) { - try { - console.log(JSON.stringify({ ...event, ResponseURL: '...' })); - - // The target log group - const logGroupName = event.ResourceProperties.LogGroupName; - - // The region of the target log group - const logGroupRegion = event.ResourceProperties.LogGroupRegion; - - // Parse to AWS SDK retry options - const withDelay = makeWithDelay(parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries)); - - const sdkConfig: Logs.CloudWatchLogsClientConfig = { - logger: console, - region: logGroupRegion, - }; - const client = new Logs.CloudWatchLogsClient(sdkConfig); - - if (event.RequestType === 'Create' || event.RequestType === 'Update') { - // Act on the target log group - await createLogGroupSafe(logGroupName, client, withDelay); - await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); - - // Configure the Log Group for the Custom Resource function itself - if (event.RequestType === 'Create') { - const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ - logger: console, - region: process.env.AWS_REGION, - }); - // Set a retention policy of 1 day on the logs of this very function. - // Due to the async nature of the log group creation, the log group for this function might - // still be not created yet at this point. Therefore we attempt to create it. - // In case it is being created, createLogGroupSafe will handle the conflict. - await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); - // If createLogGroupSafe fails, the log group is not created even after multiple attempts. - // In this case we have nothing to set the retention policy on but an exception will skip - // the next line. - await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); - } - } - - // When the requestType is delete, delete the log group if the removal policy is delete - if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { - await deleteLogGroup(logGroupName, client, withDelay); - // else retain the log group - } - - await respond('SUCCESS', 'OK', logGroupName); - } catch (e: any) { - console.log(e); - await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); - } - - function respond(responseStatus: string, reason: string, physicalResourceId: string) { - const responseBody = JSON.stringify({ - Status: responseStatus, - Reason: reason, - PhysicalResourceId: physicalResourceId, - StackId: event.StackId, - RequestId: event.RequestId, - LogicalResourceId: event.LogicalResourceId, - Data: { - // Add log group name as part of the response so that it's available via Fn::GetAtt - LogGroupName: event.ResourceProperties.LogGroupName, - }, - }); - - console.log('Responding', responseBody); - - // eslint-disable-next-line @typescript-eslint/no-require-imports - const parsedUrl = require('url').parse(event.ResponseURL); - const requestOptions = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { - 'content-type': '', - 'content-length': Buffer.byteLength(responseBody, 'utf8'), - }, - }; - - return new Promise((resolve, reject) => { - try { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const request = require('https').request(requestOptions, resolve); - request.on('error', reject); - request.write(responseBody); - request.end(); - } catch (e) { - reject(e); - } - }); - } -} - -function parseIntOptional(value?: string, base = 10): number | undefined { - if (value === undefined) { - return undefined; - } - - return parseInt(value, base); -} - -function makeWithDelay(maxRetries: number = 10, delay: number = 100): (block: () => Promise) => Promise { - // If we try to update the log group, then due to the async nature of - // Lambda logging there could be a race condition when the same log group is - // already being created by the lambda execution. This can sometime result in - // an error "OperationAbortedException: A conflicting operation is currently - // in progress...Please try again." - // To avoid an error, we do as requested and try again. - - return async (block: () => Promise) => { - do { - try { - return await block(); - } catch (error: any) { - if (error instanceof Logs.OperationAbortedException || error.name === 'OperationAbortedException') { - if (maxRetries > 0) { - maxRetries--; - await new Promise(resolve => setTimeout(resolve, delay)); - continue; - } else { - // The log group is still being changed by another execution but we are out of retries - throw new Error('Out of attempts to change log group'); - } - } - throw error; - } - } while (true); // exit happens on retry count check - }; -} diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js new file mode 100644 index 0000000000000..8d4f5cf13f88d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js @@ -0,0 +1,192 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +/* eslint-disable no-console */ +// eslint-disable-next-line import/no-extraneous-dependencies +const Logs = require("@aws-sdk/client-cloudwatch-logs"); +/** + * Creates a log group and doesn't throw if it exists. + */ +async function createLogGroupSafe(logGroupName, client, withDelay) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.CreateLogGroupCommand(params); + await client.send(command); + } + catch (error) { + if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { + // The log group is already created by the lambda execution + return; + } + throw error; + } + }); +} +/** + * Deletes a log group and doesn't throw if it does not exist. + */ +async function deleteLogGroup(logGroupName, client, withDelay) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.DeleteLogGroupCommand(params); + await client.send(command); + } + catch (error) { + if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { + // The log group doesn't exist + return; + } + throw error; + } + }); +} +/** + * Puts or deletes a retention policy on a log group. + */ +async function setRetentionPolicy(logGroupName, client, withDelay, retentionInDays) { + await withDelay(async () => { + if (!retentionInDays) { + const params = { logGroupName }; + const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); + await client.send(deleteCommand); + } + else { + const params = { logGroupName, retentionInDays }; + const putCommand = new Logs.PutRetentionPolicyCommand(params); + await client.send(putCommand); + } + }); +} +async function handler(event, context) { + try { + console.log(JSON.stringify({ ...event, ResponseURL: '...' })); + // The target log group + const logGroupName = event.ResourceProperties.LogGroupName; + // The region of the target log group + const logGroupRegion = event.ResourceProperties.LogGroupRegion; + // Parse to AWS SDK retry options + const maxRetries = parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries) ?? 5; + const withDelay = makeWithDelay(maxRetries); + const sdkConfig = { + logger: console, + region: logGroupRegion, + maxAttempts: Math.max(5, maxRetries), // Use a minimum for SDK level retries, because it might include retryable failures that withDelay isn't checking for + }; + const client = new Logs.CloudWatchLogsClient(sdkConfig); + if (event.RequestType === 'Create' || event.RequestType === 'Update') { + // Act on the target log group + await createLogGroupSafe(logGroupName, client, withDelay); + await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); + // Configure the Log Group for the Custom Resource function itself + if (event.RequestType === 'Create') { + const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ + logger: console, + region: process.env.AWS_REGION, + }); + // Set a retention policy of 1 day on the logs of this very function. + // Due to the async nature of the log group creation, the log group for this function might + // still be not created yet at this point. Therefore we attempt to create it. + // In case it is being created, createLogGroupSafe will handle the conflict. + await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); + // If createLogGroupSafe fails, the log group is not created even after multiple attempts. + // In this case we have nothing to set the retention policy on but an exception will skip + // the next line. + await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); + } + } + // When the requestType is delete, delete the log group if the removal policy is delete + if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { + await deleteLogGroup(logGroupName, client, withDelay); + // else retain the log group + } + await respond('SUCCESS', 'OK', logGroupName); + } + catch (e) { + console.log(e); + await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); + } + function respond(responseStatus, reason, physicalResourceId) { + const responseBody = JSON.stringify({ + Status: responseStatus, + Reason: reason, + PhysicalResourceId: physicalResourceId, + StackId: event.StackId, + RequestId: event.RequestId, + LogicalResourceId: event.LogicalResourceId, + Data: { + // Add log group name as part of the response so that it's available via Fn::GetAtt + LogGroupName: event.ResourceProperties.LogGroupName, + }, + }); + console.log('Responding', responseBody); + // eslint-disable-next-line @typescript-eslint/no-require-imports + const parsedUrl = require('url').parse(event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { + 'content-type': '', + 'content-length': Buffer.byteLength(responseBody, 'utf8'), + }, + }; + return new Promise((resolve, reject) => { + try { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const request = require('https').request(requestOptions, resolve); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); + } +} +exports.handler = handler; +function parseIntOptional(value, base = 10) { + if (value === undefined) { + return undefined; + } + return parseInt(value, base); +} +function makeWithDelay(maxRetries, delayBase = 100, delayCap = 10 * 1000) { + // If we try to update the log group, then due to the async nature of + // Lambda logging there could be a race condition when the same log group is + // already being created by the lambda execution. This can sometime result in + // an error "OperationAbortedException: A conflicting operation is currently + // in progress...Please try again." + // To avoid an error, we do as requested and try again. + return async (block) => { + let attempts = 0; + do { + try { + return await block(); + } + catch (error) { + if (error instanceof Logs.OperationAbortedException + || error.name === 'OperationAbortedException' + || error.name === 'ThrottlingException' // There is no class to check with instanceof, see https://github.com/aws/aws-sdk-js-v3/issues/5140 + ) { + if (attempts < maxRetries) { + attempts++; + await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); + continue; + } + else { + // The log group is still being changed by another execution but we are out of retries + throw new Error('Out of attempts to change log group'); + } + } + throw error; + } + } while (true); // exit happens on retry count check + }; +} +function calculateDelay(attempt, base, cap) { + return Math.round(Math.random() * Math.min(cap, base * 2 ** attempt)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNkRBQTZEO0FBQzdELHdEQUF3RDtBQWV4RDs7R0FFRztBQUNILEtBQUssVUFBVSxrQkFBa0IsQ0FBQyxZQUFvQixFQUFFLE1BQWlDLEVBQUUsU0FBd0Q7SUFDakosTUFBTSxTQUFTLENBQUMsS0FBSyxJQUFJLEVBQUU7UUFDekIsSUFBSTtZQUNGLE1BQU0sTUFBTSxHQUFHLEVBQUUsWUFBWSxFQUFFLENBQUM7WUFDaEMsTUFBTSxPQUFPLEdBQUcsSUFBSSxJQUFJLENBQUMscUJBQXFCLENBQUMsTUFBTSxDQUFDLENBQUM7WUFDdkQsTUFBTSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDO1NBRTVCO1FBQUMsT0FBTyxLQUFVLEVBQUU7WUFDbkIsSUFBSSxLQUFLLFlBQVksSUFBSSxDQUFDLDhCQUE4QixJQUFJLEtBQUssQ0FBQyxJQUFJLEtBQ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diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts similarity index 92% rename from packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts index eea89d75c8795..88843fe3fa016 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.js-resolver.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts @@ -91,11 +91,13 @@ export async function handler(event: LogRetentionEvent, context: AWSLambda.Conte const logGroupRegion = event.ResourceProperties.LogGroupRegion; // Parse to AWS SDK retry options - const withDelay = makeWithDelay(parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries)); + const maxRetries = parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries) ?? 5; + const withDelay = makeWithDelay(maxRetries); const sdkConfig: Logs.CloudWatchLogsClientConfig = { logger: console, region: logGroupRegion, + maxAttempts: Math.max(5, maxRetries), // Use a minimum for SDK level retries, because it might include retryable failures that withDelay isn't checking for }; const client = new Logs.CloudWatchLogsClient(sdkConfig); @@ -185,7 +187,7 @@ function parseIntOptional(value?: string, base = 10): number | undefined { } function makeWithDelay( - maxRetries: number = 5, + maxRetries: number, delayBase: number = 100, delayCap = 10 * 1000, // 10s ): (block: () => Promise) => Promise { @@ -202,7 +204,11 @@ function makeWithDelay( try { return await block(); } catch (error: any) { - if (error instanceof Logs.OperationAbortedException || error.name === 'OperationAbortedException') { + if ( + error instanceof Logs.OperationAbortedException + || error.name === 'OperationAbortedException' + || error.name === 'ThrottlingException' // There is no class to check with instanceof, see https://github.com/aws/aws-sdk-js-v3/issues/5140 + ) { if (attempts < maxRetries ) { attempts++; await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.bundle/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.bundle/index.js similarity index 98% rename from packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.bundle/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.bundle/index.js index b553f2182f8e2..c90588a2c6499 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.18f77fb224555ccad15f9c2e0f71ae6930fc011792c4f74ec74daaa2bbd9a33f.bundle/index.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/asset.c7f4a8ca56d10961cf5e40d181faddf14f2ea8b39c5d65c7b61a366b17c7a2ce.bundle/index.js @@ -1539,6 +1539,102 @@ var require_eventStream = __commonJS({ } }); +// ../../../node_modules/@smithy/types/dist-cjs/extensions/checksum.js +var require_checksum2 = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/extensions/checksum.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveChecksumRuntimeConfig = exports.getChecksumConfiguration = exports.AlgorithmId = void 0; + var AlgorithmId; + (function(AlgorithmId2) { + AlgorithmId2["MD5"] = "md5"; + AlgorithmId2["CRC32"] = "crc32"; + AlgorithmId2["CRC32C"] = "crc32c"; + AlgorithmId2["SHA1"] = "sha1"; + AlgorithmId2["SHA256"] = "sha256"; + })(AlgorithmId = exports.AlgorithmId || (exports.AlgorithmId = {})); + var getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== void 0) { + checksumAlgorithms.push({ + algorithmId: () => AlgorithmId.SHA256, + checksumConstructor: () => runtimeConfig.sha256 + }); + } + if (runtimeConfig.md5 != void 0) { + checksumAlgorithms.push({ + algorithmId: () => AlgorithmId.MD5, + checksumConstructor: () => runtimeConfig.md5 + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + } + }; + }; + exports.getChecksumConfiguration = getChecksumConfiguration; + var resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }; + exports.resolveChecksumRuntimeConfig = resolveChecksumRuntimeConfig; + } +}); + +// ../../../node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js +var require_defaultClientConfiguration = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveDefaultRuntimeConfig = exports.getDefaultClientConfiguration = void 0; + var checksum_1 = require_checksum2(); + var getDefaultClientConfiguration = (runtimeConfig) => { + return { + ...(0, checksum_1.getChecksumConfiguration)(runtimeConfig) + }; + }; + exports.getDefaultClientConfiguration = getDefaultClientConfiguration; + var resolveDefaultRuntimeConfig = (config) => { + return { + ...(0, checksum_1.resolveChecksumRuntimeConfig)(config) + }; + }; + exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; + } +}); + +// ../../../node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js +var require_defaultExtensionConfiguration = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + } +}); + +// ../../../node_modules/@smithy/types/dist-cjs/extensions/index.js +var require_extensions = __commonJS({ + "../../../node_modules/@smithy/types/dist-cjs/extensions/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AlgorithmId = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_defaultClientConfiguration(), exports); + tslib_1.__exportStar(require_defaultExtensionConfiguration(), exports); + var checksum_1 = require_checksum2(); + Object.defineProperty(exports, "AlgorithmId", { enumerable: true, get: function() { + return checksum_1.AlgorithmId; + } }); + } +}); + // ../../../node_modules/@smithy/types/dist-cjs/http.js var require_http = __commonJS({ "../../../node_modules/@smithy/types/dist-cjs/http.js"(exports) { @@ -1757,6 +1853,7 @@ var require_dist_cjs = __commonJS({ tslib_1.__exportStar(require_endpoint(), exports); tslib_1.__exportStar(require_endpoints(), exports); tslib_1.__exportStar(require_eventStream(), exports); + tslib_1.__exportStar(require_extensions(), exports); tslib_1.__exportStar(require_http(), exports); tslib_1.__exportStar(require_identity2(), exports); tslib_1.__exportStar(require_logger(), exports); @@ -3997,7 +4094,7 @@ var require_getCanonicalQuery = __commonJS({ if (typeof value === "string") { serialized[key] = `${(0, util_uri_escape_1.escapeUri)(key)}=${(0, util_uri_escape_1.escapeUri)(value)}`; } else if (Array.isArray(value)) { - serialized[key] = value.slice(0).sort().reduce((encoded, value2) => encoded.concat([`${(0, util_uri_escape_1.escapeUri)(key)}=${(0, util_uri_escape_1.escapeUri)(value2)}`]), []).join("&"); + serialized[key] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${(0, util_uri_escape_1.escapeUri)(key)}=${(0, util_uri_escape_1.escapeUri)(value2)}`]), []).sort().join("&"); } } return keys.map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); @@ -4699,6 +4796,9 @@ var require_partitions = __commonJS({ "eu-west-3": { description: "Europe (Paris)" }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, "me-central-1": { description: "Middle East (UAE)" }, @@ -5222,7 +5322,7 @@ var require_blob_types = __commonJS({ }); // ../../../node_modules/@aws-sdk/types/dist-cjs/checksum.js -var require_checksum2 = __commonJS({ +var require_checksum3 = __commonJS({ "../../../node_modules/@aws-sdk/types/dist-cjs/checksum.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -5516,7 +5616,7 @@ var require_dist_cjs17 = __commonJS({ tslib_1.__exportStar(require_abort2(), exports); tslib_1.__exportStar(require_auth2(), exports); tslib_1.__exportStar(require_blob_types(), exports); - tslib_1.__exportStar(require_checksum2(), exports); + tslib_1.__exportStar(require_checksum3(), exports); tslib_1.__exportStar(require_client2(), exports); tslib_1.__exportStar(require_command2(), exports); tslib_1.__exportStar(require_connection2(), exports); @@ -10041,6 +10141,85 @@ var require_emitWarningIfUnsupportedVersion = __commonJS({ } }); +// ../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/checksum.js +var require_checksum4 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/checksum.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveChecksumRuntimeConfig = exports.getChecksumConfiguration = exports.AlgorithmId = void 0; + var types_1 = require_dist_cjs(); + Object.defineProperty(exports, "AlgorithmId", { enumerable: true, get: function() { + return types_1.AlgorithmId; + } }); + var getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== void 0) { + checksumAlgorithms.push({ + algorithmId: () => types_1.AlgorithmId.SHA256, + checksumConstructor: () => runtimeConfig.sha256 + }); + } + if (runtimeConfig.md5 != void 0) { + checksumAlgorithms.push({ + algorithmId: () => types_1.AlgorithmId.MD5, + checksumConstructor: () => runtimeConfig.md5 + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + } + }; + }; + exports.getChecksumConfiguration = getChecksumConfiguration; + var resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }; + exports.resolveChecksumRuntimeConfig = resolveChecksumRuntimeConfig; + } +}); + +// ../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/defaultExtensionConfiguration.js +var require_defaultExtensionConfiguration2 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/defaultExtensionConfiguration.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveDefaultRuntimeConfig = exports.getDefaultClientConfiguration = exports.getDefaultExtensionConfiguration = void 0; + var checksum_1 = require_checksum4(); + var getDefaultExtensionConfiguration = (runtimeConfig) => { + return { + ...(0, checksum_1.getChecksumConfiguration)(runtimeConfig) + }; + }; + exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration; + exports.getDefaultClientConfiguration = exports.getDefaultExtensionConfiguration; + var resolveDefaultRuntimeConfig = (config) => { + return { + ...(0, checksum_1.resolveChecksumRuntimeConfig)(config) + }; + }; + exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; + } +}); + +// ../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/index.js +var require_extensions2 = __commonJS({ + "../../../node_modules/@smithy/smithy-client/dist-cjs/extensions/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_defaultExtensionConfiguration2(), exports); + } +}); + // ../../../node_modules/@smithy/smithy-client/dist-cjs/extended-encode-uri-component.js var require_extended_encode_uri_component = __commonJS({ "../../../node_modules/@smithy/smithy-client/dist-cjs/extended-encode-uri-component.js"(exports) { @@ -10356,6 +10535,7 @@ var require_dist_cjs35 = __commonJS({ tslib_1.__exportStar(require_default_error_handler(), exports); tslib_1.__exportStar(require_defaults_mode(), exports); tslib_1.__exportStar(require_emitWarningIfUnsupportedVersion(), exports); + tslib_1.__exportStar(require_extensions2(), exports); tslib_1.__exportStar(require_exceptions(), exports); tslib_1.__exportStar(require_extended_encode_uri_component(), exports); tslib_1.__exportStar(require_get_array_if_single_item(), exports); @@ -10394,7 +10574,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.382.0", + version: "3.398.0", scripts: { build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", "build:cjs": "tsc -p tsconfig.cjs.json", @@ -10414,37 +10594,37 @@ var require_package = __commonJS({ 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.398.0", + "@aws-sdk/credential-provider-node": "3.398.0", + "@aws-sdk/middleware-host-header": "3.398.0", + "@aws-sdk/middleware-logger": "3.398.0", + "@aws-sdk/middleware-recursion-detection": "3.398.0", + "@aws-sdk/middleware-signing": "3.398.0", + "@aws-sdk/middleware-user-agent": "3.398.0", + "@aws-sdk/types": "3.398.0", + "@aws-sdk/util-endpoints": "3.398.0", + "@aws-sdk/util-user-agent-browser": "3.398.0", + "@aws-sdk/util-user-agent-node": "3.398.0", + "@smithy/config-resolver": "^2.0.5", + "@smithy/fetch-http-handler": "^2.0.5", + "@smithy/hash-node": "^2.0.5", + "@smithy/invalid-dependency": "^2.0.5", + "@smithy/middleware-content-length": "^2.0.5", + "@smithy/middleware-endpoint": "^2.0.5", + "@smithy/middleware-retry": "^2.0.5", + "@smithy/middleware-serde": "^2.0.5", "@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.5", + "@smithy/node-http-handler": "^2.0.5", + "@smithy/protocol-http": "^2.0.5", + "@smithy/smithy-client": "^2.0.5", + "@smithy/types": "^2.2.2", + "@smithy/url-parser": "^2.0.5", "@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-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.5", + "@smithy/util-defaults-mode-node": "^2.0.5", "@smithy/util-retry": "^2.0.0", "@smithy/util-utf8": "^2.0.0", tslib: "^2.5.0" @@ -10533,7 +10713,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.382.0", + version: "3.398.0", scripts: { build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", "build:cjs": "tsc -p tsconfig.cjs.json", @@ -10555,37 +10735,37 @@ 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.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.398.0", + "@aws-sdk/middleware-host-header": "3.398.0", + "@aws-sdk/middleware-logger": "3.398.0", + "@aws-sdk/middleware-recursion-detection": "3.398.0", + "@aws-sdk/middleware-sdk-sts": "3.398.0", + "@aws-sdk/middleware-signing": "3.398.0", + "@aws-sdk/middleware-user-agent": "3.398.0", + "@aws-sdk/types": "3.398.0", + "@aws-sdk/util-endpoints": "3.398.0", + "@aws-sdk/util-user-agent-browser": "3.398.0", + "@aws-sdk/util-user-agent-node": "3.398.0", + "@smithy/config-resolver": "^2.0.5", + "@smithy/fetch-http-handler": "^2.0.5", + "@smithy/hash-node": "^2.0.5", + "@smithy/invalid-dependency": "^2.0.5", + "@smithy/middleware-content-length": "^2.0.5", + "@smithy/middleware-endpoint": "^2.0.5", + "@smithy/middleware-retry": "^2.0.5", + "@smithy/middleware-serde": "^2.0.5", "@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.5", + "@smithy/node-http-handler": "^2.0.5", + "@smithy/protocol-http": "^2.0.5", + "@smithy/smithy-client": "^2.0.5", + "@smithy/types": "^2.2.2", + "@smithy/url-parser": "^2.0.5", "@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-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.5", + "@smithy/util-defaults-mode-node": "^2.0.5", "@smithy/util-retry": "^2.0.0", "@smithy/util-utf8": "^2.0.0", "fast-xml-parser": "4.2.5", @@ -14804,7 +14984,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.382.0", + version: "3.398.0", scripts: { build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", "build:cjs": "tsc -p tsconfig.cjs.json", @@ -14824,34 +15004,34 @@ 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.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.398.0", + "@aws-sdk/middleware-logger": "3.398.0", + "@aws-sdk/middleware-recursion-detection": "3.398.0", + "@aws-sdk/middleware-user-agent": "3.398.0", + "@aws-sdk/types": "3.398.0", + "@aws-sdk/util-endpoints": "3.398.0", + "@aws-sdk/util-user-agent-browser": "3.398.0", + "@aws-sdk/util-user-agent-node": "3.398.0", + "@smithy/config-resolver": "^2.0.5", + "@smithy/fetch-http-handler": "^2.0.5", + "@smithy/hash-node": "^2.0.5", + "@smithy/invalid-dependency": "^2.0.5", + "@smithy/middleware-content-length": "^2.0.5", + "@smithy/middleware-endpoint": "^2.0.5", + "@smithy/middleware-retry": "^2.0.5", + "@smithy/middleware-serde": "^2.0.5", "@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.5", + "@smithy/node-http-handler": "^2.0.5", + "@smithy/protocol-http": "^2.0.5", + "@smithy/smithy-client": "^2.0.5", + "@smithy/types": "^2.2.2", + "@smithy/url-parser": "^2.0.5", "@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-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.5", + "@smithy/util-defaults-mode-node": "^2.0.5", "@smithy/util-retry": "^2.0.0", "@smithy/util-utf8": "^2.0.0", tslib: "^2.5.0" @@ -15027,6 +15207,8 @@ var require_calculateBodyLength = __commonJS({ return body.byteLength; } else if (typeof body.size === "number") { return body.size; + } else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; } else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) { return (0, fs_1.lstatSync)(body.path).size; } else if (typeof body.fd === "number") { @@ -15113,6 +15295,7 @@ var require_runtimeConfig_shared = __commonJS({ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), serviceId: config?.serviceId ?? "SSO", urlParser: config?.urlParser ?? url_parser_1.parseUrl, @@ -15278,6 +15461,28 @@ var require_runtimeConfig = __commonJS({ } }); +// ../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeExtensions.js +var require_runtimeExtensions = __commonJS({ + "../../../node_modules/@aws-sdk/client-sso/dist-cjs/runtimeExtensions.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveRuntimeExtensions = void 0; + var smithy_client_1 = require_dist_cjs35(); + var asPartial = (t) => t; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration) + }; + }; + exports.resolveRuntimeExtensions = resolveRuntimeExtensions; + } +}); + // ../../../node_modules/@aws-sdk/client-sso/dist-cjs/SSOClient.js var require_SSOClient = __commonJS({ "../../../node_modules/@aws-sdk/client-sso/dist-cjs/SSOClient.js"(exports) { @@ -15298,17 +15503,19 @@ var require_SSOClient = __commonJS({ } }); var EndpointParameters_1 = require_EndpointParameters3(); var runtimeConfig_1 = require_runtimeConfig(); + var runtimeExtensions_1 = require_runtimeExtensions(); var SSOClient = class extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); 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_user_agent_1.resolveUserAgentConfig)(_config_5); - super(_config_6); - this.config = _config_6; + const _config_7 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_6, configuration?.extensions || []); + super(_config_7); + this.config = _config_7; this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); @@ -16182,143 +16389,44 @@ var require_dist_cjs46 = __commonJS({ } }); -// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/constants.js -var require_constants8 = __commonJS({ - "../../../node_modules/@aws-sdk/token-providers/dist-cjs/constants.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.REFRESH_MESSAGE = exports.EXPIRE_WINDOW_MS = void 0; - exports.EXPIRE_WINDOW_MS = 5 * 60 * 1e3; - exports.REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/EndpointParameters.js -var require_EndpointParameters4 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/EndpointParameters.js"(exports) { +// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/bundle/client-sso-oidc-node.js +var require_client_sso_oidc_node = __commonJS({ + "../../../node_modules/@aws-sdk/token-providers/dist-cjs/bundle/client-sso-oidc-node.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.resolveClientEndpointParameters = void 0; + exports.UnsupportedGrantTypeException = exports.UnauthorizedClientException = exports.SlowDownException = exports.SSOOIDCClient = exports.InvalidScopeException = exports.InvalidRequestException = exports.InvalidClientException = exports.InternalServerException = exports.ExpiredTokenException = exports.CreateTokenCommand = exports.AuthorizationPendingException = exports.AccessDeniedException = void 0; + var middleware_host_header_1 = require_dist_cjs3(); + var middleware_logger_1 = require_dist_cjs4(); + var middleware_recursion_detection_1 = require_dist_cjs5(); + var middleware_user_agent_1 = require_dist_cjs19(); + var config_resolver_1 = require_dist_cjs21(); + var middleware_content_length_1 = require_dist_cjs22(); + var middleware_endpoint_1 = require_dist_cjs26(); + var middleware_retry_1 = require_dist_cjs29(); + var smithy_client_1 = require_dist_cjs35(); var resolveClientEndpointParameters = (options) => { + var _a, _b; return { ...options, - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, + useDualstackEndpoint: (_a = options.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false, + useFipsEndpoint: (_b = options.useFipsEndpoint) !== null && _b !== void 0 ? _b : false, defaultSigningName: "awsssooidc" }; }; - exports.resolveClientEndpointParameters = resolveClientEndpointParameters; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/package.json -var require_package4 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/package.json"(exports, module2) { - 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.382.0", - scripts: { - build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", - "build:cjs": "tsc -p tsconfig.cjs.json", - "build:docs": "typedoc", - "build:es": "tsc -p tsconfig.es.json", - "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", - "build:types": "tsc -p tsconfig.types.json", - "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", - clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", - "extract:docs": "api-extractor run --local", - "generate:client": "node ../../scripts/generate-clients/single-service --solo sso-oidc" - }, - main: "./dist-cjs/index.js", - types: "./dist-types/index.d.ts", - module: "./dist-es/index.js", - sideEffects: false, - 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" - }, - devDependencies: { - "@smithy/service-client-documentation-generator": "^2.0.0", - "@tsconfig/node14": "1.0.3", - "@types/node": "^14.14.31", - concurrently: "7.0.0", - "downlevel-dts": "0.10.1", - rimraf: "3.0.2", - typedoc: "0.23.23", - typescript: "~4.9.5" - }, - engines: { - node: ">=14.0.0" - }, - typesVersions: { - "<4.0": { - "dist-types/*": [ - "dist-types/ts3.4/*" - ] - } - }, - files: [ - "dist-*/**" - ], - author: { - name: "AWS SDK for JavaScript Team", - url: "https://aws.amazon.com/javascript/" - }, - license: "Apache-2.0", - browser: { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" - }, - "react-native": { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" - }, - homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc", - repository: { - type: "git", - url: "https://github.com/aws/aws-sdk-js-v3.git", - directory: "clients/client-sso-oidc" - } - }; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js -var require_ruleset2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ruleSet = void 0; + var package_default = { version: "3.387.0" }; + var util_user_agent_node_1 = require_dist_cjs42(); + var config_resolver_2 = require_dist_cjs21(); + var hash_node_1 = require_dist_cjs43(); + var middleware_retry_2 = require_dist_cjs29(); + var node_config_provider_1 = require_dist_cjs39(); + var node_http_handler_1 = require_dist_cjs33(); + var util_body_length_node_1 = require_dist_cjs44(); + var util_retry_1 = require_dist_cjs28(); + var smithy_client_2 = require_dist_cjs35(); + var url_parser_1 = require_dist_cjs24(); + var util_base64_1 = require_dist_cjs31(); + var util_utf8_1 = require_dist_cjs13(); + var util_endpoints_1 = require_dist_cjs18(); var p = "required"; var q = "fn"; var r = "argv"; @@ -16339,128 +16447,61 @@ var require_ruleset2 = __commonJS({ var n = [h]; var o = [i]; var _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [k], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] }; - exports.ruleSet = _data; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js -var require_endpointResolver2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.defaultEndpointResolver = void 0; - var util_endpoints_1 = require_dist_cjs18(); - var ruleset_1 = require_ruleset2(); + var ruleSet = _data; var defaultEndpointResolver = (endpointParams, context = {}) => { - return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + return (0, util_endpoints_1.resolveEndpoint)(ruleSet, { endpointParams, logger: context.logger }); }; - exports.defaultEndpointResolver = defaultEndpointResolver; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js -var require_runtimeConfig_shared2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getRuntimeConfig = void 0; - var smithy_client_1 = require_dist_cjs35(); - var url_parser_1 = require_dist_cjs24(); - var util_base64_1 = require_dist_cjs31(); - var util_utf8_1 = require_dist_cjs13(); - var endpointResolver_1 = require_endpointResolver2(); - var getRuntimeConfig = (config) => ({ - apiVersion: "2019-06-10", - 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; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js -var require_runtimeConfig2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getRuntimeConfig = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var package_json_1 = tslib_1.__importDefault(require_package4()); - var util_user_agent_node_1 = require_dist_cjs42(); - var config_resolver_1 = require_dist_cjs21(); - var hash_node_1 = require_dist_cjs43(); - var middleware_retry_1 = require_dist_cjs29(); - var node_config_provider_1 = require_dist_cjs39(); - var node_http_handler_1 = require_dist_cjs33(); - var util_body_length_node_1 = require_dist_cjs44(); - var util_retry_1 = require_dist_cjs28(); - var runtimeConfig_shared_1 = require_runtimeConfig_shared2(); - var smithy_client_1 = require_dist_cjs35(); - var util_defaults_mode_node_1 = require_dist_cjs45(); - var smithy_client_2 = require_dist_cjs35(); var getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + return { + apiVersion: "2019-06-10", + base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_1.fromBase64, + base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_1.toBase64, + disableHostPrefix: (_c = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _c !== void 0 ? _c : false, + endpointProvider: (_d = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _d !== void 0 ? _d : defaultEndpointResolver, + logger: (_e = config === null || config === void 0 ? void 0 : config.logger) !== null && _e !== void 0 ? _e : new smithy_client_2.NoOpLogger(), + serviceId: (_f = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _f !== void 0 ? _f : "SSO OIDC", + urlParser: (_g = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _g !== void 0 ? _g : url_parser_1.parseUrl, + utf8Decoder: (_h = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _h !== void 0 ? _h : util_utf8_1.fromUtf8, + utf8Encoder: (_j = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _j !== void 0 ? _j : util_utf8_1.toUtf8 + }; + }; + var smithy_client_3 = require_dist_cjs35(); + var util_defaults_mode_node_1 = require_dist_cjs45(); + var smithy_client_4 = require_dist_cjs35(); + var getRuntimeConfig2 = (config) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; + (0, smithy_client_4.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_3.loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig(config); return { ...clientSharedValues, ...config, runtime: "node", defaultsMode, - 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, + bodyLengthChecker: (_a = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _a !== void 0 ? _a : util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: (_b = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _b !== void 0 ? _b : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + maxAttempts: (_c = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _c !== void 0 ? _c : (0, node_config_provider_1.loadConfig)(middleware_retry_2.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: (_d = config === null || config === void 0 ? void 0 : config.region) !== null && _d !== void 0 ? _d : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_REGION_CONFIG_OPTIONS, config_resolver_2.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: (_e = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _e !== void 0 ? _e : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + retryMode: (_f = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _f !== void 0 ? _f : (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_2.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE }), - 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) + sha256: (_g = config === null || config === void 0 ? void 0 : config.sha256) !== null && _g !== void 0 ? _g : hash_node_1.Hash.bind(null, "sha256"), + streamCollector: (_h = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _h !== void 0 ? _h : node_http_handler_1.streamCollector, + useDualstackEndpoint: (_j = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _j !== void 0 ? _j : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: (_k = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _k !== void 0 ? _k : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) }; }; - exports.getRuntimeConfig = getRuntimeConfig; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/SSOOIDCClient.js -var require_SSOOIDCClient = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/SSOOIDCClient.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SSOOIDCClient = exports.__Client = void 0; - var middleware_host_header_1 = require_dist_cjs3(); - var middleware_logger_1 = require_dist_cjs4(); - var middleware_recursion_detection_1 = require_dist_cjs5(); - var middleware_user_agent_1 = require_dist_cjs19(); - var config_resolver_1 = require_dist_cjs21(); - var middleware_content_length_1 = require_dist_cjs22(); - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_retry_1 = require_dist_cjs29(); - var smithy_client_1 = require_dist_cjs35(); - Object.defineProperty(exports, "__Client", { enumerable: true, get: function() { - return smithy_client_1.Client; - } }); - var EndpointParameters_1 = require_EndpointParameters4(); - var runtimeConfig_1 = require_runtimeConfig2(); var SSOOIDCClient = class extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); - const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig2(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); @@ -16480,37 +16521,20 @@ var require_SSOOIDCClient = __commonJS({ } }; exports.SSOOIDCClient = SSOOIDCClient; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/SSOOIDCServiceException.js -var require_SSOOIDCServiceException = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/SSOOIDCServiceException.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SSOOIDCServiceException = exports.__ServiceException = void 0; - var smithy_client_1 = require_dist_cjs35(); - Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function() { - return smithy_client_1.ServiceException; - } }); - var SSOOIDCServiceException = class _SSOOIDCServiceException extends smithy_client_1.ServiceException { + var smithy_client_5 = require_dist_cjs35(); + var middleware_endpoint_2 = require_dist_cjs26(); + var middleware_serde_1 = require_dist_cjs25(); + var smithy_client_6 = require_dist_cjs35(); + var protocol_http_1 = require_dist_cjs2(); + var smithy_client_7 = require_dist_cjs35(); + var smithy_client_8 = require_dist_cjs35(); + var SSOOIDCServiceException = class _SSOOIDCServiceException extends smithy_client_8.ServiceException { constructor(options) { super(options); Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); } }; - exports.SSOOIDCServiceException = SSOOIDCServiceException; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/models_0.js -var require_models_03 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/models_0.js"(exports) { - "use strict"; - 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 _AccessDeniedException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException { constructor(opts) { super({ name: "AccessDeniedException", @@ -16525,7 +16549,7 @@ var require_models_03 = __commonJS({ } }; exports.AccessDeniedException = AccessDeniedException; - var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException { constructor(opts) { super({ name: "AuthorizationPendingException", @@ -16540,7 +16564,7 @@ var require_models_03 = __commonJS({ } }; exports.AuthorizationPendingException = AuthorizationPendingException; - var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException { constructor(opts) { super({ name: "ExpiredTokenException", @@ -16555,7 +16579,7 @@ var require_models_03 = __commonJS({ } }; exports.ExpiredTokenException = ExpiredTokenException; - var InternalServerException = class _InternalServerException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InternalServerException = class _InternalServerException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InternalServerException", @@ -16570,7 +16594,7 @@ var require_models_03 = __commonJS({ } }; exports.InternalServerException = InternalServerException; - var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidClientException", @@ -16585,7 +16609,7 @@ var require_models_03 = __commonJS({ } }; exports.InvalidClientException = InvalidClientException; - var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidGrantException", @@ -16599,8 +16623,7 @@ var require_models_03 = __commonJS({ this.error_description = opts.error_description; } }; - exports.InvalidGrantException = InvalidGrantException; - var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidRequestException", @@ -16615,7 +16638,7 @@ var require_models_03 = __commonJS({ } }; exports.InvalidRequestException = InvalidRequestException; - var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidScopeException", @@ -16630,7 +16653,7 @@ var require_models_03 = __commonJS({ } }; exports.InvalidScopeException = InvalidScopeException; - var SlowDownException = class _SlowDownException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var SlowDownException = class _SlowDownException extends SSOOIDCServiceException { constructor(opts) { super({ name: "SlowDownException", @@ -16645,7 +16668,7 @@ var require_models_03 = __commonJS({ } }; exports.SlowDownException = SlowDownException; - var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException { constructor(opts) { super({ name: "UnauthorizedClientException", @@ -16660,7 +16683,7 @@ var require_models_03 = __commonJS({ } }; exports.UnauthorizedClientException = UnauthorizedClientException; - var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException { constructor(opts) { super({ name: "UnsupportedGrantTypeException", @@ -16675,7 +16698,7 @@ var require_models_03 = __commonJS({ } }; exports.UnsupportedGrantTypeException = UnsupportedGrantTypeException; - var InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException_1.SSOOIDCServiceException { + var InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException { constructor(opts) { super({ name: "InvalidClientMetadataException", @@ -16689,28 +16712,14 @@ var require_models_03 = __commonJS({ this.error_description = opts.error_description; } }; - exports.InvalidClientMetadataException = InvalidClientMetadataException; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/protocols/Aws_restJson1.js -var require_Aws_restJson12 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/protocols/Aws_restJson1.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.de_StartDeviceAuthorizationCommand = exports.de_RegisterClientCommand = exports.de_CreateTokenCommand = exports.se_StartDeviceAuthorizationCommand = exports.se_RegisterClientCommand = exports.se_CreateTokenCommand = void 0; - var protocol_http_1 = require_dist_cjs2(); - var smithy_client_1 = require_dist_cjs35(); - var models_0_1 = require_models_03(); - var SSOOIDCServiceException_1 = require_SSOOIDCServiceException(); var se_CreateTokenCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json" }; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/token`; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/token`; let body; - body = JSON.stringify((0, smithy_client_1.take)(input, { + body = JSON.stringify((0, smithy_client_7.take)(input, { clientId: [], clientSecret: [], code: [], @@ -16718,7 +16727,7 @@ var require_Aws_restJson12 = __commonJS({ grantType: [], redirectUri: [], refreshToken: [], - scope: (_) => (0, smithy_client_1._json)(_) + scope: (_) => (0, smithy_client_7._json)(_) })); return new protocol_http_1.HttpRequest({ protocol, @@ -16730,18 +16739,17 @@ var require_Aws_restJson12 = __commonJS({ body }); }; - exports.se_CreateTokenCommand = se_CreateTokenCommand; var se_RegisterClientCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json" }; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/client/register`; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/client/register`; let body; - body = JSON.stringify((0, smithy_client_1.take)(input, { + body = JSON.stringify((0, smithy_client_7.take)(input, { clientName: [], clientType: [], - scopes: (_) => (0, smithy_client_1._json)(_) + scopes: (_) => (0, smithy_client_7._json)(_) })); return new protocol_http_1.HttpRequest({ protocol, @@ -16753,15 +16761,14 @@ var require_Aws_restJson12 = __commonJS({ body }); }; - exports.se_RegisterClientCommand = se_RegisterClientCommand; var se_StartDeviceAuthorizationCommand = async (input, context) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = { "content-type": "application/json" }; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/device_authorization`; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/device_authorization`; let body; - body = JSON.stringify((0, smithy_client_1.take)(input, { + body = JSON.stringify((0, smithy_client_7.take)(input, { clientId: [], clientSecret: [], startUrl: [] @@ -16776,26 +16783,24 @@ var require_Aws_restJson12 = __commonJS({ body }); }; - exports.se_StartDeviceAuthorizationCommand = se_StartDeviceAuthorizationCommand; var de_CreateTokenCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CreateTokenCommandError(output, context); } - const contents = (0, smithy_client_1.map)({ + const contents = (0, smithy_client_7.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_1.take)(data, { - accessToken: smithy_client_1.expectString, - expiresIn: smithy_client_1.expectInt32, - idToken: smithy_client_1.expectString, - refreshToken: smithy_client_1.expectString, - tokenType: smithy_client_1.expectString + const data = (0, smithy_client_7.expectNonNull)((0, smithy_client_7.expectObject)(await parseBody(output.body, context)), "body"); + const doc = (0, smithy_client_7.take)(data, { + accessToken: smithy_client_7.expectString, + expiresIn: smithy_client_7.expectInt32, + idToken: smithy_client_7.expectString, + refreshToken: smithy_client_7.expectString, + tokenType: smithy_client_7.expectString }); Object.assign(contents, doc); return contents; }; - exports.de_CreateTokenCommand = de_CreateTokenCommand; var de_CreateTokenCommandError = async (output, context) => { const parsedOutput = { ...output, @@ -16849,22 +16854,21 @@ var require_Aws_restJson12 = __commonJS({ if (output.statusCode !== 200 && output.statusCode >= 300) { return de_RegisterClientCommandError(output, context); } - const contents = (0, smithy_client_1.map)({ + const contents = (0, smithy_client_7.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_1.take)(data, { - authorizationEndpoint: smithy_client_1.expectString, - clientId: smithy_client_1.expectString, - clientIdIssuedAt: smithy_client_1.expectLong, - clientSecret: smithy_client_1.expectString, - clientSecretExpiresAt: smithy_client_1.expectLong, - tokenEndpoint: smithy_client_1.expectString + const data = (0, smithy_client_7.expectNonNull)((0, smithy_client_7.expectObject)(await parseBody(output.body, context)), "body"); + const doc = (0, smithy_client_7.take)(data, { + authorizationEndpoint: smithy_client_7.expectString, + clientId: smithy_client_7.expectString, + clientIdIssuedAt: smithy_client_7.expectLong, + clientSecret: smithy_client_7.expectString, + clientSecretExpiresAt: smithy_client_7.expectLong, + tokenEndpoint: smithy_client_7.expectString }); Object.assign(contents, doc); return contents; }; - exports.de_RegisterClientCommand = de_RegisterClientCommand; var de_RegisterClientCommandError = async (output, context) => { const parsedOutput = { ...output, @@ -16897,22 +16901,21 @@ var require_Aws_restJson12 = __commonJS({ if (output.statusCode !== 200 && output.statusCode >= 300) { return de_StartDeviceAuthorizationCommandError(output, context); } - const contents = (0, smithy_client_1.map)({ + const contents = (0, smithy_client_7.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - const doc = (0, smithy_client_1.take)(data, { - deviceCode: smithy_client_1.expectString, - expiresIn: smithy_client_1.expectInt32, - interval: smithy_client_1.expectInt32, - userCode: smithy_client_1.expectString, - verificationUri: smithy_client_1.expectString, - verificationUriComplete: smithy_client_1.expectString + const data = (0, smithy_client_7.expectNonNull)((0, smithy_client_7.expectObject)(await parseBody(output.body, context)), "body"); + const doc = (0, smithy_client_7.take)(data, { + deviceCode: smithy_client_7.expectString, + expiresIn: smithy_client_7.expectInt32, + interval: smithy_client_7.expectInt32, + userCode: smithy_client_7.expectString, + verificationUri: smithy_client_7.expectString, + verificationUriComplete: smithy_client_7.expectString }); Object.assign(contents, doc); return contents; }; - exports.de_StartDeviceAuthorizationCommand = de_StartDeviceAuthorizationCommand; var de_StartDeviceAuthorizationCommandError = async (output, context) => { const parsedOutput = { ...output, @@ -16944,182 +16947,185 @@ var require_Aws_restJson12 = __commonJS({ }); } }; - var throwDefaultError = (0, smithy_client_1.withBaseException)(SSOOIDCServiceException_1.SSOOIDCServiceException); + var throwDefaultError = (0, smithy_client_7.withBaseException)(SSOOIDCServiceException); var de_AccessDeniedExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.AccessDeniedException({ + const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.AuthorizationPendingException({ + const exception = new AuthorizationPendingException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.ExpiredTokenException({ + const exception = new ExpiredTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InternalServerExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InternalServerException({ + const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InvalidClientExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InvalidClientException({ + const exception = new InvalidClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InvalidClientMetadataException({ + const exception = new InvalidClientMetadataException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InvalidGrantExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InvalidGrantException({ + const exception = new InvalidGrantException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InvalidRequestExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InvalidRequestException({ + const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_InvalidScopeExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.InvalidScopeException({ + const exception = new InvalidScopeException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_SlowDownExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.SlowDownException({ + const exception = new SlowDownException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.UnauthorizedClientException({ + const exception = new UnauthorizedClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; var de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => { - const contents = (0, smithy_client_1.map)({}); + const contents = (0, smithy_client_7.map)({}); const data = parsedOutput.body; - const doc = (0, smithy_client_1.take)(data, { - error: smithy_client_1.expectString, - error_description: smithy_client_1.expectString + const doc = (0, smithy_client_7.take)(data, { + error: smithy_client_7.expectString, + error_description: smithy_client_7.expectString }); Object.assign(contents, doc); - const exception = new models_0_1.UnsupportedGrantTypeException({ + const exception = new UnsupportedGrantTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents }); - return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); + return (0, smithy_client_7.decorateServiceException)(exception, parsedOutput.body); }; - var deserializeMetadata = (output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] - }); - var collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); + var deserializeMetadata = (output) => { + var _a, _b; + return { + httpStatusCode: output.statusCode, + requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }; + }; + var collectBodyString = (streamBody, context) => (0, smithy_client_7.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); var parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { if (encoded.length) { return JSON.parse(encoded); @@ -17127,12 +17133,13 @@ var require_Aws_restJson12 = __commonJS({ return {}; }); var parseErrorBody = async (errorBody, context) => { + var _a; const value = await parseBody(errorBody, context); - value.message = value.message ?? value.Message; + value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message; return value; }; var loadRestJsonErrorCode = (output, data) => { - const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + const findKey = (object, key) => Object.keys(object).find((k2) => k2.toLowerCase() === key.toLowerCase()); const sanitizeErrorCode = (rawValue) => { let cleanValue = rawValue; if (typeof cleanValue === "number") { @@ -17160,23 +17167,11 @@ var require_Aws_restJson12 = __commonJS({ return sanitizeErrorCode(data["__type"]); } }; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/CreateTokenCommand.js -var require_CreateTokenCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/CreateTokenCommand.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CreateTokenCommand = exports.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs35(); - Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var Aws_restJson1_1 = require_Aws_restJson12(); - var CreateTokenCommand = class _CreateTokenCommand extends smithy_client_1.Command { + var CreateTokenCommand = class _CreateTokenCommand extends smithy_client_6.Command { + constructor(input) { + super(); + this.input = input; + } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -17185,13 +17180,9 @@ var require_CreateTokenCommand = __commonJS({ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } }; } - constructor(input) { - super(); - this.input = input; - } 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_2.getEndpointPlugin)(configuration, _CreateTokenCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; @@ -17207,30 +17198,21 @@ var require_CreateTokenCommand = __commonJS({ return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restJson1_1.se_CreateTokenCommand)(input, context); + return se_CreateTokenCommand(input, context); } deserialize(output, context) { - return (0, Aws_restJson1_1.de_CreateTokenCommand)(output, context); + return de_CreateTokenCommand(output, context); } }; exports.CreateTokenCommand = CreateTokenCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/RegisterClientCommand.js -var require_RegisterClientCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/RegisterClientCommand.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RegisterClientCommand = exports.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs35(); - Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var Aws_restJson1_1 = require_Aws_restJson12(); - var RegisterClientCommand = class _RegisterClientCommand extends smithy_client_1.Command { + var middleware_endpoint_3 = require_dist_cjs26(); + var middleware_serde_2 = require_dist_cjs25(); + var smithy_client_9 = require_dist_cjs35(); + var RegisterClientCommand = class _RegisterClientCommand extends smithy_client_9.Command { + constructor(input) { + super(); + this.input = input; + } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -17239,13 +17221,9 @@ var require_RegisterClientCommand = __commonJS({ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } }; } - constructor(input) { - super(); - this.input = input; - } 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_serde_2.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_3.getEndpointPlugin)(configuration, _RegisterClientCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; @@ -17261,30 +17239,20 @@ var require_RegisterClientCommand = __commonJS({ return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restJson1_1.se_RegisterClientCommand)(input, context); + return se_RegisterClientCommand(input, context); } deserialize(output, context) { - return (0, Aws_restJson1_1.de_RegisterClientCommand)(output, context); + return de_RegisterClientCommand(output, context); } }; - exports.RegisterClientCommand = RegisterClientCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/StartDeviceAuthorizationCommand.js -var require_StartDeviceAuthorizationCommand = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/StartDeviceAuthorizationCommand.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.StartDeviceAuthorizationCommand = exports.$Command = void 0; - var middleware_endpoint_1 = require_dist_cjs26(); - var middleware_serde_1 = require_dist_cjs25(); - var smithy_client_1 = require_dist_cjs35(); - Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { - return smithy_client_1.Command; - } }); - var Aws_restJson1_1 = require_Aws_restJson12(); - var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends smithy_client_1.Command { + var middleware_endpoint_4 = require_dist_cjs26(); + var middleware_serde_3 = require_dist_cjs25(); + var smithy_client_10 = require_dist_cjs35(); + var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends smithy_client_10.Command { + constructor(input) { + super(); + this.input = input; + } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, @@ -17293,13 +17261,9 @@ var require_StartDeviceAuthorizationCommand = __commonJS({ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } }; } - constructor(input) { - super(); - this.input = input; - } 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_serde_3.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_4.getEndpointPlugin)(configuration, _StartDeviceAuthorizationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; @@ -17315,76 +17279,31 @@ var require_StartDeviceAuthorizationCommand = __commonJS({ return stack.resolve((request2) => requestHandler.handle(request2.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restJson1_1.se_StartDeviceAuthorizationCommand)(input, context); + return se_StartDeviceAuthorizationCommand(input, context); } deserialize(output, context) { - return (0, Aws_restJson1_1.de_StartDeviceAuthorizationCommand)(output, context); + return de_StartDeviceAuthorizationCommand(output, context); } }; - exports.StartDeviceAuthorizationCommand = StartDeviceAuthorizationCommand; - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/SSOOIDC.js -var require_SSOOIDC = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/SSOOIDC.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SSOOIDC = void 0; - var smithy_client_1 = require_dist_cjs35(); - var CreateTokenCommand_1 = require_CreateTokenCommand(); - var RegisterClientCommand_1 = require_RegisterClientCommand(); - var StartDeviceAuthorizationCommand_1 = require_StartDeviceAuthorizationCommand(); - var SSOOIDCClient_1 = require_SSOOIDCClient(); var commands = { - CreateTokenCommand: CreateTokenCommand_1.CreateTokenCommand, - RegisterClientCommand: RegisterClientCommand_1.RegisterClientCommand, - StartDeviceAuthorizationCommand: StartDeviceAuthorizationCommand_1.StartDeviceAuthorizationCommand + CreateTokenCommand, + RegisterClientCommand, + StartDeviceAuthorizationCommand }; - var SSOOIDC = class extends SSOOIDCClient_1.SSOOIDCClient { + var SSOOIDC = class extends SSOOIDCClient { }; - exports.SSOOIDC = SSOOIDC; - (0, smithy_client_1.createAggregatedClient)(commands, SSOOIDC); - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/index.js -var require_commands2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_CreateTokenCommand(), exports); - tslib_1.__exportStar(require_RegisterClientCommand(), exports); - tslib_1.__exportStar(require_StartDeviceAuthorizationCommand(), exports); - } -}); - -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/index.js -var require_models2 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/models/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_models_03(), exports); + (0, smithy_client_5.createAggregatedClient)(commands, SSOOIDC); } }); -// ../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js -var require_dist_cjs47 = __commonJS({ - "../../../node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports) { +// ../../../node_modules/@aws-sdk/token-providers/dist-cjs/constants.js +var require_constants8 = __commonJS({ + "../../../node_modules/@aws-sdk/token-providers/dist-cjs/constants.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.SSOOIDCServiceException = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_SSOOIDCClient(), exports); - tslib_1.__exportStar(require_SSOOIDC(), exports); - tslib_1.__exportStar(require_commands2(), exports); - tslib_1.__exportStar(require_models2(), exports); - var SSOOIDCServiceException_1 = require_SSOOIDCServiceException(); - Object.defineProperty(exports, "SSOOIDCServiceException", { enumerable: true, get: function() { - return SSOOIDCServiceException_1.SSOOIDCServiceException; - } }); + exports.REFRESH_MESSAGE = exports.EXPIRE_WINDOW_MS = void 0; + exports.EXPIRE_WINDOW_MS = 5 * 60 * 1e3; + exports.REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; } }); @@ -17394,13 +17313,13 @@ var require_getSsoOidcClient = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSsoOidcClient = void 0; - var client_sso_oidc_1 = require_dist_cjs47(); + var client_sso_oidc_node_1 = require_client_sso_oidc_node(); var ssoOidcClientsHash = {}; var getSsoOidcClient = (ssoRegion) => { if (ssoOidcClientsHash[ssoRegion]) { return ssoOidcClientsHash[ssoRegion]; } - const ssoOidcClient = new client_sso_oidc_1.SSOOIDCClient({ region: ssoRegion }); + const ssoOidcClient = new client_sso_oidc_node_1.SSOOIDCClient({ region: ssoRegion }); ssoOidcClientsHash[ssoRegion] = ssoOidcClient; return ssoOidcClient; }; @@ -17414,11 +17333,11 @@ var require_getNewSsoOidcToken = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNewSsoOidcToken = void 0; - var client_sso_oidc_1 = require_dist_cjs47(); + var client_sso_oidc_node_1 = require_client_sso_oidc_node(); var getSsoOidcClient_1 = require_getSsoOidcClient(); var getNewSsoOidcToken = (ssoToken, ssoRegion) => { const ssoOidcClient = (0, getSsoOidcClient_1.getSsoOidcClient)(ssoRegion); - return ssoOidcClient.send(new client_sso_oidc_1.CreateTokenCommand({ + return ssoOidcClient.send(new client_sso_oidc_node_1.CreateTokenCommand({ clientId: ssoToken.clientId, clientSecret: ssoToken.clientSecret, refreshToken: ssoToken.refreshToken, @@ -17598,11 +17517,12 @@ var require_nodeProvider = __commonJS({ }); // ../../../node_modules/@aws-sdk/token-providers/dist-cjs/index.js -var require_dist_cjs48 = __commonJS({ +var require_dist_cjs47 = __commonJS({ "../../../node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_client_sso_oidc_node(), exports); tslib_1.__exportStar(require_fromSso(), exports); tslib_1.__exportStar(require_fromStatic3(), exports); tslib_1.__exportStar(require_nodeProvider(), exports); @@ -17616,10 +17536,9 @@ var require_resolveSSOCredentials = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveSSOCredentials = void 0; var client_sso_1 = require_dist_cjs46(); - var token_providers_1 = require_dist_cjs48(); + var token_providers_1 = require_dist_cjs47(); var property_provider_1 = require_dist_cjs6(); var shared_ini_file_loader_1 = require_dist_cjs38(); - var EXPIRE_WINDOW_MS = 15 * 60 * 1e3; var SHOULD_FAIL_CREDENTIAL_CHAIN = false; var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, profile }) => { let token; @@ -17641,7 +17560,7 @@ var require_resolveSSOCredentials = __commonJS({ throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); } } - if (new Date(token.expiresAt).getTime() - Date.now() <= EXPIRE_WINDOW_MS) { + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); } const { accessToken } = token; @@ -17758,7 +17677,7 @@ var require_types7 = __commonJS({ }); // ../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js -var require_dist_cjs49 = __commonJS({ +var require_dist_cjs48 = __commonJS({ "../../../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -17776,8 +17695,8 @@ var require_resolveSsoCredentials = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveSsoCredentials = exports.isSsoProfile = void 0; - var credential_provider_sso_1 = require_dist_cjs49(); - var credential_provider_sso_2 = require_dist_cjs49(); + var credential_provider_sso_1 = require_dist_cjs48(); + var credential_provider_sso_2 = require_dist_cjs48(); Object.defineProperty(exports, "isSsoProfile", { enumerable: true, get: function() { return credential_provider_sso_2.isSsoProfile; } }); @@ -17870,7 +17789,7 @@ var require_fromTokenFile = __commonJS({ }); // ../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js -var require_dist_cjs50 = __commonJS({ +var require_dist_cjs49 = __commonJS({ "../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -17886,7 +17805,7 @@ var require_resolveWebIdentityCredentials = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveWebIdentityCredentials = exports.isWebIdentityProfile = void 0; - var credential_provider_web_identity_1 = require_dist_cjs50(); + var credential_provider_web_identity_1 = require_dist_cjs49(); var isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1; exports.isWebIdentityProfile = isWebIdentityProfile; var resolveWebIdentityCredentials = async (profile, options) => (0, credential_provider_web_identity_1.fromTokenFile)({ @@ -17954,7 +17873,7 @@ var require_fromIni = __commonJS({ }); // ../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js -var require_dist_cjs51 = __commonJS({ +var require_dist_cjs50 = __commonJS({ "../../../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -17994,10 +17913,10 @@ var require_defaultProvider = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultProvider = void 0; var credential_provider_env_1 = require_dist_cjs37(); - var credential_provider_ini_1 = require_dist_cjs51(); + var credential_provider_ini_1 = require_dist_cjs50(); var credential_provider_process_1 = require_dist_cjs41(); - var credential_provider_sso_1 = require_dist_cjs49(); - var credential_provider_web_identity_1 = require_dist_cjs50(); + var credential_provider_sso_1 = require_dist_cjs48(); + var credential_provider_web_identity_1 = require_dist_cjs49(); var property_provider_1 = require_dist_cjs6(); var shared_ini_file_loader_1 = require_dist_cjs38(); var remoteProvider_1 = require_remoteProvider(); @@ -18009,7 +17928,7 @@ var require_defaultProvider = __commonJS({ }); // ../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js -var require_dist_cjs52 = __commonJS({ +var require_dist_cjs51 = __commonJS({ "../../../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18019,7 +17938,7 @@ var require_dist_cjs52 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js -var require_ruleset3 = __commonJS({ +var require_ruleset2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18066,13 +17985,13 @@ var require_ruleset3 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js -var require_endpointResolver3 = __commonJS({ +var require_endpointResolver2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultEndpointResolver = void 0; var util_endpoints_1 = require_dist_cjs18(); - var ruleset_1 = require_ruleset3(); + var ruleset_1 = require_ruleset2(); var defaultEndpointResolver = (endpointParams, context = {}) => { return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { endpointParams, @@ -18084,7 +18003,7 @@ var require_endpointResolver3 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js -var require_runtimeConfig_shared3 = __commonJS({ +var require_runtimeConfig_shared2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18093,13 +18012,14 @@ var require_runtimeConfig_shared3 = __commonJS({ var url_parser_1 = require_dist_cjs24(); var util_base64_1 = require_dist_cjs31(); var util_utf8_1 = require_dist_cjs13(); - var endpointResolver_1 = require_endpointResolver3(); + var endpointResolver_1 = require_endpointResolver2(); var getRuntimeConfig = (config) => ({ apiVersion: "2011-06-15", base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), serviceId: config?.serviceId ?? "STS", urlParser: config?.urlParser ?? url_parser_1.parseUrl, @@ -18111,7 +18031,7 @@ var require_runtimeConfig_shared3 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js -var require_runtimeConfig3 = __commonJS({ +var require_runtimeConfig2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18119,7 +18039,7 @@ var require_runtimeConfig3 = __commonJS({ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var package_json_1 = tslib_1.__importDefault(require_package2()); var defaultStsRoleAssumers_1 = require_defaultStsRoleAssumers(); - var credential_provider_node_1 = require_dist_cjs52(); + var credential_provider_node_1 = require_dist_cjs51(); var util_user_agent_node_1 = require_dist_cjs42(); var config_resolver_1 = require_dist_cjs21(); var hash_node_1 = require_dist_cjs43(); @@ -18128,7 +18048,7 @@ var require_runtimeConfig3 = __commonJS({ var node_http_handler_1 = require_dist_cjs33(); var util_body_length_node_1 = require_dist_cjs44(); var util_retry_1 = require_dist_cjs28(); - var runtimeConfig_shared_1 = require_runtimeConfig_shared3(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared2(); var smithy_client_1 = require_dist_cjs35(); var util_defaults_mode_node_1 = require_dist_cjs45(); var smithy_client_2 = require_dist_cjs35(); @@ -18162,6 +18082,28 @@ var require_runtimeConfig3 = __commonJS({ } }); +// ../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js +var require_runtimeExtensions2 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveRuntimeExtensions = void 0; + var smithy_client_1 = require_dist_cjs35(); + var asPartial = (t) => t; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration) + }; + }; + exports.resolveRuntimeExtensions = resolveRuntimeExtensions; + } +}); + // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js var require_STSClient = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js"(exports) { @@ -18182,10 +18124,11 @@ var require_STSClient = __commonJS({ return smithy_client_1.Client; } }); var EndpointParameters_1 = require_EndpointParameters2(); - var runtimeConfig_1 = require_runtimeConfig3(); + var runtimeConfig_1 = require_runtimeConfig2(); + var runtimeExtensions_1 = require_runtimeExtensions2(); var STSClient = class _STSClient extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); @@ -18193,8 +18136,9 @@ var require_STSClient = __commonJS({ 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_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6); - super(_config_7); - this.config = _config_7; + const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); @@ -18587,7 +18531,7 @@ var require_STS = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/index.js -var require_commands3 = __commonJS({ +var require_commands2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/commands/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18604,7 +18548,7 @@ var require_commands3 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/models/index.js -var require_models3 = __commonJS({ +var require_models2 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/models/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18648,7 +18592,7 @@ var require_defaultRoleAssumers = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sts/dist-cjs/index.js -var require_dist_cjs53 = __commonJS({ +var require_dist_cjs52 = __commonJS({ "../../../node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18656,8 +18600,8 @@ var require_dist_cjs53 = __commonJS({ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); tslib_1.__exportStar(require_STSClient(), exports); tslib_1.__exportStar(require_STS(), exports); - tslib_1.__exportStar(require_commands3(), exports); - tslib_1.__exportStar(require_models3(), exports); + tslib_1.__exportStar(require_commands2(), exports); + tslib_1.__exportStar(require_models2(), exports); tslib_1.__exportStar(require_defaultRoleAssumers(), exports); var STSServiceException_1 = require_STSServiceException(); Object.defineProperty(exports, "STSServiceException", { enumerable: true, get: function() { @@ -18667,7 +18611,7 @@ var require_dist_cjs53 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/ruleset.js -var require_ruleset4 = __commonJS({ +var require_ruleset3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/ruleset.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18699,13 +18643,13 @@ var require_ruleset4 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/endpointResolver.js -var require_endpointResolver4 = __commonJS({ +var require_endpointResolver3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/endpoint/endpointResolver.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultEndpointResolver = void 0; var util_endpoints_1 = require_dist_cjs18(); - var ruleset_1 = require_ruleset4(); + var ruleset_1 = require_ruleset3(); var defaultEndpointResolver = (endpointParams, context = {}) => { return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { endpointParams, @@ -18717,7 +18661,7 @@ var require_endpointResolver4 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.shared.js -var require_runtimeConfig_shared4 = __commonJS({ +var require_runtimeConfig_shared3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.shared.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -18726,13 +18670,14 @@ var require_runtimeConfig_shared4 = __commonJS({ var url_parser_1 = require_dist_cjs24(); var util_base64_1 = require_dist_cjs31(); var util_utf8_1 = require_dist_cjs13(); - var endpointResolver_1 = require_endpointResolver4(); + var endpointResolver_1 = require_endpointResolver3(); var getRuntimeConfig = (config) => ({ apiVersion: "2016-11-23", base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), serviceId: config?.serviceId ?? "SFN", urlParser: config?.urlParser ?? url_parser_1.parseUrl, @@ -18744,15 +18689,15 @@ var require_runtimeConfig_shared4 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.js -var require_runtimeConfig4 = __commonJS({ +var require_runtimeConfig3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeConfig.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getRuntimeConfig = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var package_json_1 = tslib_1.__importDefault(require_package()); - var client_sts_1 = require_dist_cjs53(); - var credential_provider_node_1 = require_dist_cjs52(); + var client_sts_1 = require_dist_cjs52(); + var credential_provider_node_1 = require_dist_cjs51(); var util_user_agent_node_1 = require_dist_cjs42(); var config_resolver_1 = require_dist_cjs21(); var hash_node_1 = require_dist_cjs43(); @@ -18761,7 +18706,7 @@ var require_runtimeConfig4 = __commonJS({ var node_http_handler_1 = require_dist_cjs33(); var util_body_length_node_1 = require_dist_cjs44(); var util_retry_1 = require_dist_cjs28(); - var runtimeConfig_shared_1 = require_runtimeConfig_shared4(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared3(); var smithy_client_1 = require_dist_cjs35(); var util_defaults_mode_node_1 = require_dist_cjs45(); var smithy_client_2 = require_dist_cjs35(); @@ -18795,6 +18740,28 @@ var require_runtimeConfig4 = __commonJS({ } }); +// ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeExtensions.js +var require_runtimeExtensions3 = __commonJS({ + "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/runtimeExtensions.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveRuntimeExtensions = void 0; + var smithy_client_1 = require_dist_cjs35(); + var asPartial = (t) => t; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration) + }; + }; + exports.resolveRuntimeExtensions = resolveRuntimeExtensions; + } +}); + // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/SFNClient.js var require_SFNClient = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/SFNClient.js"(exports) { @@ -18815,10 +18782,11 @@ var require_SFNClient = __commonJS({ return smithy_client_1.Client; } }); var EndpointParameters_1 = require_EndpointParameters(); - var runtimeConfig_1 = require_runtimeConfig4(); + var runtimeConfig_1 = require_runtimeConfig3(); + var runtimeExtensions_1 = require_runtimeExtensions3(); var SFNClient = class extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); @@ -18826,8 +18794,9 @@ var require_SFNClient = __commonJS({ const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5); const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6); - super(_config_7); - this.config = _config_7; + const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); @@ -18865,7 +18834,7 @@ var require_SFNServiceException = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/models_0.js -var require_models_04 = __commonJS({ +var require_models_03 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/models_0.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -19661,7 +19630,7 @@ var require_Aws_json1_0 = __commonJS({ exports.de_UpdateStateMachineAliasCommand = exports.de_UpdateStateMachineCommand = exports.de_UpdateMapRunCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopExecutionCommand = exports.de_StartSyncExecutionCommand = exports.de_StartExecutionCommand = exports.de_SendTaskSuccessCommand = exports.de_SendTaskHeartbeatCommand = exports.de_SendTaskFailureCommand = exports.de_PublishStateMachineVersionCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStateMachineVersionsCommand = exports.de_ListStateMachinesCommand = exports.de_ListStateMachineAliasesCommand = exports.de_ListMapRunsCommand = exports.de_ListExecutionsCommand = void 0; var protocol_http_1 = require_dist_cjs2(); var smithy_client_1 = require_dist_cjs35(); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var SFNServiceException_1 = require_SFNServiceException(); var se_CreateActivityCommand = async (input, context) => { const headers = sharedHeaders("CreateActivity"); @@ -22024,7 +21993,7 @@ var require_CreateStateMachineAliasCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var CreateStateMachineAliasCommand = class _CreateStateMachineAliasCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22079,7 +22048,7 @@ var require_CreateStateMachineCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var CreateStateMachineCommand = class _CreateStateMachineCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22404,7 +22373,7 @@ var require_DescribeExecutionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var DescribeExecutionCommand = class _DescribeExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22513,7 +22482,7 @@ var require_DescribeStateMachineAliasCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var DescribeStateMachineAliasCommand = class _DescribeStateMachineAliasCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22568,7 +22537,7 @@ var require_DescribeStateMachineCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var DescribeStateMachineCommand = class _DescribeStateMachineCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22623,7 +22592,7 @@ var require_DescribeStateMachineForExecutionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var DescribeStateMachineForExecutionCommand = class _DescribeStateMachineForExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22678,7 +22647,7 @@ var require_GetActivityTaskCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var GetActivityTaskCommand = class _GetActivityTaskCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -22733,7 +22702,7 @@ var require_GetExecutionHistoryCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var GetExecutionHistoryCommand = class _GetExecutionHistoryCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23166,7 +23135,7 @@ var require_PublishStateMachineVersionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var PublishStateMachineVersionCommand = class _PublishStateMachineVersionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23221,7 +23190,7 @@ var require_SendTaskFailureCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var SendTaskFailureCommand = class _SendTaskFailureCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23330,7 +23299,7 @@ var require_SendTaskSuccessCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var SendTaskSuccessCommand = class _SendTaskSuccessCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23385,7 +23354,7 @@ var require_StartExecutionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var StartExecutionCommand = class _StartExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23440,7 +23409,7 @@ var require_StartSyncExecutionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var StartSyncExecutionCommand = class _StartSyncExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23495,7 +23464,7 @@ var require_StopExecutionCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var StopExecutionCommand = class _StopExecutionCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23712,7 +23681,7 @@ var require_UpdateStateMachineAliasCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var UpdateStateMachineAliasCommand = class _UpdateStateMachineAliasCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23767,7 +23736,7 @@ var require_UpdateStateMachineCommand = __commonJS({ Object.defineProperty(exports, "$Command", { enumerable: true, get: function() { return smithy_client_1.Command; } }); - var models_0_1 = require_models_04(); + var models_0_1 = require_models_03(); var Aws_json1_0_1 = require_Aws_json1_0(); var UpdateStateMachineCommand = class _UpdateStateMachineCommand extends smithy_client_1.Command { static getEndpointParameterInstructions() { @@ -23896,7 +23865,7 @@ var require_SFN = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/index.js -var require_commands4 = __commonJS({ +var require_commands3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/commands/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -24132,17 +24101,17 @@ var require_pagination4 = __commonJS({ }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/index.js -var require_models4 = __commonJS({ +var require_models3 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/models/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - tslib_1.__exportStar(require_models_04(), exports); + tslib_1.__exportStar(require_models_03(), exports); } }); // ../../../node_modules/@aws-sdk/client-sfn/dist-cjs/index.js -var require_dist_cjs54 = __commonJS({ +var require_dist_cjs53 = __commonJS({ "../../../node_modules/@aws-sdk/client-sfn/dist-cjs/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -24150,9 +24119,9 @@ var require_dist_cjs54 = __commonJS({ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); tslib_1.__exportStar(require_SFNClient(), exports); tslib_1.__exportStar(require_SFN(), exports); - tslib_1.__exportStar(require_commands4(), exports); + tslib_1.__exportStar(require_commands3(), exports); tslib_1.__exportStar(require_pagination4(), exports); - tslib_1.__exportStar(require_models4(), exports); + tslib_1.__exportStar(require_models3(), exports); var SFNServiceException_1 = require_SFNServiceException(); Object.defineProperty(exports, "SFNServiceException", { enumerable: true, get: function() { return SFNServiceException_1.SFNServiceException; @@ -30615,9 +30584,6 @@ var require_lib4 = __commonJS({ if (typeof agent === "function") { agent = agent(parsedURL); } - if (!headers.has("Connection") && !agent) { - headers.set("Connection", "close"); - } return Object.assign({}, parsedURL, { method: request2.method, headers: exportNodeCompatibleHeaders(headers), @@ -30889,6 +30855,7 @@ var require_lib4 = __commonJS({ exports.Request = Request; exports.Response = Response2; exports.FetchError = FetchError; + exports.AbortError = AbortError; } }); @@ -31424,7 +31391,7 @@ var import_helpers_internal = __toESM(require_helpers_internal()); // lib/assertions/providers/lambda-handler/base.ts var https = __toESM(require("https")); var url = __toESM(require("url")); -var import_client_sfn = __toESM(require_dist_cjs54()); +var import_client_sfn = __toESM(require_dist_cjs53()); var CustomResourceHandler = class { constructor(event, context) { this.event = event; diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/cdk.out index 560dae10d018f..2313ab5436501 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"33.0.0"} \ No newline at end of file +{"version":"34.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/integ.json index aafc29ca1cf24..79f2a0e3e158d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "testCases": { "Integ/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/manifest.json index 0783bffe542e5..833601b5f97e0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "artifacts": { "AppSyncIntegLogRetention.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}/e7c04bfd0ba12d51c13f271474996399d040fed6d6791d65ac6b25ee347d7448.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b2c44470595b4a4fc5e8be9f7fc467dc2ca5e1c86bfdee79389a6196b2077a24.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -118,7 +118,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}/869a65672181c0e31d21022d453c80206a69580b01601b1985f5e4350eedf4d3.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6e888267dce80479493591bf1ff3b6c6bb9a2acc1b1942e0c50a60342478f132.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/tree.json index 50ceb7af10fd4..dd011486b4cb6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.log-retention.js.snapshot/tree.json @@ -304,7 +304,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "Exports": { @@ -322,7 +322,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "BootstrapVersion": { @@ -360,7 +360,7 @@ "path": "Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "DeployAssert": { @@ -380,7 +380,7 @@ "path": "Integ/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsdescribeLogGroupsb47bd431584c5dacce67df7a7092125e/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, @@ -452,7 +452,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "BootstrapVersion": { @@ -494,7 +494,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/ChatbotLogRetentionInteg.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/ChatbotLogRetentionInteg.assets.json index 0a64e9eb81e0f..ee16561a5e9ab 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/ChatbotLogRetentionInteg.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/ChatbotLogRetentionInteg.assets.json @@ -1,20 +1,20 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { - "2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e": { + "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0": { "source": { - "path": "asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e", + "path": "asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e.zip", + "objectKey": "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "42b993d37b88e50922c72958559933684cc7c6af89aad94dc92bfd776348e8a2": { + "029b15e6ecfd198fff7e70506504a268bbc1eb8454ac494d1b7b12fd74acbf0f": { "source": { "path": "ChatbotLogRetentionInteg.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "42b993d37b88e50922c72958559933684cc7c6af89aad94dc92bfd776348e8a2.json", + "objectKey": "029b15e6ecfd198fff7e70506504a268bbc1eb8454ac494d1b7b12fd74acbf0f.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-chatbot/test/integ.chatbot-logretention.js.snapshot/ChatbotLogRetentionInteg.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/ChatbotLogRetentionInteg.template.json index 05d04ce30282d..da1b78a88a813 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/ChatbotLogRetentionInteg.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/ChatbotLogRetentionInteg.template.json @@ -127,11 +127,12 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e.zip" + "S3Key": "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0.zip" }, "Role": { "Fn::GetAtt": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.js deleted file mode 100644 index 2bf93c30071a1..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = void 0; -/* eslint-disable no-console */ -// eslint-disable-next-line import/no-extraneous-dependencies -const Logs = require("@aws-sdk/client-cloudwatch-logs"); -/** - * Creates a log group and doesn't throw if it exists. - */ -async function createLogGroupSafe(logGroupName, client, withDelay) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.CreateLogGroupCommand(params); - await client.send(command); - } - catch (error) { - if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { - // The log group is already created by the lambda execution - return; - } - throw error; - } - }); -} -/** - * Deletes a log group and doesn't throw if it does not exist. - */ -async function deleteLogGroup(logGroupName, client, withDelay) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.DeleteLogGroupCommand(params); - await client.send(command); - } - catch (error) { - if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { - // The log group doesn't exist - return; - } - throw error; - } - }); -} -/** - * Puts or deletes a retention policy on a log group. - */ -async function setRetentionPolicy(logGroupName, client, withDelay, retentionInDays) { - await withDelay(async () => { - if (!retentionInDays) { - const params = { logGroupName }; - const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); - await client.send(deleteCommand); - } - else { - const params = { logGroupName, retentionInDays }; - const putCommand = new Logs.PutRetentionPolicyCommand(params); - await client.send(putCommand); - } - }); -} -async function handler(event, context) { - try { - console.log(JSON.stringify({ ...event, ResponseURL: '...' })); - // The target log group - const logGroupName = event.ResourceProperties.LogGroupName; - // The region of the target log group - const logGroupRegion = event.ResourceProperties.LogGroupRegion; - // Parse to AWS SDK retry options - const withDelay = makeWithDelay(parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries)); - const sdkConfig = { - logger: console, - region: logGroupRegion, - }; - const client = new Logs.CloudWatchLogsClient(sdkConfig); - if (event.RequestType === 'Create' || event.RequestType === 'Update') { - // Act on the target log group - await createLogGroupSafe(logGroupName, client, withDelay); - await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); - // Configure the Log Group for the Custom Resource function itself - if (event.RequestType === 'Create') { - const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ - logger: console, - region: process.env.AWS_REGION, - }); - // Set a retention policy of 1 day on the logs of this very function. - // Due to the async nature of the log group creation, the log group for this function might - // still be not created yet at this point. Therefore we attempt to create it. - // In case it is being created, createLogGroupSafe will handle the conflict. - await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); - // If createLogGroupSafe fails, the log group is not created even after multiple attempts. - // In this case we have nothing to set the retention policy on but an exception will skip - // the next line. - await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); - } - } - // When the requestType is delete, delete the log group if the removal policy is delete - if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { - await deleteLogGroup(logGroupName, client, withDelay); - // else retain the log group - } - await respond('SUCCESS', 'OK', logGroupName); - } - catch (e) { - console.log(e); - await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); - } - function respond(responseStatus, reason, physicalResourceId) { - const responseBody = JSON.stringify({ - Status: responseStatus, - Reason: reason, - PhysicalResourceId: physicalResourceId, - StackId: event.StackId, - RequestId: event.RequestId, - LogicalResourceId: event.LogicalResourceId, - Data: { - // Add log group name as part of the response so that it's available via Fn::GetAtt - LogGroupName: event.ResourceProperties.LogGroupName, - }, - }); - console.log('Responding', responseBody); - // eslint-disable-next-line @typescript-eslint/no-require-imports - const parsedUrl = require('url').parse(event.ResponseURL); - const requestOptions = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { - 'content-type': '', - 'content-length': Buffer.byteLength(responseBody, 'utf8'), - }, - }; - return new Promise((resolve, reject) => { - try { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const request = require('https').request(requestOptions, resolve); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); - } -} -exports.handler = handler; -function parseIntOptional(value, base = 10) { - if (value === undefined) { - return undefined; - } - return parseInt(value, base); -} -function makeWithDelay(maxRetries = 10, delay = 100) { - // If we try to update the log group, then due to the async nature of - // Lambda logging there could be a race condition when the same log group is - // already being created by the lambda execution. This can sometime result in - // an error "OperationAbortedException: A conflicting operation is currently - // in progress...Please try again." - // To avoid an error, we do as requested and try again. - return async (block) => { - do { - try { - return await block(); - } - catch (error) { - if (error instanceof Logs.OperationAbortedException || error.name === 'OperationAbortedException') { - if (maxRetries > 0) { - maxRetries--; - await new Promise(resolve => setTimeout(resolve, delay)); - continue; - } - else { - // The log group is still being changed by another execution but we are out of retries - throw new Error('Out of attempts to change log group'); - } - } - throw error; - } - } while (true); // exit happens on retry count check - }; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNkRBQTZEO0FBQzdELHdEQUF3RDtBQWV4RDs7R0FFRztBQUNILEtBQUssVUFBVSxrQkFBa0IsQ0FBQyxZQUFvQixFQUFFLE1BQWlDLEVBQUUsU0FBd0Q7SUFDakosTUFBTSxTQUFTLENBQUMsS0FBSyxJQUFJLEVBQUU7UUFDekIsSUFBSTtZQUNGLE1BQU0sTUFBTSxHQUFHLEVBQUUsWUFBWSxFQUFFLENBQUM7WUFDaEMsTUFBTSxPQUFPLEdBQUcsSUFBSSxJQUFJLENBQUMscUJBQXFCLENBQUMsTUFBTSxDQUFDLENBQUM7WUFDdkQsTUFBTSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDO1NBRTVCO1FBQUM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lcnJvcjogYW55KSB7XG4gICAgICAgIGlmIChlcnJvciBpbnN0YW5jZW9mIExvZ3MuT3BlcmF0aW9uQWJvcnRlZEV4Y2VwdGlvbiB8fCBlcnJvci5uYW1lID09PSAnT3BlcmF0aW9uQWJvcnRlZEV4Y2VwdGlvbicpIHtcbiAgICAgICAgICBpZiAobWF4UmV0cmllcyA+IDApIHtcbiAgICAgICAgICAgIG1heFJldHJpZXMtLTtcbiAgICAgICAgICAgIGF3YWl0IG5ldyBQcm9taXNlKHJlc29sdmUgPT4gc2V0VGltZW91dChyZXNvbHZlLCBkZWxheSkpO1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vIFRoZSBsb2cgZ3JvdXAgaXMgc3RpbGwgYmVpbmcgY2hhbmdlZCBieSBhbm90aGVyIGV4ZWN1dGlvbiBidXQgd2UgYXJlIG91dCBvZiByZXRyaWVzXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ091dCBvZiBhdHRlbXB0cyB0byBjaGFuZ2UgbG9nIGdyb3VwJyk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRocm93IGVycm9yO1xuICAgICAgfVxuICAgIH0gd2hpbGUgKHRydWUpOyAvLyBleGl0IGhhcHBlbnMgb24gcmV0cnkgY291bnQgY2hlY2tcbiAgfTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js new file mode 100644 index 0000000000000..8d4f5cf13f88d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js @@ -0,0 +1,192 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +/* eslint-disable no-console */ +// eslint-disable-next-line import/no-extraneous-dependencies +const Logs = require("@aws-sdk/client-cloudwatch-logs"); +/** + * Creates a log group and doesn't throw if it exists. + */ +async function createLogGroupSafe(logGroupName, client, withDelay) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.CreateLogGroupCommand(params); + await client.send(command); + } + catch (error) { + if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { + // The log group is already created by the lambda execution + return; + } + throw error; + } + }); +} +/** + * Deletes a log group and doesn't throw if it does not exist. + */ +async function deleteLogGroup(logGroupName, client, withDelay) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.DeleteLogGroupCommand(params); + await client.send(command); + } + catch (error) { + if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { + // The log group doesn't exist + return; + } + throw error; + } + }); +} +/** + * Puts or deletes a retention policy on a log group. + */ +async function setRetentionPolicy(logGroupName, client, withDelay, retentionInDays) { + await withDelay(async () => { + if (!retentionInDays) { + const params = { logGroupName }; + const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); + await client.send(deleteCommand); + } + else { + const params = { logGroupName, retentionInDays }; + const putCommand = new Logs.PutRetentionPolicyCommand(params); + await client.send(putCommand); + } + }); +} +async function handler(event, context) { + try { + console.log(JSON.stringify({ ...event, ResponseURL: '...' })); + // The target log group + const logGroupName = event.ResourceProperties.LogGroupName; + // The region of the target log group + const logGroupRegion = event.ResourceProperties.LogGroupRegion; + // Parse to AWS SDK retry options + const maxRetries = parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries) ?? 5; + const withDelay = makeWithDelay(maxRetries); + const sdkConfig = { + logger: console, + region: logGroupRegion, + maxAttempts: Math.max(5, maxRetries), // Use a minimum for SDK level retries, because it might include retryable failures that withDelay isn't checking for + }; + const client = new Logs.CloudWatchLogsClient(sdkConfig); + if (event.RequestType === 'Create' || event.RequestType === 'Update') { + // Act on the target log group + await createLogGroupSafe(logGroupName, client, withDelay); + await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); + // Configure the Log Group for the Custom Resource function itself + if (event.RequestType === 'Create') { + const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ + logger: console, + region: process.env.AWS_REGION, + }); + // Set a retention policy of 1 day on the logs of this very function. + // Due to the async nature of the log group creation, the log group for this function might + // still be not created yet at this point. Therefore we attempt to create it. + // In case it is being created, createLogGroupSafe will handle the conflict. + await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); + // If createLogGroupSafe fails, the log group is not created even after multiple attempts. + // In this case we have nothing to set the retention policy on but an exception will skip + // the next line. + await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); + } + } + // When the requestType is delete, delete the log group if the removal policy is delete + if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { + await deleteLogGroup(logGroupName, client, withDelay); + // else retain the log group + } + await respond('SUCCESS', 'OK', logGroupName); + } + catch (e) { + console.log(e); + await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); + } + function respond(responseStatus, reason, physicalResourceId) { + const responseBody = JSON.stringify({ + Status: responseStatus, + Reason: reason, + PhysicalResourceId: physicalResourceId, + StackId: event.StackId, + RequestId: event.RequestId, + LogicalResourceId: event.LogicalResourceId, + Data: { + // Add log group name as part of the response so that it's available via Fn::GetAtt + LogGroupName: event.ResourceProperties.LogGroupName, + }, + }); + console.log('Responding', responseBody); + // eslint-disable-next-line @typescript-eslint/no-require-imports + const parsedUrl = require('url').parse(event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { + 'content-type': '', + 'content-length': Buffer.byteLength(responseBody, 'utf8'), + }, + }; + return new Promise((resolve, reject) => { + try { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const request = require('https').request(requestOptions, resolve); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); + } +} +exports.handler = handler; +function parseIntOptional(value, base = 10) { + if (value === undefined) { + return undefined; + } + return parseInt(value, base); +} +function makeWithDelay(maxRetries, delayBase = 100, delayCap = 10 * 1000) { + // If we try to update the log group, then due to the async nature of + // Lambda logging there could be a race condition when the same log group is + // already being created by the lambda execution. This can sometime result in + // an error "OperationAbortedException: A conflicting operation is currently + // in progress...Please try again." + // To avoid an error, we do as requested and try again. + return async (block) => { + let attempts = 0; + do { + try { + return await block(); + } + catch (error) { + if (error instanceof Logs.OperationAbortedException + || error.name === 'OperationAbortedException' + || error.name === 'ThrottlingException' // There is no class to check with instanceof, see https://github.com/aws/aws-sdk-js-v3/issues/5140 + ) { + if (attempts < maxRetries) { + attempts++; + await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); + continue; + } + else { + // The log group is still being changed by another execution but we are out of retries + throw new Error('Out of attempts to change log group'); + } + } + throw error; + } + } while (true); // exit happens on retry count check + }; +} +function calculateDelay(attempt, base, cap) { + return Math.round(Math.random() * Math.min(cap, base * 2 ** attempt)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNkRBQTZEO0FBQzdELHdEQUF3RDtBQWV4RDs7R0FFRztBQUNILEtBQUssVUFBVSxrQkFBa0IsQ0FBQyxZQUFvQixFQUFFLE1BQWlDLEVBQUUsU0FBd0Q7SUFDakosTUFBTSxTQUFTLENBQUMsS0FBSyxJQUFJLEVBQUU7UUFDekIsSUFBSTtZQUNGLE1BQU0sTUFBTSxHQUFHLEVBQUUsWUFBWSxFQUFFLENBQUM7WUFDaEMsTUFBTSxPQUFPLEdBQUcsSUFBSSxJQUFJLENBQUMscUJBQXFCLENBQUMsTUFBTSxDQUFDLENBQUM7WUFDdkQsTUFBTSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDO1NBRTVCO1FBQUMsT0FBTyxLQUFVLEVBQUU7WUFDbkIsSUFBSSxLQUFLLFlBQVksSUFBSSxDQUFDLDhCQUE4QixJQUFJLEtBQUssQ0FBQyxJQUFJLEtBQUssZ0NBQWdDLEVBQUU7Z0JBQzNHLDJEQUEyRDtnQkFDM0QsT0FBTzthQUNSO1lBRUQsTUFBTSxLQUFLLENBQUM7U0FDYjtJQUNILENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUVEOztHQUVHO0FBQ0gsS0FBSyxVQUFVLGNBQWMsQ0FBQyxZQUFvQixFQUFFLE1BQWlDLEVBQUUsU0FBd0Q7SUFDN0ksTUFBTSxTQUFTLENBQUMsS0FBSyxJQUFJLEVBQUU7UUFDekIsSUFBSTtZQUNGLE1BQU0sTUFBTSxHQUFHLEVBQUUsWUFBWSxFQU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dXQocmVzb2x2ZSwgY2FsY3VsYXRlRGVsYXkoYXR0ZW1wdHMsIGRlbGF5QmFzZSwgZGVsYXlDYXApKSk7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gVGhlIGxvZyBncm91cCBpcyBzdGlsbCBiZWluZyBjaGFuZ2VkIGJ5IGFub3RoZXIgZXhlY3V0aW9uIGJ1dCB3ZSBhcmUgb3V0IG9mIHJldHJpZXNcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignT3V0IG9mIGF0dGVtcHRzIHRvIGNoYW5nZSBsb2cgZ3JvdXAnKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICB9XG4gICAgfSB3aGlsZSAodHJ1ZSk7IC8vIGV4aXQgaGFwcGVucyBvbiByZXRyeSBjb3VudCBjaGVja1xuICB9O1xufVxuXG5mdW5jdGlvbiBjYWxjdWxhdGVEZWxheShhdHRlbXB0OiBudW1iZXIsIGJhc2U6IG51bWJlciwgY2FwOiBudW1iZXIpOiBudW1iZXIge1xuICByZXR1cm4gTWF0aC5yb3VuZChNYXRoLnJhbmRvbSgpICogTWF0aC5taW4oY2FwLCBiYXNlICogMiAqKiBhdHRlbXB0KSk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts similarity index 92% rename from packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts index eea89d75c8795..88843fe3fa016 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts @@ -91,11 +91,13 @@ export async function handler(event: LogRetentionEvent, context: AWSLambda.Conte const logGroupRegion = event.ResourceProperties.LogGroupRegion; // Parse to AWS SDK retry options - const withDelay = makeWithDelay(parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries)); + const maxRetries = parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries) ?? 5; + const withDelay = makeWithDelay(maxRetries); const sdkConfig: Logs.CloudWatchLogsClientConfig = { logger: console, region: logGroupRegion, + maxAttempts: Math.max(5, maxRetries), // Use a minimum for SDK level retries, because it might include retryable failures that withDelay isn't checking for }; const client = new Logs.CloudWatchLogsClient(sdkConfig); @@ -185,7 +187,7 @@ function parseIntOptional(value?: string, base = 10): number | undefined { } function makeWithDelay( - maxRetries: number = 5, + maxRetries: number, delayBase: number = 100, delayCap = 10 * 1000, // 10s ): (block: () => Promise) => Promise { @@ -202,7 +204,11 @@ function makeWithDelay( try { return await block(); } catch (error: any) { - if (error instanceof Logs.OperationAbortedException || error.name === 'OperationAbortedException') { + if ( + error instanceof Logs.OperationAbortedException + || error.name === 'OperationAbortedException' + || error.name === 'ThrottlingException' // There is no class to check with instanceof, see https://github.com/aws/aws-sdk-js-v3/issues/5140 + ) { if (attempts < maxRetries ) { attempts++; await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/cdk.out index 560dae10d018f..2313ab5436501 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"33.0.0"} \ No newline at end of file +{"version":"34.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/integ.json index 8d853ee159d14..d55c7377750ec 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "testCases": { "integ.chatbot-logretention": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/manifest.json index 6db0bdaf14de5..e57feec332133 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "artifacts": { "ChatbotLogRetentionInteg.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}/42b993d37b88e50922c72958559933684cc7c6af89aad94dc92bfd776348e8a2.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/029b15e6ecfd198fff7e70506504a268bbc1eb8454ac494d1b7b12fd74acbf0f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/tree.json index a919f40f316b9..56d6d8bd17a1b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/tree.json @@ -281,7 +281,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "BootstrapVersion": { @@ -311,7 +311,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/manifest.json index 3f289e5e08d88..8a924af72435a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/manifest.json @@ -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}/89ac1261af0d02076c975aed5e65b56ae6ff790bda0ad31a876540151704ddd6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7fd92a4ee9b055cd48c8de699a93c24bb32b7e3ce832833aa7ab0b0591d28a79.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/replace-depends-on-test.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/replace-depends-on-test.assets.json index a9dc7f2aed399..1a2c28acba11b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/replace-depends-on-test.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/replace-depends-on-test.assets.json @@ -14,7 +14,7 @@ } } }, - "89ac1261af0d02076c975aed5e65b56ae6ff790bda0ad31a876540151704ddd6": { + "7fd92a4ee9b055cd48c8de699a93c24bb32b7e3ce832833aa7ab0b0591d28a79": { "source": { "path": "replace-depends-on-test.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "89ac1261af0d02076c975aed5e65b56ae6ff790bda0ad31a876540151704ddd6.json", + "objectKey": "7fd92a4ee9b055cd48c8de699a93c24bb32b7e3ce832833aa7ab0b0591d28a79.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-cloudformation/test/integ.core-deps.js.snapshot/replace-depends-on-test.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/replace-depends-on-test.template.json index 83a336bc81e0f..3333cbeba5b2b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/replace-depends-on-test.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/replace-depends-on-test.template.json @@ -109,6 +109,7 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/tree.json index c3edc05079da1..ee76d98573206 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudformation/test/integ.core-deps.js.snapshot/tree.json @@ -223,7 +223,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "CustomPolicy": { @@ -424,7 +424,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "Stack2": { @@ -568,7 +568,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "BootstrapVersion": { @@ -606,7 +606,7 @@ "path": "DependsOnTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "DeployAssert": { @@ -652,7 +652,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/integtestcognitoDefaultTestDeployAssert6F2623C9.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/integtestcognitoDefaultTestDeployAssert6F2623C9.assets.json index f1a0d862e3529..5ce8164ae9f47 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/integtestcognitoDefaultTestDeployAssert6F2623C9.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/integtestcognitoDefaultTestDeployAssert6F2623C9.assets.json @@ -14,7 +14,7 @@ } } }, - "3a0208b6f355e992d77ea5492af0b86718b237bf06a5321ef97180650f36093a": { + "1cf11e5270ef01aa7aa279d538e826d4e17cb0e1c1eca7326ecf32e09d7a4baf": { "source": { "path": "integtestcognitoDefaultTestDeployAssert6F2623C9.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3a0208b6f355e992d77ea5492af0b86718b237bf06a5321ef97180650f36093a.json", + "objectKey": "1cf11e5270ef01aa7aa279d538e826d4e17cb0e1c1eca7326ecf32e09d7a4baf.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-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/integtestcognitoDefaultTestDeployAssert6F2623C9.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/integtestcognitoDefaultTestDeployAssert6F2623C9.template.json index 2aee89777e4d5..fd0a8892ab886 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/integtestcognitoDefaultTestDeployAssert6F2623C9.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/integtestcognitoDefaultTestDeployAssert6F2623C9.template.json @@ -27,7 +27,7 @@ } }, "flattenResponse": "false", - "salt": "1693473616337" + "salt": "1693928813246" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/manifest.json index ebc0127c77972..f02491db5f887 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2-actions/test/integ.cognito.js.snapshot/manifest.json @@ -316,7 +316,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}/3a0208b6f355e992d77ea5492af0b86718b237bf06a5321ef97180650f36093a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1cf11e5270ef01aa7aa279d538e826d4e17cb0e1c1eca7326ecf32e09d7a4baf.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/IntegTestAlbOidcDefaultTestDeployAssert2476ECB6.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/IntegTestAlbOidcDefaultTestDeployAssert2476ECB6.assets.json index c44dfd1b62e79..4602537989c8d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/IntegTestAlbOidcDefaultTestDeployAssert2476ECB6.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/IntegTestAlbOidcDefaultTestDeployAssert2476ECB6.assets.json @@ -14,7 +14,7 @@ } } }, - "505025e4fb22b642200b864a9056f0e82ac2ef9fcb792697f11acaa9a7239b27": { + "2a820ae55dcee523cb12bc586162492260f242fdc7b9457c9808be1ed0bfed32": { "source": { "path": "IntegTestAlbOidcDefaultTestDeployAssert2476ECB6.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "505025e4fb22b642200b864a9056f0e82ac2ef9fcb792697f11acaa9a7239b27.json", + "objectKey": "2a820ae55dcee523cb12bc586162492260f242fdc7b9457c9808be1ed0bfed32.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-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/IntegTestAlbOidcDefaultTestDeployAssert2476ECB6.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/IntegTestAlbOidcDefaultTestDeployAssert2476ECB6.template.json index 50fde7470d472..f10d1a6d89e0f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/IntegTestAlbOidcDefaultTestDeployAssert2476ECB6.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/IntegTestAlbOidcDefaultTestDeployAssert2476ECB6.template.json @@ -27,7 +27,7 @@ } }, "flattenResponse": "false", - "salt": "1693473611834" + "salt": "1693928813179" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/manifest.json index 6722e43480650..a2b36d7c2f8c0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.oidc.js.snapshot/manifest.json @@ -334,7 +334,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}/505025e4fb22b642200b864a9056f0e82ac2ef9fcb792697f11acaa9a7239b27.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2a820ae55dcee523cb12bc586162492260f242fdc7b9457c9808be1ed0bfed32.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/cdk-integ-elasticsearch-custom-kms-key.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/cdk-integ-elasticsearch-custom-kms-key.assets.json index dba3ff80acbec..51e8aefabaa78 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/cdk-integ-elasticsearch-custom-kms-key.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/cdk-integ-elasticsearch-custom-kms-key.assets.json @@ -14,7 +14,7 @@ } } }, - "a76a2418f4ff6c4e798c324bcf1a304eeda9f2d0e38ef4945613d54f21632970": { + "f969c4270ef283231a0aa2c9e122853e61755b7d92d8b240aaddd1a221fc80f0": { "source": { "path": "cdk-integ-elasticsearch-custom-kms-key.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a76a2418f4ff6c4e798c324bcf1a304eeda9f2d0e38ef4945613d54f21632970.json", + "objectKey": "f969c4270ef283231a0aa2c9e122853e61755b7d92d8b240aaddd1a221fc80f0.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-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/cdk-integ-elasticsearch-custom-kms-key.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/cdk-integ-elasticsearch-custom-kms-key.template.json index a4236f26e4249..b14875915c9c4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/cdk-integ-elasticsearch-custom-kms-key.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/cdk-integ-elasticsearch-custom-kms-key.template.json @@ -105,7 +105,7 @@ ] }, "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfad\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "DomainESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfadCustomResourcePolicy0B41F6DF" @@ -253,7 +253,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "DomainESAccessPolicyCustomResourcePolicy9747FC42" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/manifest.json index 76640e1a746b3..79398d797b124 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.js.snapshot/manifest.json @@ -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}/a76a2418f4ff6c4e798c324bcf1a304eeda9f2d0e38ef4945613d54f21632970.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f969c4270ef283231a0aa2c9e122853e61755b7d92d8b240aaddd1a221fc80f0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -51,12 +51,6 @@ "data": "DomainAppLogs21698C1B" } ], - "/cdk-integ-elasticsearch-custom-kms-key/Domain/ESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfad": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/cdk-integ-elasticsearch-custom-kms-key/Domain/ESLogGroupPolicyc82ca7bfe2f2589b859ebab89e88da2efd284adfad/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -75,12 +69,6 @@ "data": "Domain66AC69E0" } ], - "/cdk-integ-elasticsearch-custom-kms-key/Domain/ESAccessPolicy": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/cdk-integ-elasticsearch-custom-kms-key/Domain/ESAccessPolicy/Resource/Default": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/cdk-integ-elasticsearch-unsignedbasicauth.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/cdk-integ-elasticsearch-unsignedbasicauth.assets.json index 99ba91ef73cc7..0221dc746ac00 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/cdk-integ-elasticsearch-unsignedbasicauth.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/cdk-integ-elasticsearch-unsignedbasicauth.assets.json @@ -14,7 +14,7 @@ } } }, - "d1c18a05869165ea7795d9139802d9268790401402fd2ae5aa0245dd50b4025e": { + "7d6e4bc96eccdd155efbf68f381d6d7de018aab49a716df6aadd46bf8327e697": { "source": { "path": "cdk-integ-elasticsearch-unsignedbasicauth.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d1c18a05869165ea7795d9139802d9268790401402fd2ae5aa0245dd50b4025e.json", + "objectKey": "7d6e4bc96eccdd155efbf68f381d6d7de018aab49a716df6aadd46bf8327e697.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-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/cdk-integ-elasticsearch-unsignedbasicauth.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/cdk-integ-elasticsearch-unsignedbasicauth.template.json index d321dfb52523b..ca2e8937232cc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/cdk-integ-elasticsearch-unsignedbasicauth.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/cdk-integ-elasticsearch-unsignedbasicauth.template.json @@ -119,7 +119,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "DomainESAccessPolicyCustomResourcePolicy9747FC42" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/manifest.json index ef42e7632a7c6..1e41df83202f6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.js.snapshot/manifest.json @@ -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}/d1c18a05869165ea7795d9139802d9268790401402fd2ae5aa0245dd50b4025e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7d6e4bc96eccdd155efbf68f381d6d7de018aab49a716df6aadd46bf8327e697.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -45,12 +45,6 @@ "data": "Domain66AC69E0" } ], - "/cdk-integ-elasticsearch-unsignedbasicauth/Domain/ESAccessPolicy": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/cdk-integ-elasticsearch-unsignedbasicauth/Domain/ESAccessPolicy/Resource/Default": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.assets.json index f845cb4de14b3..28c0078a266ed 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.assets.json @@ -14,7 +14,7 @@ } } }, - "2990d65b903fe7ea84ed3a80a8113883c22f71f18e9849f3b1acb915484b6bdf": { + "664b6aaccc6bb34f3c06fa65796b208956cd3f77d1d05925951b709c3ef73e55": { "source": { "path": "LogGroupDefaultTestDeployAssert353EE07A.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2990d65b903fe7ea84ed3a80a8113883c22f71f18e9849f3b1acb915484b6bdf.json", + "objectKey": "664b6aaccc6bb34f3c06fa65796b208956cd3f77d1d05925951b709c3ef73e55.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-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json index a29fd58c57c54..8b48e36879d5e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json @@ -1,6 +1,6 @@ { "Resources": { - "AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e": { + "AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f": { "Type": "Custom::DeployAssert@SdkCallEventBridgeputEvents", "Properties": { "ServiceToken": { @@ -12,10 +12,10 @@ "service": "EventBridge", "api": "putEvents", "parameters": { - "Entries": "[{\"Detail\":\"{\\\"date\\\":\\\"abc1693474304674\\\"}\",\"DetailType\":\"cdk-integ-custom-rule\",\"Source\":\"cdk-integ\"}]" + "Entries": "[{\"Detail\":\"{\\\"date\\\":\\\"abc1693928810164\\\"}\",\"DetailType\":\"cdk-integ-custom-rule\",\"Source\":\"cdk-integ\"}]" }, "flattenResponse": "false", - "salt": "1693474304678" + "salt": "1693928810196" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -99,7 +99,7 @@ } } }, - "AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519": { + "AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07": { "Type": "Custom::DeployAssert@SdkCallCloudWatchLogsfilterLogEvents", "Properties": { "ServiceToken": { @@ -110,7 +110,7 @@ }, "service": "CloudWatchLogs", "api": "filterLogEvents", - "expected": "{\"$StringLike\":\"abc1693474304674\"}", + "expected": "{\"$StringLike\":\"abc1693928810164\"}", "actualPath": "events.0.message", "parameters": { "logGroupName": { @@ -125,27 +125,27 @@ ] ] }, - "startTime": "1693474304674", + "startTime": "1693928810164", "limit": "1" }, "flattenResponse": "true", "outputPaths": [ "events.0.message" ], - "salt": "1693474304679" + "salt": "1693928810198" }, "DependsOn": [ - "AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e" + "AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f" ], "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" } }, "Outputs": { - "AssertionResultsAwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519": { + "AssertionResultsAwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07": { "Value": { "Fn::GetAtt": [ - "AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519", + "AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07", "assertion" ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.assets.json index ae5b2a8809c7e..be46446e230bb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.assets.json @@ -14,7 +14,7 @@ } } }, - "a1c60eaa9612762f49153169328627b5f1bbfd03020da01000683327dcc166b3": { + "8e3d33f08687f91be3b68306d1a8c6d7e2c4e37d2f4ce23550967c682dec79fd": { "source": { "path": "log-group-events.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a1c60eaa9612762f49153169328627b5f1bbfd03020da01000683327dcc166b3.json", + "objectKey": "8e3d33f08687f91be3b68306d1a8c6d7e2c4e37d2f4ce23550967c682dec79fd.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-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.template.json index 44e8d1654a173..b0945aa020bec 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.template.json @@ -100,7 +100,7 @@ ] }, "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimerC63340B025F606BE\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA" @@ -275,7 +275,7 @@ ] }, "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsCustomRule99E1EEF62FFABD78\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6CustomResourcePolicy361E9A96" @@ -406,7 +406,7 @@ ] }, "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimer37DF74C17EF314A8E\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/manifest.json index 06ca702ce5236..aeee07564c91c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/manifest.json @@ -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}/a1c60eaa9612762f49153169328627b5f1bbfd03020da01000683327dcc166b3.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8e3d33f08687f91be3b68306d1a8c6d7e2c4e37d2f4ce23550967c682dec79fd.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -57,12 +57,6 @@ "data": "TimerBF6F831F" } ], - "/log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -93,12 +87,6 @@ "data": "CustomRuleB1CBBADE" } ], - "/log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -123,12 +111,6 @@ "data": "Timer30894E3BB" } ], - "/log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -178,7 +160,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}/2990d65b903fe7ea84ed3a80a8113883c22f71f18e9849f3b1acb915484b6bdf.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/664b6aaccc6bb34f3c06fa65796b208956cd3f77d1d05925951b709c3ef73e55.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -195,10 +177,10 @@ "LogGroupDefaultTestDeployAssert353EE07A.assets" ], "metadata": { - "/LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e/Default/Default": [ + "/LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f/Default/Default": [ { "type": "aws:cdk:logicalId", - "data": "AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e" + "data": "AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f" } ], "/LogGroup/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ @@ -213,16 +195,16 @@ "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" } ], - "/LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519/Default/Default": [ + "/LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07/Default/Default": [ { "type": "aws:cdk:logicalId", - "data": "AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519" + "data": "AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07" } ], - "/LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519/AssertionResults": [ + "/LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07/AssertionResults": [ { "type": "aws:cdk:logicalId", - "data": "AssertionResultsAwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519" + "data": "AssertionResultsAwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07" } ], "/LogGroup/DefaultTest/DeployAssert/BootstrapVersion": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/tree.json index f18d8415a0fd9..1290abcca557a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/tree.json @@ -708,17 +708,17 @@ "id": "DeployAssert", "path": "LogGroup/DefaultTest/DeployAssert", "children": { - "AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e": { - "id": "AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e", + "AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f": { + "id": "AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e/SdkProvider", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e/SdkProvider/AssertionsProvider", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", "version": "10.2.70" @@ -732,11 +732,11 @@ }, "Default": { "id": "Default", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e/Default", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f/Default", "children": { "Default": { "id": "Default", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents3248e2eb89ad699e652ea08fbee13f9e/Default/Default", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEventsa11edac78802d8163d4a2e8dce321c8f/Default/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", "version": "0.0.0" @@ -788,17 +788,17 @@ "version": "10.2.70" } }, - "AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519": { - "id": "AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519", + "AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07": { + "id": "AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519/SdkProvider", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519/SdkProvider/AssertionsProvider", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", "version": "10.2.70" @@ -812,11 +812,11 @@ }, "Default": { "id": "Default", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519/Default", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07/Default", "children": { "Default": { "id": "Default", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519/Default/Default", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07/Default/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", "version": "0.0.0" @@ -830,7 +830,7 @@ }, "AssertionResults": { "id": "AssertionResults", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsbac56f2d40a2b8634eeb01290bc2d519/AssertionResults", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents492c955476ce1c16408114fdbd98ba07/AssertionResults", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/aws-cdk-lambda-log-retention.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/aws-cdk-lambda-log-retention.assets.json index e6fb824ab4c61..13711303437ab 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/aws-cdk-lambda-log-retention.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/aws-cdk-lambda-log-retention.assets.json @@ -14,7 +14,7 @@ } } }, - "8da1dcf23c8f473327b6417b025b1f60e790cdb49bab128e0d1d523f8b8da40c": { + "09cf2cef00ac4e7cce4c977b3d07ab7433514d4a3fb22e10c9618130393c785f": { "source": { "path": "aws-cdk-lambda-log-retention.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "8da1dcf23c8f473327b6417b025b1f60e790cdb49bab128e0d1d523f8b8da40c.json", + "objectKey": "09cf2cef00ac4e7cce4c977b3d07ab7433514d4a3fb22e10c9618130393c785f.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-lambda/test/integ.log-retention.js.snapshot/aws-cdk-lambda-log-retention.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/aws-cdk-lambda-log-retention.template.json index 391ce0ff1a132..bda3108f56b9d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/aws-cdk-lambda-log-retention.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/aws-cdk-lambda-log-retention.template.json @@ -133,6 +133,7 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/manifest.json index 6a62e82a0af9e..71e49afbab727 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/manifest.json @@ -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}/8da1dcf23c8f473327b6417b025b1f60e790cdb49bab128e0d1d523f8b8da40c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/09cf2cef00ac4e7cce4c977b3d07ab7433514d4a3fb22e10c9618130393c785f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/tree.json index 7e72146ced605..9fb4ca3618abe 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.log-retention.js.snapshot/tree.json @@ -265,7 +265,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "OneMonth": { @@ -537,7 +537,7 @@ "path": "LambdaLogRetentionInteg/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "DeployAssert": { @@ -583,7 +583,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/LambdaIntegDefaultTestDeployAssert7BC530B7.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/LambdaIntegDefaultTestDeployAssert7BC530B7.assets.json index 2a31893b6cafa..8c5ec7db3f439 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/LambdaIntegDefaultTestDeployAssert7BC530B7.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/LambdaIntegDefaultTestDeployAssert7BC530B7.assets.json @@ -14,7 +14,7 @@ } } }, - "5dbeb764b38c8189dddc85fd2ecdc6149a818cfba73a18f11fff428878e1779e": { + "d2d2b6f5072ea88bdbd81f001bd6e4249732308facc1e634bc4c243449c56dbf": { "source": { "path": "LambdaIntegDefaultTestDeployAssert7BC530B7.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5dbeb764b38c8189dddc85fd2ecdc6149a818cfba73a18f11fff428878e1779e.json", + "objectKey": "d2d2b6f5072ea88bdbd81f001bd6e4249732308facc1e634bc4c243449c56dbf.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-logs-destinations/test/integ.lambda.js.snapshot/LambdaIntegDefaultTestDeployAssert7BC530B7.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/LambdaIntegDefaultTestDeployAssert7BC530B7.template.json index 147a8e2ac65d3..1377b298a7254 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/LambdaIntegDefaultTestDeployAssert7BC530B7.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/LambdaIntegDefaultTestDeployAssert7BC530B7.template.json @@ -15,7 +15,7 @@ "Entries": "[{\"Detail\":\"{\\\"foo\\\":\\\"bar\\\"}\",\"DetailType\":\"cdk-integ-custom-rule\",\"Source\":\"cdk-lambda-integ\"}]" }, "flattenResponse": "false", - "salt": "1693474289680" + "salt": "1693928807748" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -127,7 +127,7 @@ "WaitTimeSeconds": "20" }, "flattenResponse": "false", - "salt": "1693474289680" + "salt": "1693928807750" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/lambda-logssubscription-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/lambda-logssubscription-integ.assets.json index 911fc8f04869b..afdf157eb4897 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/lambda-logssubscription-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/lambda-logssubscription-integ.assets.json @@ -14,7 +14,7 @@ } } }, - "9b9cf7a6ac48a067f5709522eb58ca9b0b7bf0f72a0dd5db9175d1d71b60aab9": { + "73e7c8ce1899f4976b9f625b32092a0b202a841fe84c895e20e38aa050f0dff8": { "source": { "path": "lambda-logssubscription-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9b9cf7a6ac48a067f5709522eb58ca9b0b7bf0f72a0dd5db9175d1d71b60aab9.json", + "objectKey": "73e7c8ce1899f4976b9f625b32092a0b202a841fe84c895e20e38aa050f0dff8.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-logs-destinations/test/integ.lambda.js.snapshot/lambda-logssubscription-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/lambda-logssubscription-integ.template.json index 1328783c7e2d7..bda604b151e36 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/lambda-logssubscription-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/lambda-logssubscription-integ.template.json @@ -238,7 +238,7 @@ ] }, "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"lambdalogssubscriptionintegEventsLogGroupPolicylambdalogssubscriptionintegCustomRuleBA3E2AD7F3616134\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "EventsLogGroupPolicylambdalogssubscriptionintegCustomRuleBA3E2AD7CustomResourcePolicy0DA87EF1" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/manifest.json index 7051d4740979f..df9f0bb469247 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs-destinations/test/integ.lambda.js.snapshot/manifest.json @@ -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}/9b9cf7a6ac48a067f5709522eb58ca9b0b7bf0f72a0dd5db9175d1d71b60aab9.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/73e7c8ce1899f4976b9f625b32092a0b202a841fe84c895e20e38aa050f0dff8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -87,12 +87,6 @@ "data": "CustomRuleB1CBBADE" } ], - "/lambda-logssubscription-integ/EventsLogGroupPolicylambdalogssubscriptionintegCustomRuleBA3E2AD7": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/lambda-logssubscription-integ/EventsLogGroupPolicylambdalogssubscriptionintegCustomRuleBA3E2AD7/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -154,7 +148,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}/5dbeb764b38c8189dddc85fd2ecdc6149a818cfba73a18f11fff428878e1779e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d2d2b6f5072ea88bdbd81f001bd6e4249732308facc1e634bc4c243449c56dbf.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/LogRetentionIntegRetriesDefaultTestDeployAssert6D1A1A1C.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/LogRetentionIntegRetriesDefaultTestDeployAssert6D1A1A1C.assets.json index 981bfd0350220..0870a81067f75 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/LogRetentionIntegRetriesDefaultTestDeployAssert6D1A1A1C.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/LogRetentionIntegRetriesDefaultTestDeployAssert6D1A1A1C.assets.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries0.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries0.assets.json index 25f8107c811c1..cd5424e95daef 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries0.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries0.assets.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0": { "source": { @@ -14,7 +14,7 @@ } } }, - "9990a29f03d0c5431a972aeb27fc605359cf0093ddd08bfbdf611189e8116726": { + "c03248e8ef2d441a16f2dcbd612489986315d1fc3e2ed8755007dc35c52adc00": { "source": { "path": "aws-cdk-log-retention-integ-retries0.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9990a29f03d0c5431a972aeb27fc605359cf0093ddd08bfbdf611189e8116726.json", + "objectKey": "c03248e8ef2d441a16f2dcbd612489986315d1fc3e2ed8755007dc35c52adc00.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-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries0.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries0.template.json index 5226a72fe3ef4..3603c8e3e48fc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries0.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries0.template.json @@ -580,6 +580,7 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries1.assets.json index 80d0398ee84c1..c2e32a932ea18 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries1.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries1.assets.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0": { "source": { @@ -14,7 +14,7 @@ } } }, - "86fd666939456783b17c970c3813e5a8ee324e05254c7487cabdcb039c586db9": { + "6caef44d453a9963759f82df84dbf057a66ed4d65308fdcdeed7d03241422997": { "source": { "path": "aws-cdk-log-retention-integ-retries1.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "86fd666939456783b17c970c3813e5a8ee324e05254c7487cabdcb039c586db9.json", + "objectKey": "6caef44d453a9963759f82df84dbf057a66ed4d65308fdcdeed7d03241422997.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-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries1.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries1.template.json index bea4c8516c2c1..2b1dad6baca82 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries1.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries1.template.json @@ -580,6 +580,7 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries2.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries2.assets.json index f004c74793b76..6921c3e7f5478 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries2.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries2.assets.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0": { "source": { @@ -14,7 +14,7 @@ } } }, - "80155830078966c61d22e5166c107e5a9a1e6bdc892902f37610c6bef961e7c4": { + "6e0ea013a6b8c4e2dc3640056b78b26229d014d36e82f53c5ae5ffc68e0481ed": { "source": { "path": "aws-cdk-log-retention-integ-retries2.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "80155830078966c61d22e5166c107e5a9a1e6bdc892902f37610c6bef961e7c4.json", + "objectKey": "6e0ea013a6b8c4e2dc3640056b78b26229d014d36e82f53c5ae5ffc68e0481ed.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-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries2.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries2.template.json index 2be99d090472c..7173d362b854f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries2.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/aws-cdk-log-retention-integ-retries2.template.json @@ -580,6 +580,7 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/cdk.out index 560dae10d018f..2313ab5436501 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"33.0.0"} \ No newline at end of file +{"version":"34.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/integ.json index 0879f96c34d02..7cfc57697e423 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "testCases": { "LogRetentionIntegRetries/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/manifest.json index eaeea5c921eef..3c1c867d83192 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "artifacts": { "aws-cdk-log-retention-integ-retries0.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}/9990a29f03d0c5431a972aeb27fc605359cf0093ddd08bfbdf611189e8116726.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c03248e8ef2d441a16f2dcbd612489986315d1fc3e2ed8755007dc35c52adc00.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -212,2460 +212,435 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ] + }, + "displayName": "aws-cdk-log-retention-integ-retries0" + }, + "aws-cdk-log-retention-integ-retries1.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-log-retention-integ-retries1.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-log-retention-integ-retries1": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-log-retention-integ-retries1.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}/6caef44d453a9963759f82df84dbf057a66ed4d65308fdcdeed7d03241422997.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-log-retention-integ-retries1.assets" ], - "hello0ServiceRole18B87FED": [ - { - "type": "aws:cdk:logicalId", - "data": "hello0ServiceRole18B87FED", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello0FDC1C7D4": [ - { - "type": "aws:cdk:logicalId", - "data": "hello0FDC1C7D4", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello0LogRetentionC8F721AC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello0LogRetentionC8F721AC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1ServiceRole61803EDF": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1ServiceRole61803EDF", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1B794CF5A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1B794CF5A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1LogRetention8E9D08B2": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1LogRetention8E9D08B2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2ServiceRole5C9CD8EE": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2ServiceRole5C9CD8EE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2C049BA39": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2C049BA39", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2LogRetentionA2123D9B": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2LogRetentionA2123D9B", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello3ServiceRoleCD1C0951": [ - { - "type": "aws:cdk:logicalId", - "data": "hello3ServiceRoleCD1C0951", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello35665AF4E": [ - { - "type": "aws:cdk:logicalId", - "data": "hello35665AF4E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello3LogRetention8F4AE9E4": [ - { - "type": "aws:cdk:logicalId", - "data": "hello3LogRetention8F4AE9E4", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello4ServiceRole1A0FA08C": [ - { - "type": "aws:cdk:logicalId", - "data": "hello4ServiceRole1A0FA08C", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello4EE4D48AC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello4EE4D48AC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello4LogRetention80AF2389": [ - { - "type": "aws:cdk:logicalId", - "data": "hello4LogRetention80AF2389", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello5ServiceRole005C05EC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello5ServiceRole005C05EC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello5CFB46198": [ - { - "type": "aws:cdk:logicalId", - "data": "hello5CFB46198", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello5LogRetention5D258C6A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello5LogRetention5D258C6A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello6ServiceRoleCB5A5511": [ - { - "type": "aws:cdk:logicalId", - "data": "hello6ServiceRoleCB5A5511", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello626F003DB": [ - { - "type": "aws:cdk:logicalId", - "data": "hello626F003DB", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello6LogRetention143EB32C": [ - { - "type": "aws:cdk:logicalId", - "data": "hello6LogRetention143EB32C", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello7ServiceRole1C2C58D2": [ - { - "type": "aws:cdk:logicalId", - "data": "hello7ServiceRole1C2C58D2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello75E0B3E8C": [ - { - "type": "aws:cdk:logicalId", - "data": "hello75E0B3E8C", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello7LogRetentionB08781CE": [ - { - "type": "aws:cdk:logicalId", - "data": "hello7LogRetentionB08781CE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello8ServiceRole35753BB4": [ - { - "type": "aws:cdk:logicalId", - "data": "hello8ServiceRole35753BB4", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello8801993F8": [ - { - "type": "aws:cdk:logicalId", - "data": "hello8801993F8", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello8LogRetentionF5960D3A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello8LogRetentionF5960D3A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello9ServiceRoleBD9E97CC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello9ServiceRoleBD9E97CC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello9BFC0B703": [ - { - "type": "aws:cdk:logicalId", - "data": "hello9BFC0B703", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello9LogRetentionE34A4125": [ - { - "type": "aws:cdk:logicalId", - "data": "hello9LogRetentionE34A4125", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello10ServiceRole474868C9": [ - { - "type": "aws:cdk:logicalId", - "data": "hello10ServiceRole474868C9", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1062D33987": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1062D33987", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello10LogRetention39275264": [ - { - "type": "aws:cdk:logicalId", - "data": "hello10LogRetention39275264", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello11ServiceRoleA7F4A2AF": [ - { - "type": "aws:cdk:logicalId", - "data": "hello11ServiceRoleA7F4A2AF", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1171FEC9AC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1171FEC9AC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello11LogRetention0EC20DD0": [ - { - "type": "aws:cdk:logicalId", - "data": "hello11LogRetention0EC20DD0", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello12ServiceRoleA76D5180": [ - { - "type": "aws:cdk:logicalId", - "data": "hello12ServiceRoleA76D5180", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello120B96E81D": [ - { - "type": "aws:cdk:logicalId", - "data": "hello120B96E81D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello12LogRetentionD7164F3E": [ - { - "type": "aws:cdk:logicalId", - "data": "hello12LogRetentionD7164F3E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello13ServiceRole8CA1C9B1": [ - { - "type": "aws:cdk:logicalId", - "data": "hello13ServiceRole8CA1C9B1", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1364C47B79": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1364C47B79", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello13LogRetention82EB7E45": [ - { - "type": "aws:cdk:logicalId", - "data": "hello13LogRetention82EB7E45", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello14ServiceRoleC31043C0": [ - { - "type": "aws:cdk:logicalId", - "data": "hello14ServiceRoleC31043C0", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello140C25FB09": [ - { - "type": "aws:cdk:logicalId", - "data": "hello140C25FB09", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello14LogRetention637A6A38": [ - { - "type": "aws:cdk:logicalId", - "data": "hello14LogRetention637A6A38", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello15ServiceRole57E5496A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello15ServiceRole57E5496A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1590886C17": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1590886C17", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello15LogRetentionEE365DDD": [ - { - "type": "aws:cdk:logicalId", - "data": "hello15LogRetentionEE365DDD", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello16ServiceRole1F31EA8F": [ - { - "type": "aws:cdk:logicalId", - "data": "hello16ServiceRole1F31EA8F", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello165FD177B6": [ - { - "type": "aws:cdk:logicalId", - "data": "hello165FD177B6", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello16LogRetention2C237DA7": [ - { - "type": "aws:cdk:logicalId", - "data": "hello16LogRetention2C237DA7", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello17ServiceRole85B6FE68": [ - { - "type": "aws:cdk:logicalId", - "data": "hello17ServiceRole85B6FE68", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello17BE899C71": [ - { - "type": "aws:cdk:logicalId", - "data": "hello17BE899C71", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello17LogRetentionCF72C750": [ - { - "type": "aws:cdk:logicalId", - "data": "hello17LogRetentionCF72C750", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello18ServiceRole631ABDC6": [ - { - "type": "aws:cdk:logicalId", - "data": "hello18ServiceRole631ABDC6", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello183853BDDA": [ - { - "type": "aws:cdk:logicalId", - "data": "hello183853BDDA", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello18LogRetentionF558E7A5": [ - { - "type": "aws:cdk:logicalId", - "data": "hello18LogRetentionF558E7A5", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello19ServiceRole30A31A1E": [ - { - "type": "aws:cdk:logicalId", - "data": "hello19ServiceRole30A31A1E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello19E68A0C7A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello19E68A0C7A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello19LogRetention2FC87D23": [ - { - "type": "aws:cdk:logicalId", - "data": "hello19LogRetention2FC87D23", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello20ServiceRole49BC2091": [ - { - "type": "aws:cdk:logicalId", - "data": "hello20ServiceRole49BC2091", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2096F721E2": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2096F721E2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello20LogRetention7406AE13": [ - { - "type": "aws:cdk:logicalId", - "data": "hello20LogRetention7406AE13", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello21ServiceRoleEB093398": [ - { - "type": "aws:cdk:logicalId", - "data": "hello21ServiceRoleEB093398", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello21B8049B0D": [ - { - "type": "aws:cdk:logicalId", - "data": "hello21B8049B0D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello21LogRetention0F88CB8A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello21LogRetention0F88CB8A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello22ServiceRole22CED113": [ - { - "type": "aws:cdk:logicalId", - "data": "hello22ServiceRole22CED113", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello22ADC7BF12": [ - { - "type": "aws:cdk:logicalId", - "data": "hello22ADC7BF12", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello22LogRetention2A902D73": [ - { - "type": "aws:cdk:logicalId", - "data": "hello22LogRetention2A902D73", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello23ServiceRoleBC985940": [ - { - "type": "aws:cdk:logicalId", - "data": "hello23ServiceRoleBC985940", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello232450EA9D": [ - { - "type": "aws:cdk:logicalId", - "data": "hello232450EA9D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello23LogRetentionF35EA7AE": [ - { - "type": "aws:cdk:logicalId", - "data": "hello23LogRetentionF35EA7AE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello24ServiceRoleB669597E": [ - { - "type": "aws:cdk:logicalId", - "data": "hello24ServiceRoleB669597E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello24A051F98A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello24A051F98A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello24LogRetention2F02EEBB": [ - { - "type": "aws:cdk:logicalId", - "data": "hello24LogRetention2F02EEBB", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ] - }, - "displayName": "aws-cdk-log-retention-integ-retries0" - }, - "aws-cdk-log-retention-integ-retries1.assets": { - "type": "cdk:asset-manifest", - "properties": { - "file": "aws-cdk-log-retention-integ-retries1.assets.json", - "requiresBootstrapStackVersion": 6, - "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" - } - }, - "aws-cdk-log-retention-integ-retries1": { - "type": "aws:cloudformation:stack", - "environment": "aws://unknown-account/unknown-region", - "properties": { - "templateFile": "aws-cdk-log-retention-integ-retries1.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}/86fd666939456783b17c970c3813e5a8ee324e05254c7487cabdcb039c586db9.json", - "requiresBootstrapStackVersion": 6, - "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", - "additionalDependencies": [ - "aws-cdk-log-retention-integ-retries1.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-log-retention-integ-retries1.assets" - ], - "metadata": { - "/aws-cdk-log-retention-integ-retries1/LogRetention0/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention0486EBFA5" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/ServiceRole/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention1/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention1EE2E6696" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention2/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention21F957075" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention3/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention3148A75BA" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention4/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention494231F51" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention5/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention591D77AE3" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention6/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention6DF401EB9" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention7/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention72657EF61" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention8/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention880A4B8CA" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention9/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention90199550D" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention10/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention10F7ED9810" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention11/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention1122CC85FD" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention12/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention12FBA31490" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention13/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention136977A520" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention14/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention14731EBD69" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention15/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention153278A425" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention16/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention161FF830E5" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention17/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention176155FBE0" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention18/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention1831457E29" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention19/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention193D6F7E14" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention20/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention2029711E62" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention21/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention21F0A3EBF1" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention22/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention2233E364BF" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention23/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention2397FB44A4" - } - ], - "/aws-cdk-log-retention-integ-retries1/LogRetention24/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention24A64A1B58" - } - ], - "/aws-cdk-log-retention-integ-retries1/BootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "BootstrapVersion" - } - ], - "/aws-cdk-log-retention-integ-retries1/CheckBootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "CheckBootstrapVersion" - } - ], - "hello0ServiceRole18B87FED": [ - { - "type": "aws:cdk:logicalId", - "data": "hello0ServiceRole18B87FED", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello0FDC1C7D4": [ - { - "type": "aws:cdk:logicalId", - "data": "hello0FDC1C7D4", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello0LogRetentionC8F721AC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello0LogRetentionC8F721AC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1ServiceRole61803EDF": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1ServiceRole61803EDF", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1B794CF5A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1B794CF5A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1LogRetention8E9D08B2": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1LogRetention8E9D08B2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2ServiceRole5C9CD8EE": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2ServiceRole5C9CD8EE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2C049BA39": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2C049BA39", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2LogRetentionA2123D9B": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2LogRetentionA2123D9B", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello3ServiceRoleCD1C0951": [ - { - "type": "aws:cdk:logicalId", - "data": "hello3ServiceRoleCD1C0951", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello35665AF4E": [ - { - "type": "aws:cdk:logicalId", - "data": "hello35665AF4E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello3LogRetention8F4AE9E4": [ - { - "type": "aws:cdk:logicalId", - "data": "hello3LogRetention8F4AE9E4", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello4ServiceRole1A0FA08C": [ - { - "type": "aws:cdk:logicalId", - "data": "hello4ServiceRole1A0FA08C", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello4EE4D48AC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello4EE4D48AC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello4LogRetention80AF2389": [ - { - "type": "aws:cdk:logicalId", - "data": "hello4LogRetention80AF2389", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello5ServiceRole005C05EC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello5ServiceRole005C05EC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello5CFB46198": [ - { - "type": "aws:cdk:logicalId", - "data": "hello5CFB46198", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello5LogRetention5D258C6A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello5LogRetention5D258C6A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello6ServiceRoleCB5A5511": [ - { - "type": "aws:cdk:logicalId", - "data": "hello6ServiceRoleCB5A5511", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello626F003DB": [ - { - "type": "aws:cdk:logicalId", - "data": "hello626F003DB", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello6LogRetention143EB32C": [ - { - "type": "aws:cdk:logicalId", - "data": "hello6LogRetention143EB32C", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello7ServiceRole1C2C58D2": [ - { - "type": "aws:cdk:logicalId", - "data": "hello7ServiceRole1C2C58D2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello75E0B3E8C": [ - { - "type": "aws:cdk:logicalId", - "data": "hello75E0B3E8C", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello7LogRetentionB08781CE": [ - { - "type": "aws:cdk:logicalId", - "data": "hello7LogRetentionB08781CE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello8ServiceRole35753BB4": [ - { - "type": "aws:cdk:logicalId", - "data": "hello8ServiceRole35753BB4", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello8801993F8": [ - { - "type": "aws:cdk:logicalId", - "data": "hello8801993F8", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello8LogRetentionF5960D3A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello8LogRetentionF5960D3A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello9ServiceRoleBD9E97CC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello9ServiceRoleBD9E97CC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello9BFC0B703": [ - { - "type": "aws:cdk:logicalId", - "data": "hello9BFC0B703", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello9LogRetentionE34A4125": [ - { - "type": "aws:cdk:logicalId", - "data": "hello9LogRetentionE34A4125", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello10ServiceRole474868C9": [ - { - "type": "aws:cdk:logicalId", - "data": "hello10ServiceRole474868C9", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1062D33987": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1062D33987", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello10LogRetention39275264": [ - { - "type": "aws:cdk:logicalId", - "data": "hello10LogRetention39275264", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello11ServiceRoleA7F4A2AF": [ - { - "type": "aws:cdk:logicalId", - "data": "hello11ServiceRoleA7F4A2AF", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1171FEC9AC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1171FEC9AC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello11LogRetention0EC20DD0": [ - { - "type": "aws:cdk:logicalId", - "data": "hello11LogRetention0EC20DD0", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello12ServiceRoleA76D5180": [ - { - "type": "aws:cdk:logicalId", - "data": "hello12ServiceRoleA76D5180", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello120B96E81D": [ - { - "type": "aws:cdk:logicalId", - "data": "hello120B96E81D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello12LogRetentionD7164F3E": [ - { - "type": "aws:cdk:logicalId", - "data": "hello12LogRetentionD7164F3E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello13ServiceRole8CA1C9B1": [ - { - "type": "aws:cdk:logicalId", - "data": "hello13ServiceRole8CA1C9B1", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1364C47B79": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1364C47B79", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello13LogRetention82EB7E45": [ - { - "type": "aws:cdk:logicalId", - "data": "hello13LogRetention82EB7E45", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello14ServiceRoleC31043C0": [ - { - "type": "aws:cdk:logicalId", - "data": "hello14ServiceRoleC31043C0", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello140C25FB09": [ - { - "type": "aws:cdk:logicalId", - "data": "hello140C25FB09", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello14LogRetention637A6A38": [ - { - "type": "aws:cdk:logicalId", - "data": "hello14LogRetention637A6A38", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello15ServiceRole57E5496A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello15ServiceRole57E5496A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1590886C17": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1590886C17", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello15LogRetentionEE365DDD": [ - { - "type": "aws:cdk:logicalId", - "data": "hello15LogRetentionEE365DDD", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello16ServiceRole1F31EA8F": [ - { - "type": "aws:cdk:logicalId", - "data": "hello16ServiceRole1F31EA8F", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello165FD177B6": [ - { - "type": "aws:cdk:logicalId", - "data": "hello165FD177B6", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello16LogRetention2C237DA7": [ - { - "type": "aws:cdk:logicalId", - "data": "hello16LogRetention2C237DA7", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello17ServiceRole85B6FE68": [ - { - "type": "aws:cdk:logicalId", - "data": "hello17ServiceRole85B6FE68", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello17BE899C71": [ - { - "type": "aws:cdk:logicalId", - "data": "hello17BE899C71", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello17LogRetentionCF72C750": [ - { - "type": "aws:cdk:logicalId", - "data": "hello17LogRetentionCF72C750", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello18ServiceRole631ABDC6": [ - { - "type": "aws:cdk:logicalId", - "data": "hello18ServiceRole631ABDC6", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello183853BDDA": [ - { - "type": "aws:cdk:logicalId", - "data": "hello183853BDDA", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello18LogRetentionF558E7A5": [ - { - "type": "aws:cdk:logicalId", - "data": "hello18LogRetentionF558E7A5", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello19ServiceRole30A31A1E": [ - { - "type": "aws:cdk:logicalId", - "data": "hello19ServiceRole30A31A1E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello19E68A0C7A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello19E68A0C7A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello19LogRetention2FC87D23": [ - { - "type": "aws:cdk:logicalId", - "data": "hello19LogRetention2FC87D23", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello20ServiceRole49BC2091": [ - { - "type": "aws:cdk:logicalId", - "data": "hello20ServiceRole49BC2091", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2096F721E2": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2096F721E2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello20LogRetention7406AE13": [ - { - "type": "aws:cdk:logicalId", - "data": "hello20LogRetention7406AE13", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello21ServiceRoleEB093398": [ - { - "type": "aws:cdk:logicalId", - "data": "hello21ServiceRoleEB093398", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello21B8049B0D": [ - { - "type": "aws:cdk:logicalId", - "data": "hello21B8049B0D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello21LogRetention0F88CB8A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello21LogRetention0F88CB8A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello22ServiceRole22CED113": [ - { - "type": "aws:cdk:logicalId", - "data": "hello22ServiceRole22CED113", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello22ADC7BF12": [ - { - "type": "aws:cdk:logicalId", - "data": "hello22ADC7BF12", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello22LogRetention2A902D73": [ - { - "type": "aws:cdk:logicalId", - "data": "hello22LogRetention2A902D73", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello23ServiceRoleBC985940": [ - { - "type": "aws:cdk:logicalId", - "data": "hello23ServiceRoleBC985940", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello232450EA9D": [ - { - "type": "aws:cdk:logicalId", - "data": "hello232450EA9D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello23LogRetentionF35EA7AE": [ - { - "type": "aws:cdk:logicalId", - "data": "hello23LogRetentionF35EA7AE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello24ServiceRoleB669597E": [ - { - "type": "aws:cdk:logicalId", - "data": "hello24ServiceRoleB669597E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello24A051F98A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello24A051F98A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello24LogRetention2F02EEBB": [ - { - "type": "aws:cdk:logicalId", - "data": "hello24LogRetention2F02EEBB", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ] - }, - "displayName": "aws-cdk-log-retention-integ-retries1" - }, - "aws-cdk-log-retention-integ-retries2.assets": { - "type": "cdk:asset-manifest", - "properties": { - "file": "aws-cdk-log-retention-integ-retries2.assets.json", - "requiresBootstrapStackVersion": 6, - "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" - } - }, - "aws-cdk-log-retention-integ-retries2": { - "type": "aws:cloudformation:stack", - "environment": "aws://unknown-account/unknown-region", - "properties": { - "templateFile": "aws-cdk-log-retention-integ-retries2.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}/80155830078966c61d22e5166c107e5a9a1e6bdc892902f37610c6bef961e7c4.json", - "requiresBootstrapStackVersion": 6, - "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", - "additionalDependencies": [ - "aws-cdk-log-retention-integ-retries2.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-log-retention-integ-retries2.assets" - ], - "metadata": { - "/aws-cdk-log-retention-integ-retries2/LogRetention0/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention0486EBFA5" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/ServiceRole/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention1/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention1EE2E6696" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention2/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention21F957075" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention3/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention3148A75BA" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention4/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention494231F51" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention5/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention591D77AE3" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention6/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention6DF401EB9" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention7/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention72657EF61" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention8/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention880A4B8CA" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention9/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention90199550D" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention10/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention10F7ED9810" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention11/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention1122CC85FD" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention12/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention12FBA31490" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention13/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention136977A520" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention14/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention14731EBD69" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention15/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention153278A425" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention16/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention161FF830E5" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention17/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention176155FBE0" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention18/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention1831457E29" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention19/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention193D6F7E14" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention20/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention2029711E62" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention21/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention21F0A3EBF1" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention22/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention2233E364BF" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention23/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention2397FB44A4" - } - ], - "/aws-cdk-log-retention-integ-retries2/LogRetention24/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LogRetention24A64A1B58" - } - ], - "/aws-cdk-log-retention-integ-retries2/BootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "BootstrapVersion" - } - ], - "/aws-cdk-log-retention-integ-retries2/CheckBootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "CheckBootstrapVersion" - } - ], - "hello0ServiceRole18B87FED": [ - { - "type": "aws:cdk:logicalId", - "data": "hello0ServiceRole18B87FED", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello0FDC1C7D4": [ - { - "type": "aws:cdk:logicalId", - "data": "hello0FDC1C7D4", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello0LogRetentionC8F721AC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello0LogRetentionC8F721AC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1ServiceRole61803EDF": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1ServiceRole61803EDF", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1B794CF5A": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1B794CF5A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello1LogRetention8E9D08B2": [ - { - "type": "aws:cdk:logicalId", - "data": "hello1LogRetention8E9D08B2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2ServiceRole5C9CD8EE": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2ServiceRole5C9CD8EE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2C049BA39": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2C049BA39", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello2LogRetentionA2123D9B": [ - { - "type": "aws:cdk:logicalId", - "data": "hello2LogRetentionA2123D9B", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello3ServiceRoleCD1C0951": [ - { - "type": "aws:cdk:logicalId", - "data": "hello3ServiceRoleCD1C0951", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello35665AF4E": [ - { - "type": "aws:cdk:logicalId", - "data": "hello35665AF4E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello3LogRetention8F4AE9E4": [ - { - "type": "aws:cdk:logicalId", - "data": "hello3LogRetention8F4AE9E4", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello4ServiceRole1A0FA08C": [ - { - "type": "aws:cdk:logicalId", - "data": "hello4ServiceRole1A0FA08C", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello4EE4D48AC": [ - { - "type": "aws:cdk:logicalId", - "data": "hello4EE4D48AC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello4LogRetention80AF2389": [ - { - "type": "aws:cdk:logicalId", - "data": "hello4LogRetention80AF2389", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "hello5ServiceRole005C05EC": [ + "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-log-retention-integ-retries1.assets" + ], + "metadata": { + "/aws-cdk-log-retention-integ-retries1/LogRetention0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello5ServiceRole005C05EC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention0486EBFA5" } ], - "hello5CFB46198": [ + "/aws-cdk-log-retention-integ-retries1/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello5CFB46198", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" } ], - "hello5LogRetention5D258C6A": [ + "/aws-cdk-log-retention-integ-retries1/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello5LogRetention5D258C6A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB" } ], - "hello6ServiceRoleCB5A5511": [ + "/aws-cdk-log-retention-integ-retries1/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello6ServiceRoleCB5A5511", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A" } ], - "hello626F003DB": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention1/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello626F003DB", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention1EE2E6696" } ], - "hello6LogRetention143EB32C": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention2/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello6LogRetention143EB32C", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention21F957075" } ], - "hello7ServiceRole1C2C58D2": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention3/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello7ServiceRole1C2C58D2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention3148A75BA" } ], - "hello75E0B3E8C": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention4/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello75E0B3E8C", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention494231F51" } ], - "hello7LogRetentionB08781CE": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention5/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello7LogRetentionB08781CE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention591D77AE3" } ], - "hello8ServiceRole35753BB4": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention6/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello8ServiceRole35753BB4", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention6DF401EB9" } ], - "hello8801993F8": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention7/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello8801993F8", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention72657EF61" } ], - "hello8LogRetentionF5960D3A": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention8/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello8LogRetentionF5960D3A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention880A4B8CA" } ], - "hello9ServiceRoleBD9E97CC": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention9/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello9ServiceRoleBD9E97CC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention90199550D" } ], - "hello9BFC0B703": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention10/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello9BFC0B703", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention10F7ED9810" } ], - "hello9LogRetentionE34A4125": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention11/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello9LogRetentionE34A4125", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention1122CC85FD" } ], - "hello10ServiceRole474868C9": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention12/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello10ServiceRole474868C9", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention12FBA31490" } ], - "hello1062D33987": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention13/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello1062D33987", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention136977A520" } ], - "hello10LogRetention39275264": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention14/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello10LogRetention39275264", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention14731EBD69" } ], - "hello11ServiceRoleA7F4A2AF": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention15/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello11ServiceRoleA7F4A2AF", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention153278A425" } ], - "hello1171FEC9AC": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention16/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello1171FEC9AC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention161FF830E5" } ], - "hello11LogRetention0EC20DD0": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention17/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello11LogRetention0EC20DD0", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention176155FBE0" } ], - "hello12ServiceRoleA76D5180": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention18/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello12ServiceRoleA76D5180", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention1831457E29" } ], - "hello120B96E81D": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention19/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello120B96E81D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention193D6F7E14" } ], - "hello12LogRetentionD7164F3E": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention20/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello12LogRetentionD7164F3E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention2029711E62" } ], - "hello13ServiceRole8CA1C9B1": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention21/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello13ServiceRole8CA1C9B1", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention21F0A3EBF1" } ], - "hello1364C47B79": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention22/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello1364C47B79", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention2233E364BF" } ], - "hello13LogRetention82EB7E45": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention23/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello13LogRetention82EB7E45", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention2397FB44A4" } ], - "hello14ServiceRoleC31043C0": [ + "/aws-cdk-log-retention-integ-retries1/LogRetention24/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello14ServiceRoleC31043C0", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention24A64A1B58" } ], - "hello140C25FB09": [ + "/aws-cdk-log-retention-integ-retries1/BootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "hello140C25FB09", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "BootstrapVersion" } ], - "hello14LogRetention637A6A38": [ + "/aws-cdk-log-retention-integ-retries1/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "hello14LogRetention637A6A38", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "CheckBootstrapVersion" } + ] + }, + "displayName": "aws-cdk-log-retention-integ-retries1" + }, + "aws-cdk-log-retention-integ-retries2.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-log-retention-integ-retries2.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-log-retention-integ-retries2": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-log-retention-integ-retries2.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}/6e0ea013a6b8c4e2dc3640056b78b26229d014d36e82f53c5ae5ffc68e0481ed.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-log-retention-integ-retries2.assets" ], - "hello15ServiceRole57E5496A": [ + "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-log-retention-integ-retries2.assets" + ], + "metadata": { + "/aws-cdk-log-retention-integ-retries2/LogRetention0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello15ServiceRole57E5496A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention0486EBFA5" } ], - "hello1590886C17": [ + "/aws-cdk-log-retention-integ-retries2/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello1590886C17", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" } ], - "hello15LogRetentionEE365DDD": [ + "/aws-cdk-log-retention-integ-retries2/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello15LogRetentionEE365DDD", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB" } ], - "hello16ServiceRole1F31EA8F": [ + "/aws-cdk-log-retention-integ-retries2/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello16ServiceRole1F31EA8F", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A" } ], - "hello165FD177B6": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention1/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello165FD177B6", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention1EE2E6696" } ], - "hello16LogRetention2C237DA7": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention2/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello16LogRetention2C237DA7", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention21F957075" } ], - "hello17ServiceRole85B6FE68": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention3/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello17ServiceRole85B6FE68", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention3148A75BA" } ], - "hello17BE899C71": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention4/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello17BE899C71", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention494231F51" } ], - "hello17LogRetentionCF72C750": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention5/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello17LogRetentionCF72C750", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention591D77AE3" } ], - "hello18ServiceRole631ABDC6": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention6/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello18ServiceRole631ABDC6", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention6DF401EB9" } ], - "hello183853BDDA": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention7/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello183853BDDA", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention72657EF61" } ], - "hello18LogRetentionF558E7A5": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention8/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello18LogRetentionF558E7A5", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention880A4B8CA" } ], - "hello19ServiceRole30A31A1E": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention9/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello19ServiceRole30A31A1E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention90199550D" } ], - "hello19E68A0C7A": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention10/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello19E68A0C7A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention10F7ED9810" } ], - "hello19LogRetention2FC87D23": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention11/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello19LogRetention2FC87D23", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention1122CC85FD" } ], - "hello20ServiceRole49BC2091": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention12/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello20ServiceRole49BC2091", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention12FBA31490" } ], - "hello2096F721E2": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention13/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello2096F721E2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention136977A520" } ], - "hello20LogRetention7406AE13": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention14/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello20LogRetention7406AE13", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention14731EBD69" } ], - "hello21ServiceRoleEB093398": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention15/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello21ServiceRoleEB093398", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention153278A425" } ], - "hello21B8049B0D": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention16/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello21B8049B0D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention161FF830E5" } ], - "hello21LogRetention0F88CB8A": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention17/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello21LogRetention0F88CB8A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention176155FBE0" } ], - "hello22ServiceRole22CED113": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention18/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello22ServiceRole22CED113", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention1831457E29" } ], - "hello22ADC7BF12": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention19/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello22ADC7BF12", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention193D6F7E14" } ], - "hello22LogRetention2A902D73": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention20/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello22LogRetention2A902D73", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention2029711E62" } ], - "hello23ServiceRoleBC985940": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention21/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello23ServiceRoleBC985940", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention21F0A3EBF1" } ], - "hello232450EA9D": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention22/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello232450EA9D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention2233E364BF" } ], - "hello23LogRetentionF35EA7AE": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention23/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello23LogRetentionF35EA7AE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention2397FB44A4" } ], - "hello24ServiceRoleB669597E": [ + "/aws-cdk-log-retention-integ-retries2/LogRetention24/Resource": [ { "type": "aws:cdk:logicalId", - "data": "hello24ServiceRoleB669597E", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "LogRetention24A64A1B58" } ], - "hello24A051F98A": [ + "/aws-cdk-log-retention-integ-retries2/BootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "hello24A051F98A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "BootstrapVersion" } ], - "hello24LogRetention2F02EEBB": [ + "/aws-cdk-log-retention-integ-retries2/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "hello24LogRetention2F02EEBB", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "CheckBootstrapVersion" } ] }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/tree.json index dc224f4c7184f..4f524e4a3caf1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention-retries.js.snapshot/tree.json @@ -672,7 +672,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "LogRetention1": { @@ -1797,7 +1797,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "LogRetention1": { @@ -2922,7 +2922,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "LogRetention1": { @@ -3392,7 +3392,7 @@ "path": "LogRetentionIntegRetries/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "DeployAssert": { @@ -3438,7 +3438,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/LogRetentionIntegDefaultTestDeployAssert6ACC5A74.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/LogRetentionIntegDefaultTestDeployAssert6ACC5A74.assets.json index b6c6686b14e8f..53b453c830b1c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/LogRetentionIntegDefaultTestDeployAssert6ACC5A74.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/LogRetentionIntegDefaultTestDeployAssert6ACC5A74.assets.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js deleted file mode 100644 index 9788d2663bdd4..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js +++ /dev/null @@ -1,187 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = void 0; -/* eslint-disable no-console */ -// eslint-disable-next-line import/no-extraneous-dependencies -const Logs = require("@aws-sdk/client-cloudwatch-logs"); -/** - * Creates a log group and doesn't throw if it exists. - */ -async function createLogGroupSafe(logGroupName, client, withDelay) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.CreateLogGroupCommand(params); - await client.send(command); - } - catch (error) { - if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { - // The log group is already created by the lambda execution - return; - } - throw error; - } - }); -} -/** - * Deletes a log group and doesn't throw if it does not exist. - */ -async function deleteLogGroup(logGroupName, client, withDelay) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.DeleteLogGroupCommand(params); - await client.send(command); - } - catch (error) { - if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { - // The log group doesn't exist - return; - } - throw error; - } - }); -} -/** - * Puts or deletes a retention policy on a log group. - */ -async function setRetentionPolicy(logGroupName, client, withDelay, retentionInDays) { - await withDelay(async () => { - if (!retentionInDays) { - const params = { logGroupName }; - const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); - await client.send(deleteCommand); - } - else { - const params = { logGroupName, retentionInDays }; - const putCommand = new Logs.PutRetentionPolicyCommand(params); - await client.send(putCommand); - } - }); -} -async function handler(event, context) { - try { - console.log(JSON.stringify({ ...event, ResponseURL: '...' })); - // The target log group - const logGroupName = event.ResourceProperties.LogGroupName; - // The region of the target log group - const logGroupRegion = event.ResourceProperties.LogGroupRegion; - // Parse to AWS SDK retry options - const withDelay = makeWithDelay(parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries)); - const sdkConfig = { - logger: console, - region: logGroupRegion, - }; - const client = new Logs.CloudWatchLogsClient(sdkConfig); - if (event.RequestType === 'Create' || event.RequestType === 'Update') { - // Act on the target log group - await createLogGroupSafe(logGroupName, client, withDelay); - await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); - // Configure the Log Group for the Custom Resource function itself - if (event.RequestType === 'Create') { - const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ - logger: console, - region: process.env.AWS_REGION, - }); - // Set a retention policy of 1 day on the logs of this very function. - // Due to the async nature of the log group creation, the log group for this function might - // still be not created yet at this point. Therefore we attempt to create it. - // In case it is being created, createLogGroupSafe will handle the conflict. - await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); - // If createLogGroupSafe fails, the log group is not created even after multiple attempts. - // In this case we have nothing to set the retention policy on but an exception will skip - // the next line. - await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); - } - } - // When the requestType is delete, delete the log group if the removal policy is delete - if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { - await deleteLogGroup(logGroupName, client, withDelay); - // else retain the log group - } - await respond('SUCCESS', 'OK', logGroupName); - } - catch (e) { - console.log(e); - await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); - } - function respond(responseStatus, reason, physicalResourceId) { - const responseBody = JSON.stringify({ - Status: responseStatus, - Reason: reason, - PhysicalResourceId: physicalResourceId, - StackId: event.StackId, - RequestId: event.RequestId, - LogicalResourceId: event.LogicalResourceId, - Data: { - // Add log group name as part of the response so that it's available via Fn::GetAtt - LogGroupName: event.ResourceProperties.LogGroupName, - }, - }); - console.log('Responding', responseBody); - // eslint-disable-next-line @typescript-eslint/no-require-imports - const parsedUrl = require('url').parse(event.ResponseURL); - const requestOptions = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { - 'content-type': '', - 'content-length': Buffer.byteLength(responseBody, 'utf8'), - }, - }; - return new Promise((resolve, reject) => { - try { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const request = require('https').request(requestOptions, resolve); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); - } -} -exports.handler = handler; -function parseIntOptional(value, base = 10) { - if (value === undefined) { - return undefined; - } - return parseInt(value, base); -} -function makeWithDelay(maxRetries = 5, delayBase = 100, delayCap = 10 * 1000) { - // If we try to update the log group, then due to the async nature of - // Lambda logging there could be a race condition when the same log group is - // already being created by the lambda execution. This can sometime result in - // an error "OperationAbortedException: A conflicting operation is currently - // in progress...Please try again." - // To avoid an error, we do as requested and try again. - return async (block) => { - let attempts = 0; - do { - try { - return await block(); - } - catch (error) { - if (error instanceof Logs.OperationAbortedException || error.name === 'OperationAbortedException') { - if (attempts < maxRetries) { - attempts++; - await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); - continue; - } - else { - // The log group is still being changed by another execution but we are out of retries - throw new Error('Out of attempts to change log group'); - } - } - throw error; - } - } while (true); // exit happens on retry count check - }; -} -function calculateDelay(attempt, base, cap) { - return Math.round(Math.random() * Math.min(cap, base * 2 ** attempt)); -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNkRBQTZEO0FBQzdELHdEQUF3RDtBQWV4RDs7R0FFRztBQUNILEtBQUssVUFBVSxrQkFBa0IsQ0FBQyxZQUFvQixFQUFFLE1BQWlDLEVBQUUsU0FBd0Q7SUFDakosTUFBTSxTQUFTLENBQUMsS0FBSyxJQUFJLEVBQUU7UUFDekIsSUFBSTtZQUNGLE1BQU0sTUFBTSxHQUFHLEVBQUUsWUFBWSxFQUFFLENBQUM7WUFDaEMsTUFBTSxPQUFPLEdBQUcsSUFBSSxJQUFJLENBQUMscUJBQXFCLENBQUMsTUFBTSxDQUFDLENBQUM7WUFDdkQsTUFBTSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDO1NBRTVCO1FBQUMsT0FBTyxLQUFVLEVBQUU7WUFDbkIsSUFB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IHRvIGNoYW5nZSBsb2cgZ3JvdXAnKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICB9XG4gICAgfSB3aGlsZSAodHJ1ZSk7IC8vIGV4aXQgaGFwcGVucyBvbiByZXRyeSBjb3VudCBjaGVja1xuICB9O1xufVxuXG5mdW5jdGlvbiBjYWxjdWxhdGVEZWxheShhdHRlbXB0OiBudW1iZXIsIGJhc2U6IG51bWJlciwgY2FwOiBudW1iZXIpOiBudW1iZXIge1xuICByZXR1cm4gTWF0aC5yb3VuZChNYXRoLnJhbmRvbSgpICogTWF0aC5taW4oY2FwLCBiYXNlICogMiAqKiBhdHRlbXB0KSk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js new file mode 100644 index 0000000000000..8d4f5cf13f88d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js @@ -0,0 +1,192 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +/* eslint-disable no-console */ +// eslint-disable-next-line import/no-extraneous-dependencies +const Logs = require("@aws-sdk/client-cloudwatch-logs"); +/** + * Creates a log group and doesn't throw if it exists. + */ +async function createLogGroupSafe(logGroupName, client, withDelay) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.CreateLogGroupCommand(params); + await client.send(command); + } + catch (error) { + if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { + // The log group is already created by the lambda execution + return; + } + throw error; + } + }); +} +/** + * Deletes a log group and doesn't throw if it does not exist. + */ +async function deleteLogGroup(logGroupName, client, withDelay) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.DeleteLogGroupCommand(params); + await client.send(command); + } + catch (error) { + if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { + // The log group doesn't exist + return; + } + throw error; + } + }); +} +/** + * Puts or deletes a retention policy on a log group. + */ +async function setRetentionPolicy(logGroupName, client, withDelay, retentionInDays) { + await withDelay(async () => { + if (!retentionInDays) { + const params = { logGroupName }; + const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); + await client.send(deleteCommand); + } + else { + const params = { logGroupName, retentionInDays }; + const putCommand = new Logs.PutRetentionPolicyCommand(params); + await client.send(putCommand); + } + }); +} +async function handler(event, context) { + try { + console.log(JSON.stringify({ ...event, ResponseURL: '...' })); + // The target log group + const logGroupName = event.ResourceProperties.LogGroupName; + // The region of the target log group + const logGroupRegion = event.ResourceProperties.LogGroupRegion; + // Parse to AWS SDK retry options + const maxRetries = parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries) ?? 5; + const withDelay = makeWithDelay(maxRetries); + const sdkConfig = { + logger: console, + region: logGroupRegion, + maxAttempts: Math.max(5, maxRetries), // Use a minimum for SDK level retries, because it might include retryable failures that withDelay isn't checking for + }; + const client = new Logs.CloudWatchLogsClient(sdkConfig); + if (event.RequestType === 'Create' || event.RequestType === 'Update') { + // Act on the target log group + await createLogGroupSafe(logGroupName, client, withDelay); + await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); + // Configure the Log Group for the Custom Resource function itself + if (event.RequestType === 'Create') { + const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ + logger: console, + region: process.env.AWS_REGION, + }); + // Set a retention policy of 1 day on the logs of this very function. + // Due to the async nature of the log group creation, the log group for this function might + // still be not created yet at this point. Therefore we attempt to create it. + // In case it is being created, createLogGroupSafe will handle the conflict. + await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); + // If createLogGroupSafe fails, the log group is not created even after multiple attempts. + // In this case we have nothing to set the retention policy on but an exception will skip + // the next line. + await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); + } + } + // When the requestType is delete, delete the log group if the removal policy is delete + if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { + await deleteLogGroup(logGroupName, client, withDelay); + // else retain the log group + } + await respond('SUCCESS', 'OK', logGroupName); + } + catch (e) { + console.log(e); + await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); + } + function respond(responseStatus, reason, physicalResourceId) { + const responseBody = JSON.stringify({ + Status: responseStatus, + Reason: reason, + PhysicalResourceId: physicalResourceId, + StackId: event.StackId, + RequestId: event.RequestId, + LogicalResourceId: event.LogicalResourceId, + Data: { + // Add log group name as part of the response so that it's available via Fn::GetAtt + LogGroupName: event.ResourceProperties.LogGroupName, + }, + }); + console.log('Responding', responseBody); + // eslint-disable-next-line @typescript-eslint/no-require-imports + const parsedUrl = require('url').parse(event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { + 'content-type': '', + 'content-length': Buffer.byteLength(responseBody, 'utf8'), + }, + }; + return new Promise((resolve, reject) => { + try { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const request = require('https').request(requestOptions, resolve); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); + } +} +exports.handler = handler; +function parseIntOptional(value, base = 10) { + if (value === undefined) { + return undefined; + } + return parseInt(value, base); +} +function makeWithDelay(maxRetries, delayBase = 100, delayCap = 10 * 1000) { + // If we try to update the log group, then due to the async nature of + // Lambda logging there could be a race condition when the same log group is + // already being created by the lambda execution. This can sometime result in + // an error "OperationAbortedException: A conflicting operation is currently + // in progress...Please try again." + // To avoid an error, we do as requested and try again. + return async (block) => { + let attempts = 0; + do { + try { + return await block(); + } + catch (error) { + if (error instanceof Logs.OperationAbortedException + || error.name === 'OperationAbortedException' + || error.name === 'ThrottlingException' // There is no class to check with instanceof, see https://github.com/aws/aws-sdk-js-v3/issues/5140 + ) { + if (attempts < maxRetries) { + attempts++; + await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); + continue; + } + else { + // The log group is still being changed by another execution but we are out of retries + throw new Error('Out of attempts to change log group'); + } + } + throw error; + } + } while (true); // exit happens on retry count check + }; +} +function calculateDelay(attempt, base, cap) { + return Math.round(Math.random() * Math.min(cap, base * 2 ** attempt)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNkRBQTZEO0FBQzdELHdEQUF3RDtBQWV4RDs7R0FFRztBQUNILEtBQUssVUFBVSxrQkFBa0IsQ0FBQyxZQUFvQixFQUFFLE1BQWlDLEVBQUUsU0FBd0Q7SUFDakosTUFBTSxTQUFTLENBQUMsS0FBSyxJQ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1cbiAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICB9XG4gICAgfSB3aGlsZSAodHJ1ZSk7IC8vIGV4aXQgaGFwcGVucyBvbiByZXRyeSBjb3VudCBjaGVja1xuICB9O1xufVxuXG5mdW5jdGlvbiBjYWxjdWxhdGVEZWxheShhdHRlbXB0OiBudW1iZXIsIGJhc2U6IG51bWJlciwgY2FwOiBudW1iZXIpOiBudW1iZXIge1xuICByZXR1cm4gTWF0aC5yb3VuZChNYXRoLnJhbmRvbSgpICogTWF0aC5taW4oY2FwLCBiYXNlICogMiAqKiBhdHRlbXB0KSk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts similarity index 86% rename from packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts index 4ae0dd69afdcd..88843fe3fa016 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-chatbot/test/integ.chatbot-logretention.js.snapshot/asset.2634e41ffbfed260b1049b081f0f568b46f60f03bf59422220562d71c9eb720e/index.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts @@ -91,11 +91,13 @@ export async function handler(event: LogRetentionEvent, context: AWSLambda.Conte const logGroupRegion = event.ResourceProperties.LogGroupRegion; // Parse to AWS SDK retry options - const withDelay = makeWithDelay(parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries)); + const maxRetries = parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries) ?? 5; + const withDelay = makeWithDelay(maxRetries); const sdkConfig: Logs.CloudWatchLogsClientConfig = { logger: console, region: logGroupRegion, + maxAttempts: Math.max(5, maxRetries), // Use a minimum for SDK level retries, because it might include retryable failures that withDelay isn't checking for }; const client = new Logs.CloudWatchLogsClient(sdkConfig); @@ -184,7 +186,11 @@ function parseIntOptional(value?: string, base = 10): number | undefined { return parseInt(value, base); } -function makeWithDelay(maxRetries: number = 10, delay: number = 100): (block: () => Promise) => Promise { +function makeWithDelay( + maxRetries: number, + delayBase: number = 100, + delayCap = 10 * 1000, // 10s +): (block: () => Promise) => Promise { // If we try to update the log group, then due to the async nature of // Lambda logging there could be a race condition when the same log group is // already being created by the lambda execution. This can sometime result in @@ -193,14 +199,19 @@ function makeWithDelay(maxRetries: number = 10, delay: number = 100): (block: () // To avoid an error, we do as requested and try again. return async (block: () => Promise) => { + let attempts = 0; do { try { return await block(); } catch (error: any) { - if (error instanceof Logs.OperationAbortedException || error.name === 'OperationAbortedException') { - if (maxRetries > 0) { - maxRetries--; - await new Promise(resolve => setTimeout(resolve, delay)); + if ( + error instanceof Logs.OperationAbortedException + || error.name === 'OperationAbortedException' + || error.name === 'ThrottlingException' // There is no class to check with instanceof, see https://github.com/aws/aws-sdk-js-v3/issues/5140 + ) { + if (attempts < maxRetries ) { + attempts++; + await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); continue; } else { // The log group is still being changed by another execution but we are out of retries @@ -212,3 +223,7 @@ function makeWithDelay(maxRetries: number = 10, delay: number = 100): (block: () } while (true); // exit happens on retry count check }; } + +function calculateDelay(attempt: number, base: number, cap: number): number { + return Math.round(Math.random() * Math.min(cap, base * 2 ** attempt)); +} diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/aws-cdk-log-retention-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/aws-cdk-log-retention-integ.assets.json index c5cfbefbfa8c7..aa83ca70a7bc6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/aws-cdk-log-retention-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/aws-cdk-log-retention-integ.assets.json @@ -1,20 +1,20 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { - "4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9": { + "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0": { "source": { - "path": "asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9", + "path": "asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9.zip", + "objectKey": "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "c4b3d10c2ec9c890230739eb01519e6ea4ddbae22e40b50394b8cfdc70aa6c24": { + "95ac8f29ff36a7123923f19e8eaa5b99b557919ded4582cc165b70fe6feab2fb": { "source": { "path": "aws-cdk-log-retention-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c4b3d10c2ec9c890230739eb01519e6ea4ddbae22e40b50394b8cfdc70aa6c24.json", + "objectKey": "95ac8f29ff36a7123923f19e8eaa5b99b557919ded4582cc165b70fe6feab2fb.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-logs/test/integ.log-retention.js.snapshot/aws-cdk-log-retention-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/aws-cdk-log-retention-integ.template.json index b5d5ed6a1914d..bd3a898a7916d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/aws-cdk-log-retention-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/aws-cdk-log-retention-integ.template.json @@ -120,11 +120,12 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9.zip" + "S3Key": "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0.zip" }, "Role": { "Fn::GetAtt": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/cdk.out index 560dae10d018f..2313ab5436501 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"33.0.0"} \ No newline at end of file +{"version":"34.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/integ.json index 18aedcf8f83f1..ce84f84f5ee6b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "testCases": { "LogRetentionInteg/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/manifest.json index 94485b6f21f9a..cd6c6e18b2082 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "artifacts": { "aws-cdk-log-retention-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}/c4b3d10c2ec9c890230739eb01519e6ea4ddbae22e40b50394b8cfdc70aa6c24.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/95ac8f29ff36a7123923f19e8eaa5b99b557919ded4582cc165b70fe6feab2fb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -74,6 +74,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "MyLambda3E5A551B4": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambda3E5A551B4", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-log-retention-integ" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/tree.json index 11f6475085d51..8ab892df6f465 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.js.snapshot/tree.json @@ -212,7 +212,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "MyLambda2": { @@ -268,7 +268,7 @@ "path": "LogRetentionInteg/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "DeployAssert": { @@ -314,7 +314,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.ts index e854391a6b76b..11b6c6bcdc518 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.log-retention.ts @@ -1,6 +1,6 @@ -import { App, Stack, StackProps, RemovalPolicy } from 'aws-cdk-lib'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import { LogRetention, RetentionDays } from 'aws-cdk-lib/aws-logs'; +import { App, Stack, StackProps, RemovalPolicy } from 'aws-cdk-lib/core'; class LogRetentionIntegStack extends Stack { constructor(scope: App, id: string, props?: StackProps) { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/cdk-integ-opensearch-custom-kms-key.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/cdk-integ-opensearch-custom-kms-key.assets.json index 1d7c050fcfb13..35697325253bd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/cdk-integ-opensearch-custom-kms-key.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/cdk-integ-opensearch-custom-kms-key.assets.json @@ -14,7 +14,7 @@ } } }, - "1bdb48670ed7cee02917d363b47943af6e8a5b21b4e5c43f4c12ce9b8a621ae1": { + "20b7b2ec802fd361acf8fe7e01aca8970928f3aec1ca0858fe790d4d8bdf73c9": { "source": { "path": "cdk-integ-opensearch-custom-kms-key.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1bdb48670ed7cee02917d363b47943af6e8a5b21b4e5c43f4c12ce9b8a621ae1.json", + "objectKey": "20b7b2ec802fd361acf8fe7e01aca8970928f3aec1ca0858fe790d4d8bdf73c9.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-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/cdk-integ-opensearch-custom-kms-key.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/cdk-integ-opensearch-custom-kms-key.template.json index fea6c4dd2c38e..09fcd9ac60470 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/cdk-integ-opensearch-custom-kms-key.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/cdk-integ-opensearch-custom-kms-key.template.json @@ -126,7 +126,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "DomainAccessPolicyCustomResourcePolicyE61F1845" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/manifest.json index fb9d4a4f1b7bf..d6f9eb4fc9374 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/manifest.json @@ -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}/1bdb48670ed7cee02917d363b47943af6e8a5b21b4e5c43f4c12ce9b8a621ae1.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/20b7b2ec802fd361acf8fe7e01aca8970928f3aec1ca0858fe790d4d8bdf73c9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -45,12 +45,6 @@ "data": "Domain66AC69E0" } ], - "/cdk-integ-opensearch-custom-kms-key/Domain/AccessPolicy": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/cdk-integ-opensearch-custom-kms-key/Domain/AccessPolicy/Resource/Default": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/cdk-integ-opensearch.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/cdk-integ-opensearch.assets.json index e0c9a8ccadf44..e734c52e8deef 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/cdk-integ-opensearch.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/cdk-integ-opensearch.assets.json @@ -14,7 +14,7 @@ } } }, - "c7109125bda4d311dbef036b39eb06806f7951ebeb5d3ae29383842fb9ea6107": { + "8d30766bee9aed87e8f31a1d63557d3e9ed7bfc5d5783d1198bdada939e30017": { "source": { "path": "cdk-integ-opensearch.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c7109125bda4d311dbef036b39eb06806f7951ebeb5d3ae29383842fb9ea6107.json", + "objectKey": "8d30766bee9aed87e8f31a1d63557d3e9ed7bfc5d5783d1198bdada939e30017.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-opensearchservice/test/integ.opensearch.js.snapshot/cdk-integ-opensearch.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/cdk-integ-opensearch.template.json index 1caa0d25e8c2f..72c33c52b70d6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/cdk-integ-opensearch.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/cdk-integ-opensearch.template.json @@ -70,7 +70,7 @@ ] }, "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fc\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "Domain1ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fcCustomResourcePolicyBE9BFE5D" @@ -230,7 +230,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "Domain1AccessPolicyCustomResourcePolicy3BA04487" @@ -388,7 +388,7 @@ ] }, "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"ESLogPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "Domain2ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02CustomResourcePolicy2DB46870" @@ -548,7 +548,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "Domain2AccessPolicyCustomResourcePolicy7C8260FD" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/manifest.json index cee8e207950bc..26ff1e7914e58 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/manifest.json @@ -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}/c7109125bda4d311dbef036b39eb06806f7951ebeb5d3ae29383842fb9ea6107.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8d30766bee9aed87e8f31a1d63557d3e9ed7bfc5d5783d1198bdada939e30017.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -45,12 +45,6 @@ "data": "Domain1AppLogs6E8D1D67" } ], - "/cdk-integ-opensearch/Domain1/ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fc": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/cdk-integ-opensearch/Domain1/ESLogGroupPolicyc881416c4fcb1ec2b4bf7f47a5cde4097f01ec50fc/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -69,12 +63,6 @@ "data": "Domain19FCBCB91" } ], - "/cdk-integ-opensearch/Domain1/AccessPolicy": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/cdk-integ-opensearch/Domain1/AccessPolicy/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -111,12 +99,6 @@ "data": "Domain2AppLogs810876E2" } ], - "/cdk-integ-opensearch/Domain2/ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/cdk-integ-opensearch/Domain2/ESLogGroupPolicyc80140a7754e9c0dd4e81167ef19e15da5b55dca02/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -135,12 +117,6 @@ "data": "Domain2644FE48C" } ], - "/cdk-integ-opensearch/Domain2/AccessPolicy": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/cdk-integ-opensearch/Domain2/AccessPolicy/Resource/Default": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/cdk-integ-opensearch-unsignedbasicauth.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/cdk-integ-opensearch-unsignedbasicauth.assets.json index abdc3dbb80830..f86a9c0f51e54 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/cdk-integ-opensearch-unsignedbasicauth.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/cdk-integ-opensearch-unsignedbasicauth.assets.json @@ -14,7 +14,7 @@ } } }, - "309131300add1ea1ac843024771a92b708b5582baecfd8c58c1028a36c7b1c99": { + "346451b912f3bfe60848f0e77413f6ca0a967831ca9c46fba7b914541b07f33c": { "source": { "path": "cdk-integ-opensearch-unsignedbasicauth.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "309131300add1ea1ac843024771a92b708b5582baecfd8c58c1028a36c7b1c99.json", + "objectKey": "346451b912f3bfe60848f0e77413f6ca0a967831ca9c46fba7b914541b07f33c.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-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/cdk-integ-opensearch-unsignedbasicauth.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/cdk-integ-opensearch-unsignedbasicauth.template.json index bb02399118c98..ccf4212c56d7e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/cdk-integ-opensearch-unsignedbasicauth.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/cdk-integ-opensearch-unsignedbasicauth.template.json @@ -117,7 +117,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "DomainAccessPolicyCustomResourcePolicyE61F1845" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/manifest.json index f4b63337b6987..988e4e6a6f61e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.unsignedbasicauth.js.snapshot/manifest.json @@ -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}/309131300add1ea1ac843024771a92b708b5582baecfd8c58c1028a36c7b1c99.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/346451b912f3bfe60848f0e77413f6ca0a967831ca9c46fba7b914541b07f33c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -45,12 +45,6 @@ "data": "Domain66AC69E0" } ], - "/cdk-integ-opensearch-unsignedbasicauth/Domain/AccessPolicy": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/cdk-integ-opensearch-unsignedbasicauth/Domain/AccessPolicy/Resource/Default": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/aws-cdk-rds-instance.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/aws-cdk-rds-instance.assets.json index 8958c34bd6c4e..80de906480c99 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/aws-cdk-rds-instance.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/aws-cdk-rds-instance.assets.json @@ -14,7 +14,7 @@ } } }, - "55b4a4a22feb58cb14e5de0555a5577de10d3c255a5d8a39a7e17997c1c806ff": { + "eb837a2d3ba8f7df9bab0c9ba882491ccdc4ee87934039564d6d124e0d6f8cae": { "source": { "path": "aws-cdk-rds-instance.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "55b4a4a22feb58cb14e5de0555a5577de10d3c255a5d8a39a7e17997c1c806ff.json", + "objectKey": "eb837a2d3ba8f7df9bab0c9ba882491ccdc4ee87934039564d6d124e0d6f8cae.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-rds/test/integ.instance.lit.js.snapshot/aws-cdk-rds-instance.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/aws-cdk-rds-instance.template.json index 97f49f9218fee..d4923316271aa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/aws-cdk-rds-instance.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/aws-cdk-rds-instance.template.json @@ -1044,6 +1044,7 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/manifest.json index b939557d97952..41b2b6ff02dba 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/manifest.json @@ -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}/55b4a4a22feb58cb14e5de0555a5577de10d3c255a5d8a39a7e17997c1c806ff.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/eb837a2d3ba8f7df9bab0c9ba882491ccdc4ee87934039564d6d124e0d6f8cae.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/tree.json index 4bdcdebd8443b..88f07965de9d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance.lit.js.snapshot/tree.json @@ -1653,7 +1653,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "HighCPU": { @@ -1812,7 +1812,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/cdk-s3-bucket-auto-delete-objects.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/cdk-s3-bucket-auto-delete-objects.assets.json index faa1f0407c097..dba16183a12b1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/cdk-s3-bucket-auto-delete-objects.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/cdk-s3-bucket-auto-delete-objects.assets.json @@ -40,7 +40,7 @@ } } }, - "ccd4f004d1114ba4725538aca9bb9b67b536818b9e3e9561eafde055d6c11fb0": { + "82ac63c539aae78d3a2dc5a9b623016086705a73ae33e5538cc5c1961c111755": { "source": { "path": "cdk-s3-bucket-auto-delete-objects.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ccd4f004d1114ba4725538aca9bb9b67b536818b9e3e9561eafde055d6c11fb0.json", + "objectKey": "82ac63c539aae78d3a2dc5a9b623016086705a73ae33e5538cc5c1961c111755.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-s3/test/integ.bucket-auto-delete-objects.js.snapshot/cdk-s3-bucket-auto-delete-objects.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/cdk-s3-bucket-auto-delete-objects.template.json index 4e4842b499032..62bc11bbfffc6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/cdk-s3-bucket-auto-delete-objects.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/cdk-s3-bucket-auto-delete-objects.template.json @@ -342,7 +342,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "DeleteBucketCustomResourcePolicy99AB6B27" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/manifest.json index 8884b79cfb6e6..981c4de0d0374 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js.snapshot/manifest.json @@ -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}/ccd4f004d1114ba4725538aca9bb9b67b536818b9e3e9561eafde055d6c11fb0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/82ac63c539aae78d3a2dc5a9b623016086705a73ae33e5538cc5c1961c111755.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -99,12 +99,6 @@ "data": "RemovedBucketAutoDeleteObjectsCustomResourceDE96EADE" } ], - "/cdk-s3-bucket-auto-delete-objects/DeleteBucket": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/cdk-s3-bucket-auto-delete-objects/DeleteBucket/Resource/Default": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/aws-cdk-customresources-vpc.assets.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/aws-cdk-customresources-vpc.assets.json index dfb45b62564d2..7f02598ee4906 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/aws-cdk-customresources-vpc.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/aws-cdk-customresources-vpc.assets.json @@ -14,7 +14,7 @@ } } }, - "2c6fb87b2143de5986195f5fa899d695c38e7e31657cd3efad65c2f036a69b80": { + "fc44ee734bb3ff50e7ea21402d9c0515bc25fb6977d3779f8207506c5d3f8f86": { "source": { "path": "aws-cdk-customresources-vpc.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2c6fb87b2143de5986195f5fa899d695c38e7e31657cd3efad65c2f036a69b80.json", + "objectKey": "fc44ee734bb3ff50e7ea21402d9c0515bc25fb6977d3779f8207506c5d3f8f86.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/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/aws-cdk-customresources-vpc.template.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/aws-cdk-customresources-vpc.template.json index ab7c500ed60df..95321b1361380 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/aws-cdk-customresources-vpc.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/aws-cdk-customresources-vpc.template.json @@ -432,7 +432,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "DescribeVpcAttributeCustomResourcePolicyAF7C66C1" diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/manifest.json index 0250d7c5aabdd..d192411711fa8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource-vpc.js.snapshot/manifest.json @@ -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}/2c6fb87b2143de5986195f5fa899d695c38e7e31657cd3efad65c2f036a69b80.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fc44ee734bb3ff50e7ea21402d9c0515bc25fb6977d3779f8207506c5d3f8f86.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -171,12 +171,6 @@ "data": "VpcVPCGWBF912B6E" } ], - "/aws-cdk-customresources-vpc/DescribeVpcAttribute": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-customresources-vpc/DescribeVpcAttribute/Resource/Default": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.assets.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.assets.json index ae0d7845c28b0..fdc1b79288521 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.assets.json @@ -14,7 +14,7 @@ } } }, - "a913da80bae246ddb241313e3dae29652965ea5a9286651aa63f1273c7705dcd": { + "ec5a6508a91ca97dc8829f4e2c1a6611d83e3ab59751d4830beaed6e6c8f02f9": { "source": { "path": "aws-cdk-sdk-js-v3.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a913da80bae246ddb241313e3dae29652965ea5a9286651aa63f1273c7705dcd.json", + "objectKey": "ec5a6508a91ca97dc8829f4e2c1a6611d83e3ab59751d4830beaed6e6c8f02f9.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/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.template.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.template.json index 923db2e8a0015..0fe54c853c787 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.template.json @@ -44,7 +44,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "PublishCustomResourcePolicyDF696FCA" @@ -138,7 +138,7 @@ }, "Create": "{\"service\":\"SNS\",\"action\":\"listTopics\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", "Update": "{\"service\":\"SNS\",\"action\":\"listTopics\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "ListTopicsCustomResourcePolicy31A8396A", @@ -211,7 +211,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "GetParameterCustomResourcePolicyD8E5D455" @@ -311,7 +311,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -327,7 +327,7 @@ }, "Create": "{\"service\":\"EKS\",\"action\":\"describeCluster\",\"parameters\":{\"name\":\"fake-cluster\"},\"physicalResourceId\":{\"id\":\"fake-cluster\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", "Update": "{\"service\":\"EKS\",\"action\":\"describeCluster\",\"parameters\":{\"name\":\"fake-cluster\"},\"physicalResourceId\":{\"id\":\"fake-cluster\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "DescribeClusterCustomResourcePolicyD7730CF4" diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.assets.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.assets.json index bc13ddbc9eedc..c2e1adb69a6dd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.assets.json @@ -14,7 +14,7 @@ } } }, - "a913da80bae246ddb241313e3dae29652965ea5a9286651aa63f1273c7705dcd": { + "ec5a6508a91ca97dc8829f4e2c1a6611d83e3ab59751d4830beaed6e6c8f02f9": { "source": { "path": "aws-cdk-sdk-js.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a913da80bae246ddb241313e3dae29652965ea5a9286651aa63f1273c7705dcd.json", + "objectKey": "ec5a6508a91ca97dc8829f4e2c1a6611d83e3ab59751d4830beaed6e6c8f02f9.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/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.template.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.template.json index 923db2e8a0015..0fe54c853c787 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.template.json @@ -44,7 +44,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "PublishCustomResourcePolicyDF696FCA" @@ -138,7 +138,7 @@ }, "Create": "{\"service\":\"SNS\",\"action\":\"listTopics\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", "Update": "{\"service\":\"SNS\",\"action\":\"listTopics\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "ListTopicsCustomResourcePolicy31A8396A", @@ -211,7 +211,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "GetParameterCustomResourcePolicyD8E5D455" @@ -311,7 +311,7 @@ ] ] }, - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -327,7 +327,7 @@ }, "Create": "{\"service\":\"EKS\",\"action\":\"describeCluster\",\"parameters\":{\"name\":\"fake-cluster\"},\"physicalResourceId\":{\"id\":\"fake-cluster\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", "Update": "{\"service\":\"EKS\",\"action\":\"describeCluster\",\"parameters\":{\"name\":\"fake-cluster\"},\"physicalResourceId\":{\"id\":\"fake-cluster\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": "false" + "InstallLatestAwsSdk": false }, "DependsOn": [ "DescribeClusterCustomResourcePolicyD7730CF4" diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/manifest.json index 4bb89b7a6df2f..7a553d8f16769 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/manifest.json @@ -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}/a913da80bae246ddb241313e3dae29652965ea5a9286651aa63f1273c7705dcd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ec5a6508a91ca97dc8829f4e2c1a6611d83e3ab59751d4830beaed6e6c8f02f9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -39,12 +39,6 @@ "data": "TopicBFC7AF6E" } ], - "/aws-cdk-sdk-js/Publish": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-sdk-js/Publish/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -69,12 +63,6 @@ "data": "AWS679f53fac002430cb0da5b7982bd22872D164C4C" } ], - "/aws-cdk-sdk-js/ListTopics": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-sdk-js/ListTopics/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -93,12 +81,6 @@ "data": "Utf8Parameter6C885A19" } ], - "/aws-cdk-sdk-js/GetParameter": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-sdk-js/GetParameter/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -123,24 +105,12 @@ "data": "CustomRoleDefaultPolicyC5C189DF" } ], - "/aws-cdk-sdk-js/GetParameterNoPolicy": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-sdk-js/GetParameterNoPolicy/Resource/Default": [ { "type": "aws:cdk:logicalId", "data": "GetParameterNoPolicyFCF7AA3B" } ], - "/aws-cdk-sdk-js/DescribeCluster": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-sdk-js/DescribeCluster/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -208,7 +178,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}/a913da80bae246ddb241313e3dae29652965ea5a9286651aa63f1273c7705dcd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ec5a6508a91ca97dc8829f4e2c1a6611d83e3ab59751d4830beaed6e6c8f02f9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -230,12 +200,6 @@ "data": "TopicBFC7AF6E" } ], - "/aws-cdk-sdk-js-v3/Publish": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-sdk-js-v3/Publish/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -260,12 +224,6 @@ "data": "AWS679f53fac002430cb0da5b7982bd22872D164C4C" } ], - "/aws-cdk-sdk-js-v3/ListTopics": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-sdk-js-v3/ListTopics/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -284,12 +242,6 @@ "data": "Utf8Parameter6C885A19" } ], - "/aws-cdk-sdk-js-v3/GetParameter": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-sdk-js-v3/GetParameter/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -314,24 +266,12 @@ "data": "CustomRoleDefaultPolicyC5C189DF" } ], - "/aws-cdk-sdk-js-v3/GetParameterNoPolicy": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-sdk-js-v3/GetParameterNoPolicy/Resource/Default": [ { "type": "aws:cdk:logicalId", "data": "GetParameterNoPolicyFCF7AA3B" } ], - "/aws-cdk-sdk-js-v3/DescribeCluster": [ - { - "type": "aws:cdk:warning", - "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" - } - ], "/aws-cdk-sdk-js-v3/DescribeCluster/Resource/Default": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.assets.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.assets.json index 990441b0a5292..5ddb3aeafc6f7 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.assets.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.assets.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js deleted file mode 100644 index 9788d2663bdd4..0000000000000 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.js +++ /dev/null @@ -1,187 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = void 0; -/* eslint-disable no-console */ -// eslint-disable-next-line import/no-extraneous-dependencies -const Logs = require("@aws-sdk/client-cloudwatch-logs"); -/** - * Creates a log group and doesn't throw if it exists. - */ -async function createLogGroupSafe(logGroupName, client, withDelay) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.CreateLogGroupCommand(params); - await client.send(command); - } - catch (error) { - if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { - // The log group is already created by the lambda execution - return; - } - throw error; - } - }); -} -/** - * Deletes a log group and doesn't throw if it does not exist. - */ -async function deleteLogGroup(logGroupName, client, withDelay) { - await withDelay(async () => { - try { - const params = { logGroupName }; - const command = new Logs.DeleteLogGroupCommand(params); - await client.send(command); - } - catch (error) { - if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { - // The log group doesn't exist - return; - } - throw error; - } - }); -} -/** - * Puts or deletes a retention policy on a log group. - */ -async function setRetentionPolicy(logGroupName, client, withDelay, retentionInDays) { - await withDelay(async () => { - if (!retentionInDays) { - const params = { logGroupName }; - const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); - await client.send(deleteCommand); - } - else { - const params = { logGroupName, retentionInDays }; - const putCommand = new Logs.PutRetentionPolicyCommand(params); - await client.send(putCommand); - } - }); -} -async function handler(event, context) { - try { - console.log(JSON.stringify({ ...event, ResponseURL: '...' })); - // The target log group - const logGroupName = event.ResourceProperties.LogGroupName; - // The region of the target log group - const logGroupRegion = event.ResourceProperties.LogGroupRegion; - // Parse to AWS SDK retry options - const withDelay = makeWithDelay(parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries)); - const sdkConfig = { - logger: console, - region: logGroupRegion, - }; - const client = new Logs.CloudWatchLogsClient(sdkConfig); - if (event.RequestType === 'Create' || event.RequestType === 'Update') { - // Act on the target log group - await createLogGroupSafe(logGroupName, client, withDelay); - await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); - // Configure the Log Group for the Custom Resource function itself - if (event.RequestType === 'Create') { - const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ - logger: console, - region: process.env.AWS_REGION, - }); - // Set a retention policy of 1 day on the logs of this very function. - // Due to the async nature of the log group creation, the log group for this function might - // still be not created yet at this point. Therefore we attempt to create it. - // In case it is being created, createLogGroupSafe will handle the conflict. - await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); - // If createLogGroupSafe fails, the log group is not created even after multiple attempts. - // In this case we have nothing to set the retention policy on but an exception will skip - // the next line. - await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); - } - } - // When the requestType is delete, delete the log group if the removal policy is delete - if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { - await deleteLogGroup(logGroupName, client, withDelay); - // else retain the log group - } - await respond('SUCCESS', 'OK', logGroupName); - } - catch (e) { - console.log(e); - await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); - } - function respond(responseStatus, reason, physicalResourceId) { - const responseBody = JSON.stringify({ - Status: responseStatus, - Reason: reason, - PhysicalResourceId: physicalResourceId, - StackId: event.StackId, - RequestId: event.RequestId, - LogicalResourceId: event.LogicalResourceId, - Data: { - // Add log group name as part of the response so that it's available via Fn::GetAtt - LogGroupName: event.ResourceProperties.LogGroupName, - }, - }); - console.log('Responding', responseBody); - // eslint-disable-next-line @typescript-eslint/no-require-imports - const parsedUrl = require('url').parse(event.ResponseURL); - const requestOptions = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { - 'content-type': '', - 'content-length': Buffer.byteLength(responseBody, 'utf8'), - }, - }; - return new Promise((resolve, reject) => { - try { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const request = require('https').request(requestOptions, resolve); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); - } -} -exports.handler = handler; -function parseIntOptional(value, base = 10) { - if (value === undefined) { - return undefined; - } - return parseInt(value, base); -} -function makeWithDelay(maxRetries = 5, delayBase = 100, delayCap = 10 * 1000) { - // If we try to update the log group, then due to the async nature of - // Lambda logging there could be a race condition when the same log group is - // already being created by the lambda execution. This can sometime result in - // an error "OperationAbortedException: A conflicting operation is currently - // in progress...Please try again." - // To avoid an error, we do as requested and try again. - return async (block) => { - let attempts = 0; - do { - try { - return await block(); - } - catch (error) { - if (error instanceof Logs.OperationAbortedException || error.name === 'OperationAbortedException') { - if (attempts < maxRetries) { - attempts++; - await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); - continue; - } - else { - // The log group is still being changed by another execution but we are out of retries - throw new Error('Out of attempts to change log group'); - } - } - throw error; - } - } while (true); // exit happens on retry count check - }; -} -function calculateDelay(attempt, base, cap) { - return Math.round(Math.random() * Math.min(cap, base * 2 ** attempt)); -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO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gaWYgKGF0dGVtcHRzIDwgbWF4UmV0cmllcyApIHtcbiAgICAgICAgICAgIGF0dGVtcHRzKys7XG4gICAgICAgICAgICBhd2FpdCBuZXcgUHJvbWlzZShyZXNvbHZlID0+IHNldFRpbWVvdXQocmVzb2x2ZSwgY2FsY3VsYXRlRGVsYXkoYXR0ZW1wdHMsIGRlbGF5QmFzZSwgZGVsYXlDYXApKSk7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gVGhlIGxvZyBncm91cCBpcyBzdGlsbCBiZWluZyBjaGFuZ2VkIGJ5IGFub3RoZXIgZXhlY3V0aW9uIGJ1dCB3ZSBhcmUgb3V0IG9mIHJldHJpZXNcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignT3V0IG9mIGF0dGVtcHRzIHRvIGNoYW5nZSBsb2cgZ3JvdXAnKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICB9XG4gICAgfSB3aGlsZSAodHJ1ZSk7IC8vIGV4aXQgaGFwcGVucyBvbiByZXRyeSBjb3VudCBjaGVja1xuICB9O1xufVxuXG5mdW5jdGlvbiBjYWxjdWxhdGVEZWxheShhdHRlbXB0OiBudW1iZXIsIGJhc2U6IG51bWJlciwgY2FwOiBudW1iZXIpOiBudW1iZXIge1xuICByZXR1cm4gTWF0aC5yb3VuZChNYXRoLnJhbmRvbSgpICogTWF0aC5taW4oY2FwLCBiYXNlICogMiAqKiBhdHRlbXB0KSk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.d.ts b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.d.ts similarity index 100% rename from packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9/index.d.ts rename to packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.d.ts diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js new file mode 100644 index 0000000000000..8d4f5cf13f88d --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.js @@ -0,0 +1,192 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +/* eslint-disable no-console */ +// eslint-disable-next-line import/no-extraneous-dependencies +const Logs = require("@aws-sdk/client-cloudwatch-logs"); +/** + * Creates a log group and doesn't throw if it exists. + */ +async function createLogGroupSafe(logGroupName, client, withDelay) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.CreateLogGroupCommand(params); + await client.send(command); + } + catch (error) { + if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { + // The log group is already created by the lambda execution + return; + } + throw error; + } + }); +} +/** + * Deletes a log group and doesn't throw if it does not exist. + */ +async function deleteLogGroup(logGroupName, client, withDelay) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.DeleteLogGroupCommand(params); + await client.send(command); + } + catch (error) { + if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { + // The log group doesn't exist + return; + } + throw error; + } + }); +} +/** + * Puts or deletes a retention policy on a log group. + */ +async function setRetentionPolicy(logGroupName, client, withDelay, retentionInDays) { + await withDelay(async () => { + if (!retentionInDays) { + const params = { logGroupName }; + const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); + await client.send(deleteCommand); + } + else { + const params = { logGroupName, retentionInDays }; + const putCommand = new Logs.PutRetentionPolicyCommand(params); + await client.send(putCommand); + } + }); +} +async function handler(event, context) { + try { + console.log(JSON.stringify({ ...event, ResponseURL: '...' })); + // The target log group + const logGroupName = event.ResourceProperties.LogGroupName; + // The region of the target log group + const logGroupRegion = event.ResourceProperties.LogGroupRegion; + // Parse to AWS SDK retry options + const maxRetries = parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries) ?? 5; + const withDelay = makeWithDelay(maxRetries); + const sdkConfig = { + logger: console, + region: logGroupRegion, + maxAttempts: Math.max(5, maxRetries), // Use a minimum for SDK level retries, because it might include retryable failures that withDelay isn't checking for + }; + const client = new Logs.CloudWatchLogsClient(sdkConfig); + if (event.RequestType === 'Create' || event.RequestType === 'Update') { + // Act on the target log group + await createLogGroupSafe(logGroupName, client, withDelay); + await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); + // Configure the Log Group for the Custom Resource function itself + if (event.RequestType === 'Create') { + const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ + logger: console, + region: process.env.AWS_REGION, + }); + // Set a retention policy of 1 day on the logs of this very function. + // Due to the async nature of the log group creation, the log group for this function might + // still be not created yet at this point. Therefore we attempt to create it. + // In case it is being created, createLogGroupSafe will handle the conflict. + await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); + // If createLogGroupSafe fails, the log group is not created even after multiple attempts. + // In this case we have nothing to set the retention policy on but an exception will skip + // the next line. + await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); + } + } + // When the requestType is delete, delete the log group if the removal policy is delete + if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { + await deleteLogGroup(logGroupName, client, withDelay); + // else retain the log group + } + await respond('SUCCESS', 'OK', logGroupName); + } + catch (e) { + console.log(e); + await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); + } + function respond(responseStatus, reason, physicalResourceId) { + const responseBody = JSON.stringify({ + Status: responseStatus, + Reason: reason, + PhysicalResourceId: physicalResourceId, + StackId: event.StackId, + RequestId: event.RequestId, + LogicalResourceId: event.LogicalResourceId, + Data: { + // Add log group name as part of the response so that it's available via Fn::GetAtt + LogGroupName: event.ResourceProperties.LogGroupName, + }, + }); + console.log('Responding', responseBody); + // eslint-disable-next-line @typescript-eslint/no-require-imports + const parsedUrl = require('url').parse(event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { + 'content-type': '', + 'content-length': Buffer.byteLength(responseBody, 'utf8'), + }, + }; + return new Promise((resolve, reject) => { + try { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const request = require('https').request(requestOptions, resolve); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); + } +} +exports.handler = handler; +function parseIntOptional(value, base = 10) { + if (value === undefined) { + return undefined; + } + return parseInt(value, base); +} +function makeWithDelay(maxRetries, delayBase = 100, delayCap = 10 * 1000) { + // If we try to update the log group, then due to the async nature of + // Lambda logging there could be a race condition when the same log group is + // already being created by the lambda execution. This can sometime result in + // an error "OperationAbortedException: A conflicting operation is currently + // in progress...Please try again." + // To avoid an error, we do as requested and try again. + return async (block) => { + let attempts = 0; + do { + try { + return await block(); + } + catch (error) { + if (error instanceof Logs.OperationAbortedException + || error.name === 'OperationAbortedException' + || error.name === 'ThrottlingException' // There is no class to check with instanceof, see https://github.com/aws/aws-sdk-js-v3/issues/5140 + ) { + if (attempts < maxRetries) { + attempts++; + await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); + continue; + } + else { + // The log group is still being changed by another execution but we are out of retries + throw new Error('Out of attempts to change log group'); + } + } + throw error; + } + } while (true); // exit happens on retry count check + }; +} +function calculateDelay(attempt, base, cap) { + return Math.round(Math.random() * Math.min(cap, base * 2 ** attempt)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsNkRBQTZEO0FBQzdELHdEQUF3RDtBQWV4RDs7R0FFRztBQUNILEtBQUssVUFBVSxrQkFBa0IsQ0FBQyxZQUFvQixFQUFFLE1BQWlDLEVBQUUsU0FBd0Q7SUFDakosTUFBTSxTQUFTLENBQUMsS0FBSyxJQUFJLEVBQUU7UUFDekIsSUFBSTtZQUNGLE1BQU0sTUFBTSxHQUFHLEVBQUUsWUFBWSxFQUFFLENBQUM7WUFDaEMsTUFBTSxPQUFPLEdBQUcsSUFBSSxJQUFJLENBQUMscUJBQXFCLENBQUMsTUFBTSxDQUFDLENBQUM7WUFDdkQsTUFBTSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDO1NBRTVCO1FBQUMsT0FBTyxLQUFVLEVBQUU7WUFDbkIsSUFBSSxLQUFLLFlBQVksSUFBSSxDQUFDLDhCQUE4QixJQUFJLEtBQUssQ0FBQyxJQUFJLEtBQUssZ0NBQWdDLEVBQUU7Z0JBQzNHLDJEQUEyRDtnQkFDM0QsT0FBTzthQUNSO1lBRUQsTUFBTSxLQUFLLENBQUM7U0FDYjtJQUNILENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUVEOztHQUVHO0FBQ0gsS0FBSyxVQUFVLGNBQWMsQ0FBQyxZQUFvQixFQUFFLE1BQWlDLEVBQUUsU0FBd0Q7SUFDN0ksTUFBTSxTQUFTLENBQUMsS0FBSyxJQUFJLEVBQUU7UUFDekIsSUFBSTtZQUNGLE1BQU0sTUFBTSxHQ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XNvbHZlID0+IHNldFRpbWVvdXQocmVzb2x2ZSwgY2FsY3VsYXRlRGVsYXkoYXR0ZW1wdHMsIGRlbGF5QmFzZSwgZGVsYXlDYXApKSk7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gVGhlIGxvZyBncm91cCBpcyBzdGlsbCBiZWluZyBjaGFuZ2VkIGJ5IGFub3RoZXIgZXhlY3V0aW9uIGJ1dCB3ZSBhcmUgb3V0IG9mIHJldHJpZXNcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignT3V0IG9mIGF0dGVtcHRzIHRvIGNoYW5nZSBsb2cgZ3JvdXAnKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICB9XG4gICAgfSB3aGlsZSAodHJ1ZSk7IC8vIGV4aXQgaGFwcGVucyBvbiByZXRyeSBjb3VudCBjaGVja1xuICB9O1xufVxuXG5mdW5jdGlvbiBjYWxjdWxhdGVEZWxheShhdHRlbXB0OiBudW1iZXIsIGJhc2U6IG51bWJlciwgY2FwOiBudW1iZXIpOiBudW1iZXIge1xuICByZXR1cm4gTWF0aC5yb3VuZChNYXRoLnJhbmRvbSgpICogTWF0aC5taW4oY2FwLCBiYXNlICogMiAqKiBhdHRlbXB0KSk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts new file mode 100644 index 0000000000000..88843fe3fa016 --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0/index.ts @@ -0,0 +1,229 @@ +/* eslint-disable no-console */ +// eslint-disable-next-line import/no-extraneous-dependencies +import * as Logs from '@aws-sdk/client-cloudwatch-logs'; + +interface LogRetentionEvent extends Omit { + ResourceProperties: { + ServiceToken: string; + LogGroupName: string; + LogGroupRegion?: string; + RetentionInDays?: string; + SdkRetry?: { + maxRetries?: string; + }; + RemovalPolicy?: string + }; +} + +/** + * Creates a log group and doesn't throw if it exists. + */ +async function createLogGroupSafe(logGroupName: string, client: Logs.CloudWatchLogsClient, withDelay: (block: () => Promise) => Promise) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.CreateLogGroupCommand(params); + await client.send(command); + + } catch (error: any) { + if (error instanceof Logs.ResourceAlreadyExistsException || error.name === 'ResourceAlreadyExistsException') { + // The log group is already created by the lambda execution + return; + } + + throw error; + } + }); +} + +/** + * Deletes a log group and doesn't throw if it does not exist. + */ +async function deleteLogGroup(logGroupName: string, client: Logs.CloudWatchLogsClient, withDelay: (block: () => Promise) => Promise) { + await withDelay(async () => { + try { + const params = { logGroupName }; + const command = new Logs.DeleteLogGroupCommand(params); + await client.send(command); + + } catch (error: any) { + if (error instanceof Logs.ResourceNotFoundException || error.name === 'ResourceNotFoundException') { + // The log group doesn't exist + return; + } + + throw error; + } + }); +} + +/** + * Puts or deletes a retention policy on a log group. + */ +async function setRetentionPolicy( + logGroupName: string, + client: Logs.CloudWatchLogsClient, + withDelay: (block: () => Promise) => Promise, + retentionInDays?: number, +) { + + await withDelay(async () => { + if (!retentionInDays) { + const params = { logGroupName }; + const deleteCommand = new Logs.DeleteRetentionPolicyCommand(params); + await client.send(deleteCommand); + } else { + const params = { logGroupName, retentionInDays }; + const putCommand = new Logs.PutRetentionPolicyCommand(params); + await client.send(putCommand); + } + }); +} + +export async function handler(event: LogRetentionEvent, context: AWSLambda.Context) { + try { + console.log(JSON.stringify({ ...event, ResponseURL: '...' })); + + // The target log group + const logGroupName = event.ResourceProperties.LogGroupName; + + // The region of the target log group + const logGroupRegion = event.ResourceProperties.LogGroupRegion; + + // Parse to AWS SDK retry options + const maxRetries = parseIntOptional(event.ResourceProperties.SdkRetry?.maxRetries) ?? 5; + const withDelay = makeWithDelay(maxRetries); + + const sdkConfig: Logs.CloudWatchLogsClientConfig = { + logger: console, + region: logGroupRegion, + maxAttempts: Math.max(5, maxRetries), // Use a minimum for SDK level retries, because it might include retryable failures that withDelay isn't checking for + }; + const client = new Logs.CloudWatchLogsClient(sdkConfig); + + if (event.RequestType === 'Create' || event.RequestType === 'Update') { + // Act on the target log group + await createLogGroupSafe(logGroupName, client, withDelay); + await setRetentionPolicy(logGroupName, client, withDelay, parseIntOptional(event.ResourceProperties.RetentionInDays)); + + // Configure the Log Group for the Custom Resource function itself + if (event.RequestType === 'Create') { + const clientForCustomResourceFunction = new Logs.CloudWatchLogsClient({ + logger: console, + region: process.env.AWS_REGION, + }); + // Set a retention policy of 1 day on the logs of this very function. + // Due to the async nature of the log group creation, the log group for this function might + // still be not created yet at this point. Therefore we attempt to create it. + // In case it is being created, createLogGroupSafe will handle the conflict. + await createLogGroupSafe(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay); + // If createLogGroupSafe fails, the log group is not created even after multiple attempts. + // In this case we have nothing to set the retention policy on but an exception will skip + // the next line. + await setRetentionPolicy(`/aws/lambda/${context.functionName}`, clientForCustomResourceFunction, withDelay, 1); + } + } + + // When the requestType is delete, delete the log group if the removal policy is delete + if (event.RequestType === 'Delete' && event.ResourceProperties.RemovalPolicy === 'destroy') { + await deleteLogGroup(logGroupName, client, withDelay); + // else retain the log group + } + + await respond('SUCCESS', 'OK', logGroupName); + } catch (e: any) { + console.log(e); + await respond('FAILED', e.message, event.ResourceProperties.LogGroupName); + } + + function respond(responseStatus: string, reason: string, physicalResourceId: string) { + const responseBody = JSON.stringify({ + Status: responseStatus, + Reason: reason, + PhysicalResourceId: physicalResourceId, + StackId: event.StackId, + RequestId: event.RequestId, + LogicalResourceId: event.LogicalResourceId, + Data: { + // Add log group name as part of the response so that it's available via Fn::GetAtt + LogGroupName: event.ResourceProperties.LogGroupName, + }, + }); + + console.log('Responding', responseBody); + + // eslint-disable-next-line @typescript-eslint/no-require-imports + const parsedUrl = require('url').parse(event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { + 'content-type': '', + 'content-length': Buffer.byteLength(responseBody, 'utf8'), + }, + }; + + return new Promise((resolve, reject) => { + try { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const request = require('https').request(requestOptions, resolve); + request.on('error', reject); + request.write(responseBody); + request.end(); + } catch (e) { + reject(e); + } + }); + } +} + +function parseIntOptional(value?: string, base = 10): number | undefined { + if (value === undefined) { + return undefined; + } + + return parseInt(value, base); +} + +function makeWithDelay( + maxRetries: number, + delayBase: number = 100, + delayCap = 10 * 1000, // 10s +): (block: () => Promise) => Promise { + // If we try to update the log group, then due to the async nature of + // Lambda logging there could be a race condition when the same log group is + // already being created by the lambda execution. This can sometime result in + // an error "OperationAbortedException: A conflicting operation is currently + // in progress...Please try again." + // To avoid an error, we do as requested and try again. + + return async (block: () => Promise) => { + let attempts = 0; + do { + try { + return await block(); + } catch (error: any) { + if ( + error instanceof Logs.OperationAbortedException + || error.name === 'OperationAbortedException' + || error.name === 'ThrottlingException' // There is no class to check with instanceof, see https://github.com/aws/aws-sdk-js-v3/issues/5140 + ) { + if (attempts < maxRetries ) { + attempts++; + await new Promise(resolve => setTimeout(resolve, calculateDelay(attempts, delayBase, delayCap))); + continue; + } else { + // The log group is still being changed by another execution but we are out of retries + throw new Error('Out of attempts to change log group'); + } + } + throw error; + } + } while (true); // exit happens on retry count check + }; +} + +function calculateDelay(attempt: number, base: number, cap: number): number { + return Math.round(Math.random() * Math.min(cap, base * 2 ** attempt)); +} diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/aws-cdk-neptune-integ.assets.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/aws-cdk-neptune-integ.assets.json index b0b12666200b3..28615be1e1498 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/aws-cdk-neptune-integ.assets.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/aws-cdk-neptune-integ.assets.json @@ -1,20 +1,20 @@ { - "version": "33.0.0", + "version": "34.0.0", "files": { - "4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9": { + "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0": { "source": { - "path": "asset.4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9", + "path": "asset.a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9.zip", + "objectKey": "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "08e7114f7a497e7b23ca508f3fe6b28b8823f7e7a3b5403dbcddcd1ccd58e2f3": { + "31a87fb5aef089dd280a31f79cc97e52f83ad369806b71883a396db15816a8d4": { "source": { "path": "aws-cdk-neptune-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "08e7114f7a497e7b23ca508f3fe6b28b8823f7e7a3b5403dbcddcd1ccd58e2f3.json", + "objectKey": "31a87fb5aef089dd280a31f79cc97e52f83ad369806b71883a396db15816a8d4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/aws-cdk-neptune-integ.template.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/aws-cdk-neptune-integ.template.json index 7a652ca8d5610..edbf8c2936e38 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/aws-cdk-neptune-integ.template.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/aws-cdk-neptune-integ.template.json @@ -626,11 +626,12 @@ "Properties": { "Handler": "index.handler", "Runtime": "nodejs18.x", + "Timeout": 900, "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "4763e20569cc1d6f7ae496bbfb0b3e9bc205a1811c78c9a6bc18d949d737c2a9.zip" + "S3Key": "a8515c042d9c942705087943220417be929ac44f968d8fcef2681681b400c0c0.zip" }, "Role": { "Fn::GetAtt": [ diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/cdk.out b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/cdk.out index 560dae10d018f..2313ab5436501 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"33.0.0"} \ No newline at end of file +{"version":"34.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/integ.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/integ.json index 02b5d2826826b..e7e257d602124 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "testCases": { "ClusterTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/manifest.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/manifest.json index 49cedf9cefcfc..6f3e6c0db8318 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "33.0.0", + "version": "34.0.0", "artifacts": { "aws-cdk-neptune-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}/08e7114f7a497e7b23ca508f3fe6b28b8823f7e7a3b5403dbcddcd1ccd58e2f3.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/31a87fb5aef089dd280a31f79cc97e52f83ad369806b71883a396db15816a8d4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -180,10 +180,7 @@ "/aws-cdk-neptune-integ/Params/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ParamsA8366201", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" - ] + "data": "ParamsA8366201" } ], "/aws-cdk-neptune-integ/Database/Subnets/Resource": [ diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/tree.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/tree.json index b2d922d6c67fa..6ab4ca12e4bcc 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster.js.snapshot/tree.json @@ -1054,7 +1054,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "Alarm": { @@ -1130,7 +1130,7 @@ "path": "ClusterTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "DeployAssert": { @@ -1176,7 +1176,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, diff --git a/packages/aws-cdk-lib/aws-logs/lib/log-retention.ts b/packages/aws-cdk-lib/aws-logs/lib/log-retention.ts index 7d41cfa5a2e2a..fd90f46fa0905 100644 --- a/packages/aws-cdk-lib/aws-logs/lib/log-retention.ts +++ b/packages/aws-cdk-lib/aws-logs/lib/log-retention.ts @@ -171,6 +171,7 @@ class LogRetentionFunction extends Construct implements cdk.ITaggable { properties: { Handler: 'index.handler', Runtime: 'nodejs18.x', + Timeout: cdk.Duration.minutes(15).toSeconds(), Code: { S3Bucket: asset.s3BucketName, S3Key: asset.s3ObjectKey, diff --git a/packages/aws-cdk-lib/aws-logs/test/log-retention.test.ts b/packages/aws-cdk-lib/aws-logs/test/log-retention.test.ts index 487f3f0550c2b..e6b477b5cab99 100644 --- a/packages/aws-cdk-lib/aws-logs/test/log-retention.test.ts +++ b/packages/aws-cdk-lib/aws-logs/test/log-retention.test.ts @@ -534,4 +534,20 @@ describe('log retention', () => { }, }); }); + + test('function timeout is 15 minutes', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new LogRetention(stack, 'MyLambda', { + logGroupName: 'group', + retention: RetentionDays.ONE_DAY, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', { + Timeout: 900, + }); + }); });