diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000000..aa94c88eb6de9 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: + - repo: https://github.com/gitleaks/gitleaks + rev: v8.17.0 + hooks: + - id: gitleaks diff --git a/CHANGELOG.v2.alpha.md b/CHANGELOG.v2.alpha.md index 433670e7ec04c..b06628880c00e 100644 --- a/CHANGELOG.v2.alpha.md +++ b/CHANGELOG.v2.alpha.md @@ -2,6 +2,19 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.118.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.117.0-alpha.0...v2.118.0-alpha.0) (2024-01-03) + + +### Features + +* **glue:** database description property ([#27744](https://github.com/aws/aws-cdk/issues/27744)) ([cbac240](https://github.com/aws/aws-cdk/commit/cbac24041db7dbc39b4ae1d6da4902b3443528cb)), closes [#27740](https://github.com/aws/aws-cdk/issues/27740) +* **glue-alpha:** add `cfn-glue-table-tableinput-parameters` to Glue table construct ([#27643](https://github.com/aws/aws-cdk/issues/27643)) ([8e15482](https://github.com/aws/aws-cdk/commit/8e15482295c1324eefea020faeb11e4c686357c6)) + + +### Bug Fixes + +* **lambda-go:** path with space breaks go build ([#28554](https://github.com/aws/aws-cdk/issues/28554)) ([a8a639e](https://github.com/aws/aws-cdk/commit/a8a639e2a2114162db240361c32c40a596a7a19e)), closes [#28555](https://github.com/aws/aws-cdk/issues/28555) + ## [2.117.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.116.1-alpha.0...v2.117.0-alpha.0) (2023-12-26) diff --git a/CHANGELOG.v2.md b/CHANGELOG.v2.md index b9ddd965bf06c..a8d8af671f837 100644 --- a/CHANGELOG.v2.md +++ b/CHANGELOG.v2.md @@ -2,6 +2,36 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.118.0](https://github.com/aws/aws-cdk/compare/v2.117.0...v2.118.0) (2024-01-03) + + +### Features + +* **appsync:** IntrospectionConfig property ([#28500](https://github.com/aws/aws-cdk/issues/28500)) ([98ed6b3](https://github.com/aws/aws-cdk/commit/98ed6b3346e4afd423592296bb1620d20544acad)), closes [#28429](https://github.com/aws/aws-cdk/issues/28429) +* **autoscaling:** add support for `InstanceRequirements` property ([#28464](https://github.com/aws/aws-cdk/issues/28464)) ([276e3a6](https://github.com/aws/aws-cdk/commit/276e3a66febf32afc65a93d7296ec6be8f6e2126)), closes [#28393](https://github.com/aws/aws-cdk/issues/28393) +* **cloudfront:** CloudFront Function runtime property ([#28099](https://github.com/aws/aws-cdk/issues/28099)) ([9b466ae](https://github.com/aws/aws-cdk/commit/9b466ae136910d07d4297a31f1010fa26ce864d0)), closes [#28163](https://github.com/aws/aws-cdk/issues/28163) +* **cloudfront:** Key Value Store L2 ([#28473](https://github.com/aws/aws-cdk/issues/28473)) ([030db42](https://github.com/aws/aws-cdk/commit/030db42ad06a471af3833665cb80dceee034aa02)), closes [#28377](https://github.com/aws/aws-cdk/issues/28377) +* **codepipeline-actions:** more convenient methods to `CacheControl` ([#28491](https://github.com/aws/aws-cdk/issues/28491)) ([a59dc0c](https://github.com/aws/aws-cdk/commit/a59dc0cb79af98ee601f352a7cf1b5fa9cc4d365)), closes [#25477](https://github.com/aws/aws-cdk/issues/25477) +* **ecs:** `interactive` option in `ContainerDefinitionOptions` ([#28536](https://github.com/aws/aws-cdk/issues/28536)) ([1f9788f](https://github.com/aws/aws-cdk/commit/1f9788f8ad45c0f159c9b7e6bafb76763e9b0bea)), closes [#24326](https://github.com/aws/aws-cdk/issues/24326) +* **ecs:** enable cluster to grant task protection API permissions to IAM entities ([#28486](https://github.com/aws/aws-cdk/issues/28486)) ([9bc972b](https://github.com/aws/aws-cdk/commit/9bc972b923b66248fb8392e9cba1b2b5829c6e1b)), closes [#26233](https://github.com/aws/aws-cdk/issues/26233) +* **ecs:** nvidia support to BottlerocketEcsVariant enum for gpu-accelerated tasks ([#28488](https://github.com/aws/aws-cdk/issues/28488)) ([832e29a](https://github.com/aws/aws-cdk/commit/832e29a47c2cb67558c0148a3bf1fa22e4d5cb82)), closes [#25980](https://github.com/aws/aws-cdk/issues/25980) +* **iam:** validate roleName ([#28509](https://github.com/aws/aws-cdk/issues/28509)) ([999c01a](https://github.com/aws/aws-cdk/commit/999c01a1250308b482fe33e651d7ee8da1f96956)), closes [#28502](https://github.com/aws/aws-cdk/issues/28502) +* **opensearchservice:** ip address type for domain ([#28497](https://github.com/aws/aws-cdk/issues/28497)) ([6b80338](https://github.com/aws/aws-cdk/commit/6b80338be59bdfa1d14d81fa1ae79f2eda889b37)), closes [#28436](https://github.com/aws/aws-cdk/issues/28436) +* **rds:** `timeout` and `timeoutAction` properties to ServerlessCluster ([#28534](https://github.com/aws/aws-cdk/issues/28534)) ([508825b](https://github.com/aws/aws-cdk/commit/508825b14d6ccae7274afc08487329162182e887)), closes [#27183](https://github.com/aws/aws-cdk/issues/27183) +* **rds:** ClientPasswordAuthType property on DatabaseProxy ([#28540](https://github.com/aws/aws-cdk/issues/28540)) ([669e6ff](https://github.com/aws/aws-cdk/commit/669e6ffc6e9d8c7b06cb0f62348635f933b6f823)), closes [#28415](https://github.com/aws/aws-cdk/issues/28415) +* **rds:** new Aurora Postgres engine versions ([#28508](https://github.com/aws/aws-cdk/issues/28508)) ([9d8b06f](https://github.com/aws/aws-cdk/commit/9d8b06f6478a98e01e3aaa86c1dbf22d6e861f05)) +* **stepfunctions-tasks:** add `timeout` parameter for EmrCreateCluster ([#28532](https://github.com/aws/aws-cdk/issues/28532)) ([ca91626](https://github.com/aws/aws-cdk/commit/ca91626327ac4a138adc16026d951f21fadf86a3)), closes [/github.com/aws/aws-cdk/pull/28529#discussion_r1438587964](https://github.com/aws//github.com/aws/aws-cdk/pull/28529/issues/discussion_r1438587964) +* **stepfunctions-tasks:** add validations for EmrCreateCluster ([#28529](https://github.com/aws/aws-cdk/issues/28529)) ([e0b725c](https://github.com/aws/aws-cdk/commit/e0b725cd39a01a8387dcf28921e0912552eb7fce)) +* **stepfunctions-tasks:** additional allocation strategies for spot instance fleets in EmrCreateCluster ([#28525](https://github.com/aws/aws-cdk/issues/28525)) ([94003ec](https://github.com/aws/aws-cdk/commit/94003ecb056e56623aa6621a2d013c1a7e3dcebe)) + + +### Bug Fixes + +* **cli:** direct deploy method fails when there are no updates ([#28523](https://github.com/aws/aws-cdk/issues/28523)) ([dde5975](https://github.com/aws/aws-cdk/commit/dde59755cb71aee73a58f3b2c2068f2ae01e9b72)), closes [/github.com/aws/aws-cdk/blob/9d8b06f6478a98e01e3aaa86c1dbf22d6e861f05/packages/aws-cdk/lib/api/util/cloudformation.ts#L290-L296](https://github.com/aws//github.com/aws/aws-cdk/blob/9d8b06f6478a98e01e3aaa86c1dbf22d6e861f05/packages/aws-cdk/lib/api/util/cloudformation.ts/issues/L290-L296) +* **events:** event bus fails with duplicate policy resource ([#28521](https://github.com/aws/aws-cdk/issues/28521)) ([166967f](https://github.com/aws/aws-cdk/commit/166967f11727a28fc11b9af5de0fad6da2a4ad64)), closes [#27340](https://github.com/aws/aws-cdk/issues/27340) [#28520](https://github.com/aws/aws-cdk/issues/28520) +* **iam:** withConditions overrides Principal actions ([#28510](https://github.com/aws/aws-cdk/issues/28510)) ([0b345c5](https://github.com/aws/aws-cdk/commit/0b345c5a98a61ae7a587e5578ffdfc69885bb676)), closes [#28426](https://github.com/aws/aws-cdk/issues/28426) +* **rds:** circular dependencies when creating multiple DatabaseProxies ([#28471](https://github.com/aws/aws-cdk/issues/28471)) ([a12d9eb](https://github.com/aws/aws-cdk/commit/a12d9eb75cc110657a73c6cb82399d572696d36e)), closes [/github.com/aws/aws-cdk/blob/cd54c4239ec29182e30fd91634505df560d6e5f8/packages/aws-cdk-lib/aws-rds/lib/cluster.ts#L446](https://github.com/aws//github.com/aws/aws-cdk/blob/cd54c4239ec29182e30fd91634505df560d6e5f8/packages/aws-cdk-lib/aws-rds/lib/cluster.ts/issues/L446) [#25633](https://github.com/aws/aws-cdk/issues/25633) + ## [2.117.0](https://github.com/aws/aws-cdk/compare/v2.116.1...v2.117.0) (2023-12-26) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f21910914c5f3..07573efb33edf 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -4,16 +4,16 @@ Shout out to our top contributors! - [rix0rrr](https://github.com/rix0rrr) - [skinny85](https://github.com/skinny85) - [RomainMuller](https://github.com/RomainMuller) -- [njlynch](https://github.com/njlynch) - [kaizencc](https://github.com/kaizencc) +- [njlynch](https://github.com/njlynch) - [jogold](https://github.com/jogold) - [iliapolo](https://github.com/iliapolo) - [corymhall](https://github.com/corymhall) - [shivlaks](https://github.com/shivlaks) - [otaviomacedo](https://github.com/otaviomacedo) - [madeline-k](https://github.com/madeline-k) -- [NetaNir](https://github.com/NetaNir) - [mrgrain](https://github.com/mrgrain) +- [NetaNir](https://github.com/NetaNir) - [comcalvi](https://github.com/comcalvi) - [robertd](https://github.com/robertd) - [pahud](https://github.com/pahud) @@ -22,11 +22,11 @@ Shout out to our top contributors! - [TheRealAmazonKendra](https://github.com/TheRealAmazonKendra) - [lpizzinidev](https://github.com/lpizzinidev) - [colifran](https://github.com/colifran) +- [go-to-k](https://github.com/go-to-k) - [nija-at](https://github.com/nija-at) - [hoegertn](https://github.com/hoegertn) - [watany-dev](https://github.com/watany-dev) - [jumic](https://github.com/jumic) -- [SoManyHs](https://github.com/SoManyHs) -_Last updated: Fri, 01 Dec 23 00:09:47 +0000_ \ No newline at end of file +_Last updated: Mon, 01 Jan 24 00:09:50 +0000_ \ No newline at end of file diff --git a/LICENSE b/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk-testing/cli-integ/LICENSE b/packages/@aws-cdk-testing/cli-integ/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk-testing/cli-integ/LICENSE +++ b/packages/@aws-cdk-testing/cli-integ/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk-testing/cli-integ/NOTICE b/packages/@aws-cdk-testing/cli-integ/NOTICE index 0dd703eaedb4a..9d28b2500bc86 100644 --- a/packages/@aws-cdk-testing/cli-integ/NOTICE +++ b/packages/@aws-cdk-testing/cli-integ/NOTICE @@ -1,5 +1,5 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk-testing/framework-integ/LICENSE b/packages/@aws-cdk-testing/framework-integ/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk-testing/framework-integ/LICENSE +++ b/packages/@aws-cdk-testing/framework-integ/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk-testing/framework-integ/NOTICE b/packages/@aws-cdk-testing/framework-integ/NOTICE index 0dd703eaedb4a..9d28b2500bc86 100644 --- a/packages/@aws-cdk-testing/framework-integ/NOTICE +++ b/packages/@aws-cdk-testing/framework-integ/NOTICE @@ -1,5 +1,5 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json new file mode 100644 index 0000000000000..8202fda5ae125 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "apiDefaultTestDeployAssert018781F2.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/apiDefaultTestDeployAssert018781F2.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/apiDefaultTestDeployAssert018781F2.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/apiDefaultTestDeployAssert018781F2.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/integ.json new file mode 100644 index 0000000000000..1c3707aa5a091 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "api/DefaultTest": { + "stacks": [ + "stack" + ], + "assertionStack": "api/DefaultTest/DeployAssert", + "assertionStackName": "apiDefaultTestDeployAssert018781F2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/manifest.json new file mode 100644 index 0000000000000..f7fde33b88af8 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/manifest.json @@ -0,0 +1,131 @@ +{ + "version": "36.0.0", + "artifacts": { + "stack.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "stack.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "stack": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "stack.template.json", + "terminationProtection": false, + "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}/c783621de23dcf9145b9d414759736b56d3e809931d51ce33a8a18a08e611534.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "stack.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": [ + "stack.assets" + ], + "metadata": { + "/stack/DisableIntrospection/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DisableIntrospectionE1701CE9" + } + ], + "/stack/DisableIntrospection/Schema": [ + { + "type": "aws:cdk:logicalId", + "data": "DisableIntrospectionSchema09592192" + } + ], + "/stack/DisableIntrospection/DefaultApiKey": [ + { + "type": "aws:cdk:logicalId", + "data": "DisableIntrospectionDefaultApiKeyD4180023" + } + ], + "/stack/DisableIntrospection/NoneDS/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DisableIntrospectionNoneDSC312E52A" + } + ], + "/stack/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/stack/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "stack" + }, + "apiDefaultTestDeployAssert018781F2.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "apiDefaultTestDeployAssert018781F2.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "apiDefaultTestDeployAssert018781F2": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "apiDefaultTestDeployAssert018781F2.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "apiDefaultTestDeployAssert018781F2.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": [ + "apiDefaultTestDeployAssert018781F2.assets" + ], + "metadata": { + "/api/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/api/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "api/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/stack.assets.json new file mode 100644 index 0000000000000..144212d255b91 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/stack.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "c783621de23dcf9145b9d414759736b56d3e809931d51ce33a8a18a08e611534": { + "source": { + "path": "stack.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "c783621de23dcf9145b9d414759736b56d3e809931d51ce33a8a18a08e611534.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/stack.template.json new file mode 100644 index 0000000000000..96582669e1e9b --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/stack.template.json @@ -0,0 +1,85 @@ +{ + "Resources": { + "DisableIntrospectionE1701CE9": { + "Type": "AWS::AppSync::GraphQLApi", + "Properties": { + "AuthenticationType": "API_KEY", + "IntrospectionConfig": "DISABLED", + "Name": "DisableIntrospection" + } + }, + "DisableIntrospectionSchema09592192": { + "Type": "AWS::AppSync::GraphQLSchema", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "DisableIntrospectionE1701CE9", + "ApiId" + ] + }, + "Definition": "type test {\n version: String!\n}\ntype Query {\n getTests: [test]!\n}\ntype Mutation {\n addTest(version: String!): test\n}\n" + } + }, + "DisableIntrospectionDefaultApiKeyD4180023": { + "Type": "AWS::AppSync::ApiKey", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "DisableIntrospectionE1701CE9", + "ApiId" + ] + } + }, + "DependsOn": [ + "DisableIntrospectionSchema09592192" + ] + }, + "DisableIntrospectionNoneDSC312E52A": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "DisableIntrospectionE1701CE9", + "ApiId" + ] + }, + "Name": "NoneDS", + "Type": "NONE" + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/tree.json new file mode 100644 index 0000000000000..5fb8caf88b4f7 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.js.snapshot/tree.json @@ -0,0 +1,205 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "stack": { + "id": "stack", + "path": "stack", + "children": { + "DisableIntrospection": { + "id": "DisableIntrospection", + "path": "stack/DisableIntrospection", + "children": { + "Resource": { + "id": "Resource", + "path": "stack/DisableIntrospection/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::GraphQLApi", + "aws:cdk:cloudformation:props": { + "authenticationType": "API_KEY", + "introspectionConfig": "DISABLED", + "name": "DisableIntrospection" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLApi", + "version": "0.0.0" + } + }, + "Schema": { + "id": "Schema", + "path": "stack/DisableIntrospection/Schema", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::GraphQLSchema", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "DisableIntrospectionE1701CE9", + "ApiId" + ] + }, + "definition": "type test {\n version: String!\n}\ntype Query {\n getTests: [test]!\n}\ntype Mutation {\n addTest(version: String!): test\n}\n" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.CfnGraphQLSchema", + "version": "0.0.0" + } + }, + "DefaultApiKey": { + "id": "DefaultApiKey", + "path": "stack/DisableIntrospection/DefaultApiKey", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::ApiKey", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "DisableIntrospectionE1701CE9", + "ApiId" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.CfnApiKey", + "version": "0.0.0" + } + }, + "LogGroup": { + "id": "LogGroup", + "path": "stack/DisableIntrospection/LogGroup", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "NoneDS": { + "id": "NoneDS", + "path": "stack/DisableIntrospection/NoneDS", + "children": { + "Resource": { + "id": "Resource", + "path": "stack/DisableIntrospection/NoneDS/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::DataSource", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "DisableIntrospectionE1701CE9", + "ApiId" + ] + }, + "name": "NoneDS", + "type": "NONE" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.CfnDataSource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.NoneDataSource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_appsync.GraphqlApi", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "stack/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "stack/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "api": { + "id": "api", + "path": "api", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "api/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "api/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "api/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "api/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "api/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.ts new file mode 100644 index 0000000000000..553907361080e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-disable-introspection.ts @@ -0,0 +1,23 @@ +import * as path from 'path'; +import * as cdk from 'aws-cdk-lib'; +import * as appsync from 'aws-cdk-lib/aws-appsync'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'stack'); + +const api = new appsync.GraphqlApi(stack, 'DisableIntrospection', { + name: 'DisableIntrospection', + schema: appsync.SchemaFile.fromAsset(path.join(__dirname, 'appsync.test.graphql')), + introspectionConfig: appsync.IntrospectionConfig.DISABLED, +}); + +api.addNoneDataSource('NoneDS', { + name: cdk.Lazy.string({ produce(): string { return 'NoneDS'; } }), +}); + +new IntegTest(app, 'api', { + testCases: [stack], +}); + +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/aws-cdk-asg-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/aws-cdk-asg-integ.assets.json index 75b327e1f1d67..ac046e7bb6776 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/aws-cdk-asg-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/aws-cdk-asg-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "34.0.0", + "version": "35.0.0", "files": { - "7a8efad29e5cb8979aac968ca3709d9f3c874be848a2097779d79b8be52e4fd9": { + "cc56cf10db6f9a8d08a1dd3ac11545a658835fe20afe0105866946e153d2d173": { "source": { "path": "aws-cdk-asg-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7a8efad29e5cb8979aac968ca3709d9f3c874be848a2097779d79b8be52e4fd9.json", + "objectKey": "cc56cf10db6f9a8d08a1dd3ac11545a658835fe20afe0105866946e153d2d173.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-autoscaling/test/integ.asg-lt.js.snapshot/aws-cdk-asg-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/aws-cdk-asg-integ.template.json index c717d216f0346..03aa1485838e2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/aws-cdk-asg-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/aws-cdk-asg-integ.template.json @@ -716,6 +716,58 @@ } } }, + "AsgFromMipWithInstanceRequirementsASG8BFE597D": { + "Type": "AWS::AutoScaling::AutoScalingGroup", + "Properties": { + "DesiredCapacity": "5", + "MaxSize": "10", + "MinSize": "0", + "MixedInstancesPolicy": { + "LaunchTemplate": { + "LaunchTemplateSpecification": { + "LaunchTemplateId": { + "Ref": "MainLT4FC09097" + }, + "Version": { + "Fn::GetAtt": [ + "MainLT4FC09097", + "LatestVersionNumber" + ] + } + }, + "Overrides": [ + { + "InstanceRequirements": { + "CpuManufacturers": [ + "intel" + ], + "MemoryMiB": { + "Min": 16384 + }, + "VCpuCount": { + "Max": 8, + "Min": 4 + } + } + } + ] + } + }, + "VPCZoneIdentifier": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ] + }, + "UpdatePolicy": { + "AutoScalingScheduledAction": { + "IgnoreUnmodifiedGroupSizeProperties": true + } + } + }, "AsgWithGp3BlockdeviceInstanceSecurityGroup54D76206": { "Type": "AWS::EC2::SecurityGroup", "Properties": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/cdk.out index 2313ab5436501..c5cb2e5de6344 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"34.0.0"} \ No newline at end of file +{"version":"35.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/integ.json index c14907a26af33..00d876c307c28 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "35.0.0", "testCases": { "integ.asg-lt": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/manifest.json index 64d7772a46cc1..61de7b207eb34 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "35.0.0", "artifacts": { "aws-cdk-asg-integ.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,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}/7a8efad29e5cb8979aac968ca3709d9f3c874be848a2097779d79b8be52e4fd9.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc56cf10db6f9a8d08a1dd3ac11545a658835fe20afe0105866946e153d2d173.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -250,6 +250,18 @@ "data": "AsgFromMipWithoutDistributionASG4BF292F9" } ], + "/aws-cdk-asg-integ/AsgFromMipWithInstanceRequirements": [ + { + "type": "aws:cdk:warning", + "data": "desiredCapacity has been configured. Be aware this will reset the size of your AutoScalingGroup on every deployment. See https://github.com/aws/aws-cdk/issues/5215 [ack: @aws-cdk/aws-autoscaling:desiredCapacitySet]" + } + ], + "/aws-cdk-asg-integ/AsgFromMipWithInstanceRequirements/ASG": [ + { + "type": "aws:cdk:logicalId", + "data": "AsgFromMipWithInstanceRequirementsASG8BFE597D" + } + ], "/aws-cdk-asg-integ/AsgWithGp3Blockdevice": [ { "type": "aws:cdk:warning", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/tree.json index 3c4a2f70265cc..2e7c5f9aecfb6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.js.snapshot/tree.json @@ -16,8 +16,8 @@ "id": "Importrole", "path": "aws-cdk-asg-integ/role/Importrole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -55,14 +55,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "MainLT": { @@ -83,8 +83,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "Resource": { @@ -144,30 +144,30 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-cdk-asg-integ/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-cdk-asg-integ/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "T4gLT": { @@ -223,30 +223,30 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-arm64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-arm64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-cdk-asg-integ/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-arm64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-arm64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-arm64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-cdk-asg-integ/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-arm64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "VPC": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -316,16 +316,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-asg-integ/VPC/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -346,8 +346,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -365,8 +365,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -385,8 +385,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -405,8 +405,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -433,14 +433,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -483,16 +483,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-asg-integ/VPC/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -513,8 +513,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -532,8 +532,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -552,8 +552,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -572,8 +572,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -600,14 +600,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -650,16 +650,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-asg-integ/VPC/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -680,8 +680,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -699,8 +699,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -719,14 +719,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -769,16 +769,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-asg-integ/VPC/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -799,8 +799,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -818,8 +818,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -838,14 +838,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -863,8 +863,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -882,14 +882,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "AsgFromLT": { @@ -927,14 +927,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "AsgWithDefaultInstanceWarmup": { @@ -972,14 +972,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "AsgFromMip": { @@ -1046,14 +1046,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "AsgFromMipWithoutDistribution": { @@ -1117,14 +1117,79 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" + } + }, + "AsgFromMipWithInstanceRequirements": { + "id": "AsgFromMipWithInstanceRequirements", + "path": "aws-cdk-asg-integ/AsgFromMipWithInstanceRequirements", + "children": { + "ASG": { + "id": "ASG", + "path": "aws-cdk-asg-integ/AsgFromMipWithInstanceRequirements/ASG", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AutoScaling::AutoScalingGroup", + "aws:cdk:cloudformation:props": { + "desiredCapacity": "5", + "maxSize": "10", + "minSize": "0", + "mixedInstancesPolicy": { + "launchTemplate": { + "launchTemplateSpecification": { + "launchTemplateId": { + "Ref": "MainLT4FC09097" + }, + "version": { + "Fn::GetAtt": [ + "MainLT4FC09097", + "LatestVersionNumber" + ] + } + }, + "overrides": [ + { + "instanceRequirements": { + "vCpuCount": { + "min": 4, + "max": 8 + }, + "memoryMiB": { + "min": 16384 + }, + "cpuManufacturers": [ + "intel" + ] + } + } + ] + } + }, + "vpcZoneIdentifier": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "AsgWithGp3Blockdevice": { @@ -1161,14 +1226,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -1179,8 +1244,8 @@ "id": "ImportInstanceRole", "path": "aws-cdk-asg-integ/AsgWithGp3Blockdevice/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1210,14 +1275,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -1234,16 +1299,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-cdk-asg-integ/AsgWithGp3Blockdevice/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -1330,14 +1395,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -1378,30 +1443,30 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-cdk-asg-integ/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-cdk-asg-integ/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "AsgWithIMDSv2": { @@ -1438,14 +1503,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -1456,8 +1521,8 @@ "id": "ImportInstanceRole", "path": "aws-cdk-asg-integ/AsgWithIMDSv2/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1487,14 +1552,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -1511,16 +1576,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-cdk-asg-integ/AsgWithIMDSv2/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -1598,14 +1663,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -1645,52 +1710,52 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-kernel-5.10-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-kernel-5.10-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-cdk-asg-integ/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-kernel-5.10-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-kernel-5.10-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-kernel-5.10-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-cdk-asg-integ/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-kernel-5.10-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-cdk-asg-integ/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-cdk-asg-integ/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1698,13 +1763,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.70" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.ts index 6582f6c2b5b71..86130397b2dd3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-lt.ts @@ -84,6 +84,25 @@ new autoscaling.AutoScalingGroup(stack, 'AsgFromMipWithoutDistribution', { desiredCapacity: 5, }); +new autoscaling.AutoScalingGroup(stack, 'AsgFromMipWithInstanceRequirements', { + vpc, + mixedInstancesPolicy: { + launchTemplate: lt, + launchTemplateOverrides: [ + { + instanceRequirements: { + vCpuCount: { min: 4, max: 8 }, + memoryMiB: { min: 16384 }, + cpuManufacturers: ['intel'], + }, + }, + ], + }, + minCapacity: 0, + maxCapacity: 10, + desiredCapacity: 5, +}); + new autoscaling.AutoScalingGroup(stack, 'AsgWithGp3Blockdevice', { minCapacity: 0, maxCapacity: 10, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.assets.json new file mode 100644 index 0000000000000..7b81b6fbbc089 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.assets.json @@ -0,0 +1,19 @@ +{ + "version": "35.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "CF2RuntimeDefaultTestDeployAssertB25F4037.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/cdk.out new file mode 100644 index 0000000000000..c5cb2e5de6344 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"35.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/integ-distribution-function.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/integ-distribution-function.assets.json new file mode 100644 index 0000000000000..eaec73d98c45d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/integ-distribution-function.assets.json @@ -0,0 +1,20 @@ +{ + "version": "35.0.0", + "files": { + "5289568fbbfd952fddb41b828b4b0a8e4b54ec5892e158efd72cf494c0327e01": { + "source": { + "path": "integ-distribution-function.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-eu-west-1": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1", + "objectKey": "5289568fbbfd952fddb41b828b4b0a8e4b54ec5892e158efd72cf494c0327e01.json", + "region": "eu-west-1", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-eu-west-1" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/integ-distribution-function.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/integ-distribution-function.template.json new file mode 100644 index 0000000000000..1ea7e8f64f1fa --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/integ-distribution-function.template.json @@ -0,0 +1,141 @@ +{ + "Resources": { + "FunctionRequest95528B2F": { + "Type": "AWS::CloudFront::Function", + "Properties": { + "AutoPublish": true, + "FunctionCode": "function handler(event) { return event.request }", + "FunctionConfig": { + "Comment": "eu-west-1integdistributionfunctionFunctionRequest8E65DEEB", + "Runtime": "cloudfront-js-1.0" + }, + "Name": "eu-west-1integdistributionfunctionFunctionRequest8E65DEEB" + } + }, + "FunctionResponse4EF2D1D3": { + "Type": "AWS::CloudFront::Function", + "Properties": { + "AutoPublish": true, + "FunctionCode": "function handler(event) { return event.response }", + "FunctionConfig": { + "Comment": "eu-west-1integdistributionfunctionFunctionResponseDD4BADA1", + "Runtime": "cloudfront-js-2.0" + }, + "Name": "eu-west-1integdistributionfunctionFunctionResponseDD4BADA1" + } + }, + "DistB3B78991": { + "Type": "AWS::CloudFront::Distribution", + "Properties": { + "DistributionConfig": { + "DefaultCacheBehavior": { + "CachePolicyId": "4135ea2d-6df8-44a3-9df3-4b5a84be39ad", + "Compress": true, + "FunctionAssociations": [ + { + "EventType": "viewer-request", + "FunctionARN": { + "Fn::GetAtt": [ + "FunctionRequest95528B2F", + "FunctionARN" + ] + } + }, + { + "EventType": "viewer-response", + "FunctionARN": { + "Fn::GetAtt": [ + "FunctionResponse4EF2D1D3", + "FunctionARN" + ] + } + } + ], + "TargetOriginId": "integdistributionfunctionDistOrigin1D1E9DF17", + "ViewerProtocolPolicy": "allow-all" + }, + "Enabled": true, + "HttpVersion": "http2", + "IPV6Enabled": true, + "Origins": [ + { + "CustomOriginConfig": { + "OriginProtocolPolicy": "https-only" + }, + "DomainName": "www.example.com", + "Id": "integdistributionfunctionDistOrigin1D1E9DF17" + } + ] + } + } + } + }, + "Outputs": { + "RequestFunctionArn": { + "Value": { + "Fn::GetAtt": [ + "FunctionRequest95528B2F", + "FunctionARN" + ] + } + }, + "RequestFunctionStage": { + "Value": { + "Fn::GetAtt": [ + "FunctionRequest95528B2F", + "Stage" + ] + } + }, + "ResponseFunctionArn": { + "Value": { + "Fn::GetAtt": [ + "FunctionResponse4EF2D1D3", + "FunctionARN" + ] + } + }, + "ResponseFunctionStage": { + "Value": { + "Fn::GetAtt": [ + "FunctionResponse4EF2D1D3", + "Stage" + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/integ.json new file mode 100644 index 0000000000000..3f83a1ff45115 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "35.0.0", + "testCases": { + "CF2Runtime/DefaultTest": { + "stacks": [ + "integ-distribution-function" + ], + "assertionStack": "CF2Runtime/DefaultTest/DeployAssert", + "assertionStackName": "CF2RuntimeDefaultTestDeployAssertB25F4037" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/manifest.json new file mode 100644 index 0000000000000..a71b2eef33f91 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/manifest.json @@ -0,0 +1,149 @@ +{ + "version": "35.0.0", + "artifacts": { + "integ-distribution-function.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integ-distribution-function.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integ-distribution-function": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/eu-west-1", + "properties": { + "templateFile": "integ-distribution-function.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-eu-west-1", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-eu-west-1", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1/5289568fbbfd952fddb41b828b4b0a8e4b54ec5892e158efd72cf494c0327e01.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "integ-distribution-function.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-eu-west-1", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "integ-distribution-function.assets" + ], + "metadata": { + "/integ-distribution-function/FunctionRequest/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FunctionRequest95528B2F" + } + ], + "/integ-distribution-function/FunctionResponse/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FunctionResponse4EF2D1D3" + } + ], + "/integ-distribution-function/Dist/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DistB3B78991" + } + ], + "/integ-distribution-function/RequestFunctionArn": [ + { + "type": "aws:cdk:logicalId", + "data": "RequestFunctionArn" + } + ], + "/integ-distribution-function/RequestFunctionStage": [ + { + "type": "aws:cdk:logicalId", + "data": "RequestFunctionStage" + } + ], + "/integ-distribution-function/ResponseFunctionArn": [ + { + "type": "aws:cdk:logicalId", + "data": "ResponseFunctionArn" + } + ], + "/integ-distribution-function/ResponseFunctionStage": [ + { + "type": "aws:cdk:logicalId", + "data": "ResponseFunctionStage" + } + ], + "/integ-distribution-function/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-distribution-function/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "integ-distribution-function" + }, + "CF2RuntimeDefaultTestDeployAssertB25F4037.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "CF2RuntimeDefaultTestDeployAssertB25F4037.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "CF2RuntimeDefaultTestDeployAssertB25F4037": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "CF2RuntimeDefaultTestDeployAssertB25F4037.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "CF2RuntimeDefaultTestDeployAssertB25F4037.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": [ + "CF2RuntimeDefaultTestDeployAssertB25F4037.assets" + ], + "metadata": { + "/CF2Runtime/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/CF2Runtime/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "CF2Runtime/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/tree.json new file mode 100644 index 0000000000000..47bb430289c3b --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.js.snapshot/tree.json @@ -0,0 +1,265 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "integ-distribution-function": { + "id": "integ-distribution-function", + "path": "integ-distribution-function", + "children": { + "FunctionRequest": { + "id": "FunctionRequest", + "path": "integ-distribution-function/FunctionRequest", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-distribution-function/FunctionRequest/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudFront::Function", + "aws:cdk:cloudformation:props": { + "autoPublish": true, + "functionCode": "function handler(event) { return event.request }", + "functionConfig": { + "comment": "eu-west-1integdistributionfunctionFunctionRequest8E65DEEB", + "runtime": "cloudfront-js-1.0" + }, + "name": "eu-west-1integdistributionfunctionFunctionRequest8E65DEEB" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.Function", + "version": "0.0.0" + } + }, + "FunctionResponse": { + "id": "FunctionResponse", + "path": "integ-distribution-function/FunctionResponse", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-distribution-function/FunctionResponse/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudFront::Function", + "aws:cdk:cloudformation:props": { + "autoPublish": true, + "functionCode": "function handler(event) { return event.response }", + "functionConfig": { + "comment": "eu-west-1integdistributionfunctionFunctionResponseDD4BADA1", + "runtime": "cloudfront-js-2.0" + }, + "name": "eu-west-1integdistributionfunctionFunctionResponseDD4BADA1" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.Function", + "version": "0.0.0" + } + }, + "Dist": { + "id": "Dist", + "path": "integ-distribution-function/Dist", + "children": { + "Origin1": { + "id": "Origin1", + "path": "integ-distribution-function/Dist/Origin1", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-distribution-function/Dist/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudFront::Distribution", + "aws:cdk:cloudformation:props": { + "distributionConfig": { + "enabled": true, + "origins": [ + { + "domainName": "www.example.com", + "id": "integdistributionfunctionDistOrigin1D1E9DF17", + "customOriginConfig": { + "originProtocolPolicy": "https-only" + } + } + ], + "defaultCacheBehavior": { + "pathPattern": "*", + "targetOriginId": "integdistributionfunctionDistOrigin1D1E9DF17", + "cachePolicyId": "4135ea2d-6df8-44a3-9df3-4b5a84be39ad", + "compress": true, + "viewerProtocolPolicy": "allow-all", + "functionAssociations": [ + { + "functionArn": { + "Fn::GetAtt": [ + "FunctionRequest95528B2F", + "FunctionARN" + ] + }, + "eventType": "viewer-request" + }, + { + "functionArn": { + "Fn::GetAtt": [ + "FunctionResponse4EF2D1D3", + "FunctionARN" + ] + }, + "eventType": "viewer-response" + } + ] + }, + "httpVersion": "http2", + "ipv6Enabled": true + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", + "version": "0.0.0" + } + }, + "RequestFunctionArn": { + "id": "RequestFunctionArn", + "path": "integ-distribution-function/RequestFunctionArn", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "RequestFunctionStage": { + "id": "RequestFunctionStage", + "path": "integ-distribution-function/RequestFunctionStage", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "ResponseFunctionArn": { + "id": "ResponseFunctionArn", + "path": "integ-distribution-function/ResponseFunctionArn", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "ResponseFunctionStage": { + "id": "ResponseFunctionStage", + "path": "integ-distribution-function/ResponseFunctionStage", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-distribution-function/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-distribution-function/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "CF2Runtime": { + "id": "CF2Runtime", + "path": "CF2Runtime", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "CF2Runtime/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "CF2Runtime/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "CF2Runtime/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "CF2Runtime/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "CF2Runtime/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts new file mode 100644 index 0000000000000..9ac8bcfe9e768 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts @@ -0,0 +1,43 @@ +import * as cdk from 'aws-cdk-lib'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import { TestOrigin } from './test-origin'; +import * as cloudfront from 'aws-cdk-lib/aws-cloudfront'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'integ-distribution-function', { env: { region: 'eu-west-1' } }); + +const cfFunctionRequest = new cloudfront.Function(stack, 'FunctionRequest', { + code: cloudfront.FunctionCode.fromInline('function handler(event) { return event.request }'), + runtime: cloudfront.FunctionRuntime.JS_1_0, +}); + +const cfFunctionResponse = new cloudfront.Function(stack, 'FunctionResponse', { + code: cloudfront.FunctionCode.fromInline('function handler(event) { return event.response }'), + runtime: cloudfront.FunctionRuntime.JS_2_0, +}); + +new cloudfront.Distribution(stack, 'Dist', { + defaultBehavior: { + origin: new TestOrigin('www.example.com'), + cachePolicy: cloudfront.CachePolicy.CACHING_DISABLED, + functionAssociations: [{ + function: cfFunctionRequest, + eventType: cloudfront.FunctionEventType.VIEWER_REQUEST, + }, { + function: cfFunctionResponse, + eventType: cloudfront.FunctionEventType.VIEWER_RESPONSE, + }], + }, +}); + +new cdk.CfnOutput(stack, 'RequestFunctionArn', { value: cfFunctionRequest.functionArn }); +new cdk.CfnOutput(stack, 'RequestFunctionStage', { value: cfFunctionRequest.functionStage }); + +new cdk.CfnOutput(stack, 'ResponseFunctionArn', { value: cfFunctionResponse.functionArn }); +new cdk.CfnOutput(stack, 'ResponseFunctionStage', { value: cfFunctionResponse.functionStage }); + +new IntegTest(app, 'CF2Runtime', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/KeyValueStoreDefaultTestDeployAssert87336A31.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/KeyValueStoreDefaultTestDeployAssert87336A31.assets.json new file mode 100644 index 0000000000000..9d8e7b1e39bb7 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/KeyValueStoreDefaultTestDeployAssert87336A31.assets.json @@ -0,0 +1,19 @@ +{ + "version": "35.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "KeyValueStoreDefaultTestDeployAssert87336A31.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/KeyValueStoreDefaultTestDeployAssert87336A31.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/KeyValueStoreDefaultTestDeployAssert87336A31.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/KeyValueStoreDefaultTestDeployAssert87336A31.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/asset.9c0f502203ec9d802046021b8a20affe8fd26234f67dcf2e93db5142bc2991a1.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/asset.9c0f502203ec9d802046021b8a20affe8fd26234f67dcf2e93db5142bc2991a1.json new file mode 100644 index 0000000000000..c5999fd9d8723 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/asset.9c0f502203ec9d802046021b8a20affe8fd26234f67dcf2e93db5142bc2991a1.json @@ -0,0 +1,12 @@ +{ + "data":[ + { + "key":"key1", + "value":"value" + }, + { + "key":"key2", + "value":"value" + } + ] +} diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/cdk.out new file mode 100644 index 0000000000000..c5cb2e5de6344 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"35.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/integ-key-value-store.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/integ-key-value-store.assets.json new file mode 100644 index 0000000000000..b0da7a914d7ee --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/integ-key-value-store.assets.json @@ -0,0 +1,32 @@ +{ + "version": "35.0.0", + "files": { + "9c0f502203ec9d802046021b8a20affe8fd26234f67dcf2e93db5142bc2991a1": { + "source": { + "path": "asset.9c0f502203ec9d802046021b8a20affe8fd26234f67dcf2e93db5142bc2991a1.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "9c0f502203ec9d802046021b8a20affe8fd26234f67dcf2e93db5142bc2991a1.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "67b48bddcb70e3ca5fc03cf0a123eeb6b3616c2e388fb855ab860bd8f3a6c86c": { + "source": { + "path": "integ-key-value-store.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "67b48bddcb70e3ca5fc03cf0a123eeb6b3616c2e388fb855ab860bd8f3a6c86c.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/integ-key-value-store.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/integ-key-value-store.template.json new file mode 100644 index 0000000000000..05bf7e195dd9c --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/integ-key-value-store.template.json @@ -0,0 +1,64 @@ +{ + "Resources": { + "TestKeyValueStore8D0C09A2": { + "Type": "AWS::CloudFront::KeyValueStore", + "Properties": { + "Comment": "A test Key Value Store for CloudFront", + "ImportSource": { + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/9c0f502203ec9d802046021b8a20affe8fd26234f67dcf2e93db5142bc2991a1.json" + ] + ] + }, + "SourceType": "S3" + }, + "Name": "integkeyvaluestoreTestKeyValueStore737B4C4B" + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/integ.json new file mode 100644 index 0000000000000..c083e81baebff --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "35.0.0", + "testCases": { + "KeyValueStore/DefaultTest": { + "stacks": [ + "integ-key-value-store" + ], + "assertionStack": "KeyValueStore/DefaultTest/DeployAssert", + "assertionStackName": "KeyValueStoreDefaultTestDeployAssert87336A31" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/manifest.json new file mode 100644 index 0000000000000..0f9b9ba23adf1 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/manifest.json @@ -0,0 +1,113 @@ +{ + "version": "35.0.0", + "artifacts": { + "integ-key-value-store.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integ-key-value-store.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integ-key-value-store": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integ-key-value-store.template.json", + "terminationProtection": false, + "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}/67b48bddcb70e3ca5fc03cf0a123eeb6b3616c2e388fb855ab860bd8f3a6c86c.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "integ-key-value-store.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": [ + "integ-key-value-store.assets" + ], + "metadata": { + "/integ-key-value-store/TestKeyValueStore/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TestKeyValueStore8D0C09A2" + } + ], + "/integ-key-value-store/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-key-value-store/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "integ-key-value-store" + }, + "KeyValueStoreDefaultTestDeployAssert87336A31.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "KeyValueStoreDefaultTestDeployAssert87336A31.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "KeyValueStoreDefaultTestDeployAssert87336A31": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "KeyValueStoreDefaultTestDeployAssert87336A31.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "KeyValueStoreDefaultTestDeployAssert87336A31.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": [ + "KeyValueStoreDefaultTestDeployAssert87336A31.assets" + ], + "metadata": { + "/KeyValueStore/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/KeyValueStore/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "KeyValueStore/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/tree.json new file mode 100644 index 0000000000000..06061cbdb9222 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.js.snapshot/tree.json @@ -0,0 +1,171 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "integ-key-value-store": { + "id": "integ-key-value-store", + "path": "integ-key-value-store", + "children": { + "TestKeyValueStore": { + "id": "TestKeyValueStore", + "path": "integ-key-value-store/TestKeyValueStore", + "children": { + "ImportSource": { + "id": "ImportSource", + "path": "integ-key-value-store/TestKeyValueStore/ImportSource", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-key-value-store/TestKeyValueStore/ImportSource/Stage", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-key-value-store/TestKeyValueStore/ImportSource/AssetBucket", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3_assets.Asset", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-key-value-store/TestKeyValueStore/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudFront::KeyValueStore", + "aws:cdk:cloudformation:props": { + "comment": "A test Key Value Store for CloudFront", + "importSource": { + "sourceType": "S3", + "sourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/9c0f502203ec9d802046021b8a20affe8fd26234f67dcf2e93db5142bc2991a1.json" + ] + ] + } + }, + "name": "integkeyvaluestoreTestKeyValueStore737B4C4B" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.CfnKeyValueStore", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.KeyValueStore", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-key-value-store/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-key-value-store/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "KeyValueStore": { + "id": "KeyValueStore", + "path": "KeyValueStore", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "KeyValueStore/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "KeyValueStore/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "KeyValueStore/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "KeyValueStore/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "KeyValueStore/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.ts new file mode 100644 index 0000000000000..be6c2f8da3155 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.key-value-store.ts @@ -0,0 +1,18 @@ +import * as path from 'node:path'; +import * as cdk from 'aws-cdk-lib'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as cloudfront from 'aws-cdk-lib/aws-cloudfront'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'integ-key-value-store'); + +new cloudfront.KeyValueStore(stack, 'TestKeyValueStore', { + comment: 'A test Key Value Store for CloudFront', + source: cloudfront.ImportSource.fromAsset(path.join(__dirname, 'test-import-source.json')), +}); + +new IntegTest(app, 'KeyValueStore', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/test-import-source.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/test-import-source.json new file mode 100644 index 0000000000000..c5999fd9d8723 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/test-import-source.json @@ -0,0 +1,12 @@ +{ + "data":[ + { + "key":"key1", + "value":"value" + }, + { + "key":"key2", + "value":"value" + } + ] +} diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/aws-ecs-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/aws-ecs-integ.assets.json new file mode 100644 index 0000000000000..682cc29bb2614 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/aws-ecs-integ.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "3ec26ce81958ec34f75b10a9cf74a9b069629a04fbb143ee6fee92eba0fa2458": { + "source": { + "path": "aws-ecs-integ.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "3ec26ce81958ec34f75b10a9cf74a9b069629a04fbb143ee6fee92eba0fa2458.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/aws-ecs-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/aws-ecs-integ.template.json new file mode 100644 index 0000000000000..5754189392d4b --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/aws-ecs-integ.template.json @@ -0,0 +1,81 @@ +{ + "Resources": { + "TaskDefinitionTaskRoleFD40A61D": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "TaskDefinitionB36D86D9": { + "Type": "AWS::ECS::TaskDefinition", + "Properties": { + "ContainerDefinitions": [ + { + "Essential": true, + "Image": "amazon/amazon-ecs-sample", + "Interactive": true, + "Name": "Container" + } + ], + "Cpu": "256", + "Family": "awsecsintegTaskDefinition11DF163D", + "Memory": "512", + "NetworkMode": "awsvpc", + "RequiresCompatibilities": [ + "FARGATE" + ], + "TaskRoleArn": { + "Fn::GetAtt": [ + "TaskDefinitionTaskRoleFD40A61D", + "Arn" + ] + } + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.assets.json new file mode 100644 index 0000000000000..7ecc620071e9d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/integ.json new file mode 100644 index 0000000000000..90b4d741db54c --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "aws-ecs-container-definition-interactive/DefaultTest": { + "stacks": [ + "aws-ecs-integ" + ], + "assertionStack": "aws-ecs-container-definition-interactive/DefaultTest/DeployAssert", + "assertionStackName": "awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/manifest.json new file mode 100644 index 0000000000000..5b73d89d7ed59 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/manifest.json @@ -0,0 +1,119 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-ecs-integ.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-ecs-integ.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-ecs-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-ecs-integ.template.json", + "terminationProtection": false, + "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}/3ec26ce81958ec34f75b10a9cf74a9b069629a04fbb143ee6fee92eba0fa2458.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-ecs-integ.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-ecs-integ.assets" + ], + "metadata": { + "/aws-ecs-integ/TaskDefinition/TaskRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TaskDefinitionTaskRoleFD40A61D" + } + ], + "/aws-ecs-integ/TaskDefinition/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TaskDefinitionB36D86D9" + } + ], + "/aws-ecs-integ/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-ecs-integ/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-ecs-integ" + }, + "awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.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": [ + "awsecscontainerdefinitioninteractiveDefaultTestDeployAssert6E49E825.assets" + ], + "metadata": { + "/aws-ecs-container-definition-interactive/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-ecs-container-definition-interactive/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-ecs-container-definition-interactive/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/tree.json new file mode 100644 index 0000000000000..f63fa10eb0620 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.js.snapshot/tree.json @@ -0,0 +1,196 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-ecs-integ": { + "id": "aws-ecs-integ", + "path": "aws-ecs-integ", + "children": { + "TaskDefinition": { + "id": "TaskDefinition", + "path": "aws-ecs-integ/TaskDefinition", + "children": { + "TaskRole": { + "id": "TaskRole", + "path": "aws-ecs-integ/TaskDefinition/TaskRole", + "children": { + "ImportTaskRole": { + "id": "ImportTaskRole", + "path": "aws-ecs-integ/TaskDefinition/TaskRole/ImportTaskRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/TaskDefinition/TaskRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/TaskDefinition/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::TaskDefinition", + "aws:cdk:cloudformation:props": { + "containerDefinitions": [ + { + "essential": true, + "image": "amazon/amazon-ecs-sample", + "interactive": true, + "name": "Container" + } + ], + "cpu": "256", + "family": "awsecsintegTaskDefinition11DF163D", + "memory": "512", + "networkMode": "awsvpc", + "requiresCompatibilities": [ + "FARGATE" + ], + "taskRoleArn": { + "Fn::GetAtt": [ + "TaskDefinitionTaskRoleFD40A61D", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" + } + }, + "Container": { + "id": "Container", + "path": "aws-ecs-integ/TaskDefinition/Container", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-ecs-integ/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-ecs-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "aws-ecs-container-definition-interactive": { + "id": "aws-ecs-container-definition-interactive", + "path": "aws-ecs-container-definition-interactive", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "aws-ecs-container-definition-interactive/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "aws-ecs-container-definition-interactive/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "aws-ecs-container-definition-interactive/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-ecs-container-definition-interactive/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-ecs-container-definition-interactive/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.ts new file mode 100644 index 0000000000000..5372bc8ed7195 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/base/integ.task-definition-add-interactive-container.ts @@ -0,0 +1,22 @@ +import * as cdk from 'aws-cdk-lib'; +import * as ecs from 'aws-cdk-lib/aws-ecs'; +import * as integ from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-ecs-integ'); + +const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDefinition', { + memoryLimitMiB: 512, + cpu: 256, +}); + +taskDefinition.addContainer('Container', { + image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'), + interactive: true, +}); + +new integ.IntegTest(app, 'aws-ecs-container-definition-interactive', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.assets.json new file mode 100644 index 0000000000000..1ada4a62eae05 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "25ecc9ee1f79cd8a912202279ab524c1d49216ee0be93a5179ef19f50cd1b1ba": { + "source": { + "path": "aws-ecs-integ-bottlerocket-nvidia-ami.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "25ecc9ee1f79cd8a912202279ab524c1d49216ee0be93a5179ef19f50cd1b1ba.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.template.json new file mode 100644 index 0000000000000..b393e63b3fec4 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.template.json @@ -0,0 +1,965 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet1DefaultRoute3DA9E72A", + "VpcPublicSubnet1RouteTableAssociation97140677" + ] + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet2DefaultRoute97F91067", + "VpcPublicSubnet2RouteTableAssociationDD5762D8" + ] + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "ClusterEB0386A7": { + "Type": "AWS::ECS::Cluster" + }, + "ClusterbottlerocketasgInstanceSecurityGroupE1EAEF75": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceSecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "ClusterbottlerocketasgInstanceRoleD105ACA5": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ec2.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/AmazonSSMManagedInstanceCore" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role" + ] + ] + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ] + } + }, + "ClusterbottlerocketasgInstanceRoleDefaultPolicyBB6119DC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DeregisterContainerInstance", + "ecs:RegisterContainerInstance", + "ecs:Submit*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + }, + { + "Action": [ + "ecs:Poll", + "ecs:StartTelemetrySession" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "ecr:GetAuthorizationToken", + "ecs:DiscoverPollEndpoint", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterbottlerocketasgInstanceRoleDefaultPolicyBB6119DC", + "Roles": [ + { + "Ref": "ClusterbottlerocketasgInstanceRoleD105ACA5" + } + ] + } + }, + "ClusterbottlerocketasgInstanceProfile424C4AC3": { + "Type": "AWS::IAM::InstanceProfile", + "Properties": { + "Roles": [ + { + "Ref": "ClusterbottlerocketasgInstanceRoleD105ACA5" + } + ] + } + }, + "ClusterbottlerocketasgLaunchTemplate45A2FA5C": { + "Type": "AWS::EC2::LaunchTemplate", + "Properties": { + "LaunchTemplateData": { + "IamInstanceProfile": { + "Arn": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgInstanceProfile424C4AC3", + "Arn" + ] + } + }, + "ImageId": { + "Ref": "SsmParameterValueawsservicebottlerocketawsecs2nvidiax8664latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter" + }, + "InstanceType": "g3s.xlarge", + "Monitoring": { + "Enabled": false + }, + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterbottlerocketasgInstanceSecurityGroupE1EAEF75", + "GroupId" + ] + } + ], + "TagSpecifications": [ + { + "ResourceType": "instance", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LaunchTemplate" + } + ] + }, + { + "ResourceType": "volume", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LaunchTemplate" + } + ] + } + ], + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "", + [ + "\n[settings.ecs]\ncluster = \"", + { + "Ref": "ClusterEB0386A7" + }, + "\"" + ] + ] + } + } + }, + "TagSpecifications": [ + { + "ResourceType": "launch-template", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LaunchTemplate" + } + ] + } + ] + }, + "DependsOn": [ + "ClusterbottlerocketasgInstanceRoleDefaultPolicyBB6119DC", + "ClusterbottlerocketasgInstanceRoleD105ACA5" + ] + }, + "ClusterbottlerocketasgASG5424825A": { + "Type": "AWS::AutoScaling::AutoScalingGroup", + "Properties": { + "LaunchTemplate": { + "LaunchTemplateId": { + "Ref": "ClusterbottlerocketasgLaunchTemplate45A2FA5C" + }, + "Version": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgLaunchTemplate45A2FA5C", + "LatestVersionNumber" + ] + } + }, + "MaxSize": "1", + "MinSize": "0", + "Tags": [ + { + "Key": "Name", + "PropagateAtLaunch": true, + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ], + "VPCZoneIdentifier": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + }, + "UpdatePolicy": { + "AutoScalingReplacingUpdate": { + "WillReplace": true + }, + "AutoScalingScheduledAction": { + "IgnoreUnmodifiedGroupSizeProperties": true + } + } + }, + "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ] + } + }, + "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ClusterbottlerocketasgASG5424825A" + } + ] + ] + } + }, + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks", + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C", + "Roles": [ + { + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ] + } + }, + "ClusterbottlerocketasgDrainECSHookFunctionFEA27227": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "ClusterEB0386A7" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C", + "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + ] + }, + "ClusterbottlerocketasgDrainECSHookFunctionAllowInvokeawsecsintegbottlerocketnvidiaamiClusterbottlerocketasgLifecycleHookDrainHookTopic46897984C264A0A5": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgDrainECSHookFunctionFEA27227", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + } + } + }, + "ClusterbottlerocketasgDrainECSHookFunctionTopicC875173C": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgDrainECSHookFunctionFEA27227", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + } + } + }, + "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02": { + "Type": "AWS::SNS::Topic", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ] + } + }, + "ClusterbottlerocketasgLifecycleHookDrainHookRole9E2A1D11": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "autoscaling.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ] + } + }, + "ClusterbottlerocketasgLifecycleHookDrainHookRoleDefaultPolicy2C98DD9A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "sns:Publish", + "Effect": "Allow", + "Resource": { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterbottlerocketasgLifecycleHookDrainHookRoleDefaultPolicy2C98DD9A", + "Roles": [ + { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookRole9E2A1D11" + } + ] + } + }, + "ClusterbottlerocketasgLifecycleHookDrainHook00055B9D": { + "Type": "AWS::AutoScaling::LifecycleHook", + "Properties": { + "AutoScalingGroupName": { + "Ref": "ClusterbottlerocketasgASG5424825A" + }, + "DefaultResult": "CONTINUE", + "HeartbeatTimeout": 300, + "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", + "NotificationTargetARN": { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + }, + "RoleARN": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgLifecycleHookDrainHookRole9E2A1D11", + "Arn" + ] + } + }, + "DependsOn": [ + "ClusterbottlerocketasgLifecycleHookDrainHookRoleDefaultPolicy2C98DD9A", + "ClusterbottlerocketasgLifecycleHookDrainHookRole9E2A1D11" + ] + } + }, + "Parameters": { + "SsmParameterValueawsservicebottlerocketawsecs2nvidiax8664latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/aws/service/bottlerocket/aws-ecs-2-nvidia/x86_64/latest/image_id" + }, + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.assets.json new file mode 100644 index 0000000000000..6a67204f0bdff --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/integ.json new file mode 100644 index 0000000000000..a6bfe4d8bc3ff --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "aws-ecs-bottlerocket-nvidia-ami/DefaultTest": { + "stacks": [ + "aws-ecs-integ-bottlerocket-nvidia-ami" + ], + "assertionStack": "aws-ecs-bottlerocket-nvidia-ami/DefaultTest/DeployAssert", + "assertionStackName": "awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/manifest.json new file mode 100644 index 0000000000000..28658ca520aa3 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/manifest.json @@ -0,0 +1,347 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-ecs-integ-bottlerocket-nvidia-ami.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-ecs-integ-bottlerocket-nvidia-ami.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-ecs-integ-bottlerocket-nvidia-ami": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-ecs-integ-bottlerocket-nvidia-ami.template.json", + "terminationProtection": false, + "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}/25ecc9ee1f79cd8a912202279ab524c1d49216ee0be93a5179ef19f50cd1b1ba.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-ecs-integ-bottlerocket-nvidia-ami.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-ecs-integ-bottlerocket-nvidia-ami.assets" + ], + "metadata": { + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1Subnet5C2D37C4" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTable6C95E38E" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTableAssociation97140677" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1EIPD7E02669" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1NATGateway4D7517AA" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTable94F7E489" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2DefaultRoute97F91067" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2EIP3C605A87" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2NATGateway9182C01D" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1Subnet536B997A" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableB2C5B500" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableAssociation70C59FA6" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1DefaultRouteBE02A9ED" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableA678073B" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2DefaultRoute060D2087" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIGWD7BA715C" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVPCGWBF912B6E" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterEB0386A7" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceSecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgInstanceSecurityGroupE1EAEF75" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgInstanceRoleD105ACA5" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgInstanceRoleDefaultPolicyBB6119DC" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceProfile": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgInstanceProfile424C4AC3" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LaunchTemplate/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgLaunchTemplate45A2FA5C" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/ASG": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgASG5424825A" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctionFEA27227" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/AllowInvoke:awsecsintegbottlerocketnvidiaamiClusterbottlerocketasgLifecycleHookDrainHookTopic46897984": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctionAllowInvokeawsecsintegbottlerocketnvidiaamiClusterbottlerocketasgLifecycleHookDrainHookTopic46897984C264A0A5" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/Topic/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctionTopicC875173C" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Topic/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgLifecycleHookDrainHookRole9E2A1D11" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgLifecycleHookDrainHookRoleDefaultPolicy2C98DD9A" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgLifecycleHookDrainHook00055B9D" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/SsmParameterValue:--aws--service--bottlerocket--aws-ecs-2-nvidia--x86_64--latest--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": [ + { + "type": "aws:cdk:logicalId", + "data": "SsmParameterValueawsservicebottlerocketawsecs2nvidiax8664latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-ecs-integ-bottlerocket-nvidia-ami" + }, + "awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.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": [ + "awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.assets" + ], + "metadata": { + "/aws-ecs-bottlerocket-nvidia-ami/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-ecs-bottlerocket-nvidia-ami/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-ecs-bottlerocket-nvidia-ami/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/tree.json new file mode 100644 index 0000000000000..0f1c006667121 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/tree.json @@ -0,0 +1,1583 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-ecs-integ-bottlerocket-nvidia-ami": { + "id": "aws-ecs-integ-bottlerocket-nvidia-ami", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami", + "children": { + "Vpc": { + "id": "Vpc", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Vpc/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "internetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" + } + }, + "Cluster": { + "id": "Cluster", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::Cluster", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" + } + }, + "bottlerocket-asg": { + "id": "bottlerocket-asg", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg", + "children": { + "InstanceSecurityGroup": { + "id": "InstanceSecurityGroup", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceSecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceSecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceSecurityGroup", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "InstanceRole": { + "id": "InstanceRole", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceRole", + "children": { + "ImportInstanceRole": { + "id": "ImportInstanceRole", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceRole/ImportInstanceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ec2.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/AmazonSSMManagedInstanceCore" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role" + ] + ] + } + ], + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DeregisterContainerInstance", + "ecs:RegisterContainerInstance", + "ecs:Submit*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + }, + { + "Action": [ + "ecs:Poll", + "ecs:StartTelemetrySession" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "ecr:GetAuthorizationToken", + "ecs:DiscoverPollEndpoint", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterbottlerocketasgInstanceRoleDefaultPolicyBB6119DC", + "roles": [ + { + "Ref": "ClusterbottlerocketasgInstanceRoleD105ACA5" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "InstanceProfile": { + "id": "InstanceProfile", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/InstanceProfile", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::InstanceProfile", + "aws:cdk:cloudformation:props": { + "roles": [ + { + "Ref": "ClusterbottlerocketasgInstanceRoleD105ACA5" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" + } + }, + "ImportedInstanceProfile": { + "id": "ImportedInstanceProfile", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/ImportedInstanceProfile", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "LaunchTemplate": { + "id": "LaunchTemplate", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LaunchTemplate", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LaunchTemplate/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::LaunchTemplate", + "aws:cdk:cloudformation:props": { + "launchTemplateData": { + "iamInstanceProfile": { + "arn": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgInstanceProfile424C4AC3", + "Arn" + ] + } + }, + "imageId": { + "Ref": "SsmParameterValueawsservicebottlerocketawsecs2nvidiax8664latestimageidC96584B6F00A464EAD1953AFF4B05118Parameter" + }, + "instanceType": "g3s.xlarge", + "monitoring": { + "enabled": false + }, + "securityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterbottlerocketasgInstanceSecurityGroupE1EAEF75", + "GroupId" + ] + } + ], + "tagSpecifications": [ + { + "resourceType": "instance", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LaunchTemplate" + } + ] + }, + { + "resourceType": "volume", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LaunchTemplate" + } + ] + } + ], + "userData": { + "Fn::Base64": { + "Fn::Join": [ + "", + [ + "\n[settings.ecs]\ncluster = \"", + { + "Ref": "ClusterEB0386A7" + }, + "\"" + ] + ] + } + } + }, + "tagSpecifications": [ + { + "resourceType": "launch-template", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LaunchTemplate" + } + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" + } + }, + "ASG": { + "id": "ASG", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/ASG", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AutoScaling::AutoScalingGroup", + "aws:cdk:cloudformation:props": { + "launchTemplate": { + "launchTemplateId": { + "Ref": "ClusterbottlerocketasgLaunchTemplate45A2FA5C" + }, + "version": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgLaunchTemplate45A2FA5C", + "LatestVersionNumber" + ] + } + }, + "maxSize": "1", + "minSize": "0", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg", + "propagateAtLaunch": true + } + ], + "vpcZoneIdentifier": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" + } + }, + "DrainECSHook": { + "id": "DrainECSHook", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook", + "children": { + "Function": { + "id": "Function", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ], + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ClusterbottlerocketasgASG5424825A" + } + ] + ] + } + }, + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks", + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C", + "roles": [ + { + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Function", + "aws:cdk:cloudformation:props": { + "code": { + "zipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "environment": { + "variables": { + "CLUSTER": { + "Ref": "ClusterEB0386A7" + } + } + }, + "handler": "index.lambda_handler", + "role": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3", + "Arn" + ] + }, + "runtime": "python3.9", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ], + "timeout": 310 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" + } + }, + "AllowInvoke:awsecsintegbottlerocketnvidiaamiClusterbottlerocketasgLifecycleHookDrainHookTopic46897984": { + "id": "AllowInvoke:awsecsintegbottlerocketnvidiaamiClusterbottlerocketasgLifecycleHookDrainHookTopic46897984", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/AllowInvoke:awsecsintegbottlerocketnvidiaamiClusterbottlerocketasgLifecycleHookDrainHookTopic46897984", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", + "aws:cdk:cloudformation:props": { + "action": "lambda:InvokeFunction", + "functionName": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgDrainECSHookFunctionFEA27227", + "Arn" + ] + }, + "principal": "sns.amazonaws.com", + "sourceArn": { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" + } + }, + "Topic": { + "id": "Topic", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/Topic", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/Topic/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SNS::Subscription", + "aws:cdk:cloudformation:props": { + "endpoint": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgDrainECSHookFunctionFEA27227", + "Arn" + ] + }, + "protocol": "lambda", + "topicArn": { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "LifecycleHookDrainHook": { + "id": "LifecycleHookDrainHook", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook", + "children": { + "Topic": { + "id": "Topic", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Topic", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Topic/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SNS::Topic", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Role/ImportRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "autoscaling.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "sns:Publish", + "Effect": "Allow", + "Resource": { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterbottlerocketasgLifecycleHookDrainHookRoleDefaultPolicy2C98DD9A", + "roles": [ + { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookRole9E2A1D11" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AutoScaling::LifecycleHook", + "aws:cdk:cloudformation:props": { + "autoScalingGroupName": { + "Ref": "ClusterbottlerocketasgASG5424825A" + }, + "defaultResult": "CONTINUE", + "heartbeatTimeout": 300, + "lifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", + "notificationTargetArn": { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + }, + "roleArn": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgLifecycleHookDrainHookRole9E2A1D11", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" + } + }, + "SsmParameterValue:--aws--service--bottlerocket--aws-ecs-2-nvidia--x86_64--latest--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { + "id": "SsmParameterValue:--aws--service--bottlerocket--aws-ecs-2-nvidia--x86_64--latest--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/SsmParameterValue:--aws--service--bottlerocket--aws-ecs-2-nvidia--x86_64--latest--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "SsmParameterValue:--aws--service--bottlerocket--aws-ecs-2-nvidia--x86_64--latest--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { + "id": "SsmParameterValue:--aws--service--bottlerocket--aws-ecs-2-nvidia--x86_64--latest--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/SsmParameterValue:--aws--service--bottlerocket--aws-ecs-2-nvidia--x86_64--latest--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "aws-ecs-bottlerocket-nvidia-ami": { + "id": "aws-ecs-bottlerocket-nvidia-ami", + "path": "aws-ecs-bottlerocket-nvidia-ami", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "aws-ecs-bottlerocket-nvidia-ami/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "aws-ecs-bottlerocket-nvidia-ami/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "aws-ecs-bottlerocket-nvidia-ami/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-ecs-bottlerocket-nvidia-ami/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-ecs-bottlerocket-nvidia-ami/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.ts new file mode 100644 index 0000000000000..f852a20e6cfa5 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.ts @@ -0,0 +1,26 @@ +import * as ec2 from 'aws-cdk-lib/aws-ec2'; +import * as cdk from 'aws-cdk-lib'; +import * as ecs from 'aws-cdk-lib/aws-ecs'; +import * as integ from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-ecs-integ-bottlerocket-nvidia-ami'); + +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2, restrictDefaultSecurityGroup: false }); +const cluster = new ecs.Cluster(stack, 'Cluster', { + vpc, +}); +cluster.addCapacity('bottlerocket-asg', { + minCapacity: 0, + maxCapacity: 1, + instanceType: new ec2.InstanceType('g3s.xlarge'), + machineImage: new ecs.BottleRocketImage({ + variant: ecs.BottlerocketEcsVariant.AWS_ECS_2_NVIDIA, + }), +}); + +new integ.IntegTest(app, 'aws-ecs-bottlerocket-nvidia-ami', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/aws-ecs-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/aws-ecs-integ.assets.json new file mode 100644 index 0000000000000..3ee550ae131a1 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/aws-ecs-integ.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "c3c8f98183d2c9cb42e81d10e09f14c47c677e1d8cc0960e43b0c203ce50b689": { + "source": { + "path": "aws-ecs-integ.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "c3c8f98183d2c9cb42e81d10e09f14c47c677e1d8cc0960e43b0c203ce50b689.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/aws-ecs-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/aws-ecs-integ.template.json new file mode 100644 index 0000000000000..e45f409691a23 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/aws-ecs-integ.template.json @@ -0,0 +1,493 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet1DefaultRoute3DA9E72A", + "VpcPublicSubnet1RouteTableAssociation97140677" + ] + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet2DefaultRoute97F91067", + "VpcPublicSubnet2RouteTableAssociationDD5762D8" + ] + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "ClusterEB0386A7": { + "Type": "AWS::ECS::Cluster" + }, + "TaskRole30FC0FBB": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "TaskRoleDefaultPolicy07FC53DE": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "ecs:UpdateTaskProtection", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ecs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":task/", + { + "Ref": "ClusterEB0386A7" + }, + "/*" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TaskRoleDefaultPolicy07FC53DE", + "Roles": [ + { + "Ref": "TaskRole30FC0FBB" + } + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.assets.json new file mode 100644 index 0000000000000..59e1fc8c03beb --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/integ.json new file mode 100644 index 0000000000000..6e80ebb486998 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "aws-ecs-cluster-grant-task-protection/DefaultTest": { + "stacks": [ + "aws-ecs-integ" + ], + "assertionStack": "aws-ecs-cluster-grant-task-protection/DefaultTest/DeployAssert", + "assertionStackName": "awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/manifest.json new file mode 100644 index 0000000000000..5db9857548b64 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/manifest.json @@ -0,0 +1,263 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-ecs-integ.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-ecs-integ.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-ecs-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-ecs-integ.template.json", + "terminationProtection": false, + "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}/c3c8f98183d2c9cb42e81d10e09f14c47c677e1d8cc0960e43b0c203ce50b689.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-ecs-integ.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-ecs-integ.assets" + ], + "metadata": { + "/aws-ecs-integ/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1Subnet5C2D37C4" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTable6C95E38E" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTableAssociation97140677" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1EIPD7E02669" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1NATGateway4D7517AA" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTable94F7E489" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2DefaultRoute97F91067" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2EIP3C605A87" + } + ], + "/aws-ecs-integ/Vpc/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2NATGateway9182C01D" + } + ], + "/aws-ecs-integ/Vpc/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1Subnet536B997A" + } + ], + "/aws-ecs-integ/Vpc/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableB2C5B500" + } + ], + "/aws-ecs-integ/Vpc/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableAssociation70C59FA6" + } + ], + "/aws-ecs-integ/Vpc/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1DefaultRouteBE02A9ED" + } + ], + "/aws-ecs-integ/Vpc/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "/aws-ecs-integ/Vpc/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableA678073B" + } + ], + "/aws-ecs-integ/Vpc/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + } + ], + "/aws-ecs-integ/Vpc/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2DefaultRoute060D2087" + } + ], + "/aws-ecs-integ/Vpc/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIGWD7BA715C" + } + ], + "/aws-ecs-integ/Vpc/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVPCGWBF912B6E" + } + ], + "/aws-ecs-integ/Cluster/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterEB0386A7" + } + ], + "/aws-ecs-integ/TaskRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TaskRole30FC0FBB" + } + ], + "/aws-ecs-integ/TaskRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TaskRoleDefaultPolicy07FC53DE" + } + ], + "/aws-ecs-integ/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-ecs-integ/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-ecs-integ" + }, + "awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.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": [ + "awsecsclustergranttaskprotectionDefaultTestDeployAssert24DEFE93.assets" + ], + "metadata": { + "/aws-ecs-cluster-grant-task-protection/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-ecs-cluster-grant-task-protection/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-ecs-cluster-grant-task-protection/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/tree.json new file mode 100644 index 0000000000000..e1a0fa0007c06 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.js.snapshot/tree.json @@ -0,0 +1,871 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-ecs-integ": { + "id": "aws-ecs-integ", + "path": "aws-ecs-integ", + "children": { + "Vpc": { + "id": "Vpc", + "path": "aws-ecs-integ/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/Vpc/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-ecs-integ/Vpc/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ/Vpc/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ/Vpc/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ/Vpc/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ/Vpc/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ/Vpc/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-ecs-integ/Vpc/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-ecs-integ/Vpc/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "aws-ecs-integ/Vpc/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ/Vpc/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ/Vpc/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ/Vpc/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ/Vpc/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ/Vpc/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-ecs-integ/Vpc/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-ecs-integ/Vpc/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "aws-ecs-integ/Vpc/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ/Vpc/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ/Vpc/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ/Vpc/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ/Vpc/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ/Vpc/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "aws-ecs-integ/Vpc/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ/Vpc/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ/Vpc/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ/Vpc/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ/Vpc/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ/Vpc/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "aws-ecs-integ/Vpc/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "aws-ecs-integ/Vpc/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "internetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" + } + }, + "Cluster": { + "id": "Cluster", + "path": "aws-ecs-integ/Cluster", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/Cluster/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::Cluster", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" + } + }, + "TaskRole": { + "id": "TaskRole", + "path": "aws-ecs-integ/TaskRole", + "children": { + "ImportTaskRole": { + "id": "ImportTaskRole", + "path": "aws-ecs-integ/TaskRole/ImportTaskRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/TaskRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-ecs-integ/TaskRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/TaskRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "ecs:UpdateTaskProtection", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ecs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":task/", + { + "Ref": "ClusterEB0386A7" + }, + "/*" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "TaskRoleDefaultPolicy07FC53DE", + "roles": [ + { + "Ref": "TaskRole30FC0FBB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-ecs-integ/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-ecs-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "aws-ecs-cluster-grant-task-protection": { + "id": "aws-ecs-cluster-grant-task-protection", + "path": "aws-ecs-cluster-grant-task-protection", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "aws-ecs-cluster-grant-task-protection/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "aws-ecs-cluster-grant-task-protection/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "aws-ecs-cluster-grant-task-protection/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-ecs-cluster-grant-task-protection/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-ecs-cluster-grant-task-protection/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.ts new file mode 100644 index 0000000000000..d76a2200f3a39 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-grant-task-protection.ts @@ -0,0 +1,20 @@ +import * as ec2 from 'aws-cdk-lib/aws-ec2'; +import * as cdk from 'aws-cdk-lib'; +import * as ecs from 'aws-cdk-lib/aws-ecs'; +import * as iam from 'aws-cdk-lib/aws-iam'; +import * as integ from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-ecs-integ'); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2, restrictDefaultSecurityGroup: false }); +const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); +const taskRole = new iam.Role(stack, 'TaskRole', { + assumedBy: new iam.ServicePrincipal('ecs-tasks.amazonaws.com'), +}); +cluster.grantTaskProtection(taskRole); + +new integ.IntegTest(app, 'aws-ecs-cluster-grant-task-protection', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/IntegTestEventBusStackDefaultTestDeployAssertE6DF8EA9.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/IntegTestEventBusStackDefaultTestDeployAssertE6DF8EA9.assets.json index 4209c700d9bd4..b016e8fe026ce 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/IntegTestEventBusStackDefaultTestDeployAssertE6DF8EA9.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/IntegTestEventBusStackDefaultTestDeployAssertE6DF8EA9.assets.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/Stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/Stack.assets.json index 0f867605130fa..7e02c8ce09ced 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/Stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/Stack.assets.json @@ -1,7 +1,7 @@ { - "version": "34.0.0", + "version": "36.0.0", "files": { - "57e14b65d6e62634abcf2a64f00eb08e99ee92617490f92b45eff16399d6173a": { + "1ac02a396bc49bcce2ab3c276dd4e234efe7e86f9d1a06c9ae16c054f1764bf1": { "source": { "path": "Stack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "57e14b65d6e62634abcf2a64f00eb08e99ee92617490f92b45eff16399d6173a.json", + "objectKey": "1ac02a396bc49bcce2ab3c276dd4e234efe7e86f9d1a06c9ae16c054f1764bf1.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/test/integ.eventbus.js.snapshot/Stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/Stack.template.json index f13964b9866c7..0fc44e208d8ce 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/Stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/Stack.template.json @@ -6,7 +6,7 @@ "Name": "StackBusAA0A1E4B" } }, - "BusStatement1B4D0336C": { + "BuscdkStatement1D7D87B9D": { "Type": "AWS::Events::EventBusPolicy", "Properties": { "EventBusName": { @@ -39,12 +39,12 @@ "Arn" ] }, - "Sid": "Statement1" + "Sid": "cdk-Statement1" }, - "StatementId": "Statement1" + "StatementId": "cdk-Statement1" } }, - "BusStatement2B5FB314B": { + "BuscdkStatement2341A5B58": { "Type": "AWS::Events::EventBusPolicy", "Properties": { "EventBusName": { @@ -77,9 +77,9 @@ "Arn" ] }, - "Sid": "Statement2" + "Sid": "cdk-Statement2" }, - "StatementId": "Statement2" + "StatementId": "cdk-Statement2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/cdk.out index 2313ab5436501..1f0068d32659a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"34.0.0"} \ No newline at end of file +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/integ.json index 6fe4c5f82830c..c5e97be0cb324 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "testCases": { "IntegTest-EventBusStack/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/manifest.json index 11bedb11869b1..c943d4cd06dd7 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "36.0.0", "artifacts": { "Stack.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,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}/57e14b65d6e62634abcf2a64f00eb08e99ee92617490f92b45eff16399d6173a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1ac02a396bc49bcce2ab3c276dd4e234efe7e86f9d1a06c9ae16c054f1764bf1.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -40,16 +40,16 @@ "data": "BusEA82B648" } ], - "/Stack/Bus/Statement1/Resource": [ + "/Stack/Bus/cdk-Statement1/Resource": [ { "type": "aws:cdk:logicalId", - "data": "BusStatement1B4D0336C" + "data": "BuscdkStatement1D7D87B9D" } ], - "/Stack/Bus/Statement2/Resource": [ + "/Stack/Bus/cdk-Statement2/Resource": [ { "type": "aws:cdk:logicalId", - "data": "BusStatement2B5FB314B" + "data": "BuscdkStatement2341A5B58" } ], "/Stack/BootstrapVersion": [ @@ -63,6 +63,24 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "BusStatement1B4D0336C": [ + { + "type": "aws:cdk:logicalId", + "data": "BusStatement1B4D0336C", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "BusStatement2B5FB314B": [ + { + "type": "aws:cdk:logicalId", + "data": "BusStatement2B5FB314B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "Stack" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/tree.json index d6fbe1678d677..d1f3f70812aa6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events/test/integ.eventbus.js.snapshot/tree.json @@ -26,13 +26,13 @@ "version": "0.0.0" } }, - "Statement1": { - "id": "Statement1", - "path": "Stack/Bus/Statement1", + "cdk-Statement1": { + "id": "cdk-Statement1", + "path": "Stack/Bus/cdk-Statement1", "children": { "Resource": { "id": "Resource", - "path": "Stack/Bus/Statement1/Resource", + "path": "Stack/Bus/cdk-Statement1/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Events::EventBusPolicy", "aws:cdk:cloudformation:props": { @@ -66,9 +66,9 @@ "Arn" ] }, - "Sid": "Statement1" + "Sid": "cdk-Statement1" }, - "statementId": "Statement1" + "statementId": "cdk-Statement1" } }, "constructInfo": { @@ -82,13 +82,13 @@ "version": "0.0.0" } }, - "Statement2": { - "id": "Statement2", - "path": "Stack/Bus/Statement2", + "cdk-Statement2": { + "id": "cdk-Statement2", + "path": "Stack/Bus/cdk-Statement2", "children": { "Resource": { "id": "Resource", - "path": "Stack/Bus/Statement2/Resource", + "path": "Stack/Bus/cdk-Statement2/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Events::EventBusPolicy", "aws:cdk:cloudformation:props": { @@ -122,9 +122,9 @@ "Arn" ] }, - "Sid": "Statement2" + "Sid": "cdk-Statement2" }, - "statementId": "Statement2" + "statementId": "cdk-Statement2" } }, "constructInfo": { @@ -179,7 +179,7 @@ "path": "IntegTest-EventBusStack/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.3.0" } }, "DeployAssert": { @@ -225,7 +225,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.3.0" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.assets.json new file mode 100644 index 0000000000000..9e7a3d2096835 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.assets.json @@ -0,0 +1,19 @@ +{ + "version": "34.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/cdk.out new file mode 100644 index 0000000000000..2313ab5436501 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"34.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/integ-principal-with-conditions-and-tags.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/integ-principal-with-conditions-and-tags.assets.json new file mode 100644 index 0000000000000..91171df754ba7 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/integ-principal-with-conditions-and-tags.assets.json @@ -0,0 +1,19 @@ +{ + "version": "34.0.0", + "files": { + "b1be1c3b71795063ddb9f2ddecfacb8c43d85575e30ff877dca4d378e2f1a53a": { + "source": { + "path": "integ-principal-with-conditions-and-tags.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "b1be1c3b71795063ddb9f2ddecfacb8c43d85575e30ff877dca4d378e2f1a53a.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/integ-principal-with-conditions-and-tags.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/integ-principal-with-conditions-and-tags.template.json new file mode 100644 index 0000000000000..42309004eaa93 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/integ-principal-with-conditions-and-tags.template.json @@ -0,0 +1,66 @@ +{ + "Resources": { + "TestRole25D98AB21": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole", + "sts:TagSession" + ], + "Condition": { + "StringLike": { + "aws:PrincipalTag/owner": "foo" + }, + "Bool": { + "aws:MultiFactorAuthPresent": "true" + } + }, + "Effect": "Allow", + "Principal": { + "AWS": "*" + } + } + ], + "Version": "2012-10-17" + } + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/integ.json new file mode 100644 index 0000000000000..8b1b2aa7b1f3c --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "34.0.0", + "testCases": { + "PrincipalWithConditionAndTags/DefaultTest": { + "stacks": [ + "integ-principal-with-conditions-and-tags" + ], + "assertionStack": "PrincipalWithConditionAndTags/DefaultTest/DeployAssert", + "assertionStackName": "PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/manifest.json new file mode 100644 index 0000000000000..b3bc149c3aea5 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/manifest.json @@ -0,0 +1,113 @@ +{ + "version": "34.0.0", + "artifacts": { + "integ-principal-with-conditions-and-tags.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integ-principal-with-conditions-and-tags.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integ-principal-with-conditions-and-tags": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integ-principal-with-conditions-and-tags.template.json", + "terminationProtection": false, + "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}/b1be1c3b71795063ddb9f2ddecfacb8c43d85575e30ff877dca4d378e2f1a53a.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "integ-principal-with-conditions-and-tags.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": [ + "integ-principal-with-conditions-and-tags.assets" + ], + "metadata": { + "/integ-principal-with-conditions-and-tags/TestRole2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TestRole25D98AB21" + } + ], + "/integ-principal-with-conditions-and-tags/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-principal-with-conditions-and-tags/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "integ-principal-with-conditions-and-tags" + }, + "PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.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": [ + "PrincipalWithConditionAndTagsDefaultTestDeployAssertA5074573.assets" + ], + "metadata": { + "/PrincipalWithConditionAndTags/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PrincipalWithConditionAndTags/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PrincipalWithConditionAndTags/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/tree.json new file mode 100644 index 0000000000000..b209ace2d8181 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.js.snapshot/tree.json @@ -0,0 +1,155 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "integ-principal-with-conditions-and-tags": { + "id": "integ-principal-with-conditions-and-tags", + "path": "integ-principal-with-conditions-and-tags", + "children": { + "TestRole2": { + "id": "TestRole2", + "path": "integ-principal-with-conditions-and-tags/TestRole2", + "children": { + "ImportTestRole2": { + "id": "ImportTestRole2", + "path": "integ-principal-with-conditions-and-tags/TestRole2/ImportTestRole2", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-principal-with-conditions-and-tags/TestRole2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": [ + "sts:AssumeRole", + "sts:TagSession" + ], + "Condition": { + "StringLike": { + "aws:PrincipalTag/owner": "foo" + }, + "Bool": { + "aws:MultiFactorAuthPresent": "true" + } + }, + "Effect": "Allow", + "Principal": { + "AWS": "*" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-principal-with-conditions-and-tags/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-principal-with-conditions-and-tags/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "PrincipalWithConditionAndTags": { + "id": "PrincipalWithConditionAndTags", + "path": "PrincipalWithConditionAndTags", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "PrincipalWithConditionAndTags/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "PrincipalWithConditionAndTags/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "PrincipalWithConditionAndTags/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PrincipalWithConditionAndTags/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PrincipalWithConditionAndTags/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.ts new file mode 100644 index 0000000000000..b1cac63253881 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.principal-with-conditions-and-tags.ts @@ -0,0 +1,23 @@ +import { App, Stack } from 'aws-cdk-lib'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as iam from 'aws-cdk-lib/aws-iam'; + +const app = new App(); +const stack = new Stack(app, 'integ-principal-with-conditions-and-tags'); + +const basePrincipal = new iam.AnyPrincipal() + .withConditions({ + StringLike: { 'aws:PrincipalTag/owner': 'foo' }, + Bool: { 'aws:MultiFactorAuthPresent': 'true' }, + }) + .withSessionTags(); + +new iam.Role(stack, 'TestRole2', { + assumedBy: basePrincipal, +}); + +new IntegTest(app, 'PrincipalWithConditionAndTags', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/LambdaNodeJsLatestIntegDefaultTestDeployAssertD40B5C28.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/LambdaNodeJsLatestIntegDefaultTestDeployAssertD40B5C28.assets.json index 6f93a5abf9e3b..f32c30d5e2f4c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/LambdaNodeJsLatestIntegDefaultTestDeployAssertD40B5C28.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/LambdaNodeJsLatestIntegDefaultTestDeployAssertD40B5C28.assets.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "36.0.0", "files": { "df6156f884f46480078633afbd0b768581022c5e444c5f72752980280ae15bd9": { "source": { @@ -14,7 +14,7 @@ } } }, - "994f8c7abe2b3f6c8d3781397e390db9d07e0616825c3e71bccb9375e210fa3a": { + "8deae8f4c1da113072818007e731a323c8dd62c3021d881a84352b2bf0901604": { "source": { "path": "LambdaNodeJsLatestIntegDefaultTestDeployAssertD40B5C28.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "994f8c7abe2b3f6c8d3781397e390db9d07e0616825c3e71bccb9375e210fa3a.json", + "objectKey": "8deae8f4c1da113072818007e731a323c8dd62c3021d881a84352b2bf0901604.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-nodejs/test/integ.latest.js.snapshot/LambdaNodeJsLatestIntegDefaultTestDeployAssertD40B5C28.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/LambdaNodeJsLatestIntegDefaultTestDeployAssertD40B5C28.template.json index 70399a9693963..24597a0e813e4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/LambdaNodeJsLatestIntegDefaultTestDeployAssertD40B5C28.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/LambdaNodeJsLatestIntegDefaultTestDeployAssertD40B5C28.template.json @@ -27,7 +27,7 @@ } }, "flattenResponse": "false", - "salt": "1701907107878" + "salt": "1703938182122" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/index.js similarity index 99% rename from packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/index.js index 5cbde8fe437d2..ac04e6bc45069 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/index.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/index.js @@ -26,7 +26,7 @@ ${(0,Gl.toHex)(s)}`}getCanonicalPath({path:n}){if(this.uriEscapePath){let t=[];f `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}hr.prototype.build=function(e){return this.options.preserveOrder?TY(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)};hr.prototype.j2x=function(e,n){let t="",r="";for(let o in e)if(!(typeof e[o]>"u"))if(e[o]===null)o[0]==="?"?r+=this.indentate(n)+"<"+o+"?"+this.tagEndChar:r+=this.indentate(n)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)r+=this.buildTextValNode(e[o],o,"",n);else if(typeof e[o]!="object"){let s=this.isAttribute(o);if(s)t+=this.buildAttrPairStr(s,""+e[o]);else if(o===this.options.textNodeName){let c=this.options.tagValueProcessor(o,""+e[o]);r+=this.replaceEntitiesValue(c)}else r+=this.buildTextValNode(e[o],o,"",n)}else if(Array.isArray(e[o])){let s=e[o].length,c="";for(let i=0;i"u"||(u===null?o[0]==="?"?r+=this.indentate(n)+"<"+o+"?"+this.tagEndChar:r+=this.indentate(n)+"<"+o+"/"+this.tagEndChar:typeof u=="object"?this.options.oneListGroup?c+=this.j2x(u,n+1).val:c+=this.processTextOrObjNode(u,o,n):c+=this.buildTextValNode(u,o,"",n))}this.options.oneListGroup&&(c=this.buildObjectNode(c,o,"",n)),r+=c}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){let s=Object.keys(e[o]),c=s.length;for(let i=0;i"+e+o:this.options.commentPropName!==!1&&n===this.options.commentPropName&&s.length===0?this.indentate(r)+``+this.newLine:this.indentate(r)+"<"+n+t+s+this.tagEndChar+e+this.indentate(r)+o}};hr.prototype.closeTag=function(e){let n="";return this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode||(n="/"):this.options.suppressEmptyNode?n="/":n=`>`+this.newLine;if(this.options.commentPropName!==!1&&n===this.options.commentPropName)return this.indentate(r)+``+this.newLine;if(n[0]==="?")return this.indentate(r)+"<"+n+t+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(n,e);return o=this.replaceEntitiesValue(o),o===""?this.indentate(r)+"<"+n+t+this.closeTag(n)+this.tagEndChar:this.indentate(r)+"<"+n+t+">"+o+"0&&this.options.processEntities)for(let n=0;n{"use strict";var FY=Uh(),LY=VT(),jY=eq();tq.exports={XMLParser:LY,XMLValidator:FY,XMLBuilder:jY}});var Mn=m(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.de_GetSessionTokenCommand=_e.de_GetFederationTokenCommand=_e.de_GetCallerIdentityCommand=_e.de_GetAccessKeyInfoCommand=_e.de_DecodeAuthorizationMessageCommand=_e.de_AssumeRoleWithWebIdentityCommand=_e.de_AssumeRoleWithSAMLCommand=_e.de_AssumeRoleCommand=_e.se_GetSessionTokenCommand=_e.se_GetFederationTokenCommand=_e.se_GetCallerIdentityCommand=_e.se_GetAccessKeyInfoCommand=_e.se_DecodeAuthorizationMessageCommand=_e.se_AssumeRoleWithWebIdentityCommand=_e.se_AssumeRoleWithSAMLCommand=_e.se_AssumeRoleCommand=void 0;var UY=we(),ee=E(),zY=Wh(),Cr=gr(),GY=$m(),HY=async(e,n)=>{let t=br,r;return r=vr({...y9(e,n),Action:"AssumeRole",Version:"2011-06-15"}),Er(n,t,"/",void 0,r)};_e.se_AssumeRoleCommand=HY;var $Y=async(e,n)=>{let t=br,r;return r=vr({...g9(e,n),Action:"AssumeRoleWithSAML",Version:"2011-06-15"}),Er(n,t,"/",void 0,r)};_e.se_AssumeRoleWithSAMLCommand=$Y;var KY=async(e,n)=>{let t=br,r;return r=vr({...h9(e,n),Action:"AssumeRoleWithWebIdentity",Version:"2011-06-15"}),Er(n,t,"/",void 0,r)};_e.se_AssumeRoleWithWebIdentityCommand=KY;var VY=async(e,n)=>{let t=br,r;return r=vr({...C9(e,n),Action:"DecodeAuthorizationMessage",Version:"2011-06-15"}),Er(n,t,"/",void 0,r)};_e.se_DecodeAuthorizationMessageCommand=VY;var XY=async(e,n)=>{let t=br,r;return r=vr({...S9(e,n),Action:"GetAccessKeyInfo",Version:"2011-06-15"}),Er(n,t,"/",void 0,r)};_e.se_GetAccessKeyInfoCommand=XY;var WY=async(e,n)=>{let t=br,r;return r=vr({...E9(e,n),Action:"GetCallerIdentity",Version:"2011-06-15"}),Er(n,t,"/",void 0,r)};_e.se_GetCallerIdentityCommand=WY;var YY=async(e,n)=>{let t=br,r;return r=vr({...b9(e,n),Action:"GetFederationToken",Version:"2011-06-15"}),Er(n,t,"/",void 0,r)};_e.se_GetFederationTokenCommand=YY;var QY=async(e,n)=>{let t=br,r;return r=vr({...P9(e,n),Action:"GetSessionToken",Version:"2011-06-15"}),Er(n,t,"/",void 0,r)};_e.se_GetSessionTokenCommand=QY;var JY=async(e,n)=>{if(e.statusCode>=300)return ZY(e,n);let t=await qn(e.body,n),r={};return r=I9(t.AssumeRoleResult,n),{$metadata:rt(e),...r}};_e.de_AssumeRoleCommand=JY;var ZY=async(e,n)=>{let t={...e,body:await Pr(e.body,n)},r=xr(e,t.body);switch(r){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Yh(t,n);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Vm(t,n);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Xm(t,n);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Ic(t,n);default:let o=t.body;return Sr({output:e,parsedBody:o.Error,errorCode:r})}},e9=async(e,n)=>{if(e.statusCode>=300)return t9(e,n);let t=await qn(e.body,n),r={};return r=R9(t.AssumeRoleWithSAMLResult,n),{$metadata:rt(e),...r}};_e.de_AssumeRoleWithSAMLCommand=e9;var t9=async(e,n)=>{let t={...e,body:await Pr(e.body,n)},r=xr(e,t.body);switch(r){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Yh(t,n);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await nq(t,n);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await rq(t,n);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Vm(t,n);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Xm(t,n);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Ic(t,n);default:let o=t.body;return Sr({output:e,parsedBody:o.Error,errorCode:r})}},n9=async(e,n)=>{if(e.statusCode>=300)return r9(e,n);let t=await qn(e.body,n),r={};return r=N9(t.AssumeRoleWithWebIdentityResult,n),{$metadata:rt(e),...r}};_e.de_AssumeRoleWithWebIdentityCommand=n9;var r9=async(e,n)=>{let t={...e,body:await Pr(e.body,n)},r=xr(e,t.body);switch(r){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Yh(t,n);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await f9(t,n);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await nq(t,n);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await rq(t,n);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Vm(t,n);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Xm(t,n);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Ic(t,n);default:let o=t.body;return Sr({output:e,parsedBody:o.Error,errorCode:r})}},o9=async(e,n)=>{if(e.statusCode>=300)return s9(e,n);let t=await qn(e.body,n),r={};return r=O9(t.DecodeAuthorizationMessageResult,n),{$metadata:rt(e),...r}};_e.de_DecodeAuthorizationMessageCommand=o9;var s9=async(e,n)=>{let t={...e,body:await Pr(e.body,n)},r=xr(e,t.body);switch(r){case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await _9(t,n);default:let o=t.body;return Sr({output:e,parsedBody:o.Error,errorCode:r})}},i9=async(e,n)=>{if(e.statusCode>=300)return a9(e,n);let t=await qn(e.body,n),r={};return r=M9(t.GetAccessKeyInfoResult,n),{$metadata:rt(e),...r}};_e.de_GetAccessKeyInfoCommand=i9;var a9=async(e,n)=>{let t={...e,body:await Pr(e.body,n)},r=xr(e,t.body),o=t.body;return Sr({output:e,parsedBody:o.Error,errorCode:r})},c9=async(e,n)=>{if(e.statusCode>=300)return d9(e,n);let t=await qn(e.body,n),r={};return r=B9(t.GetCallerIdentityResult,n),{$metadata:rt(e),...r}};_e.de_GetCallerIdentityCommand=c9;var d9=async(e,n)=>{let t={...e,body:await Pr(e.body,n)},r=xr(e,t.body),o=t.body;return Sr({output:e,parsedBody:o.Error,errorCode:r})},l9=async(e,n)=>{if(e.statusCode>=300)return u9(e,n);let t=await qn(e.body,n),r={};return r=D9(t.GetFederationTokenResult,n),{$metadata:rt(e),...r}};_e.de_GetFederationTokenCommand=l9;var u9=async(e,n)=>{let t={...e,body:await Pr(e.body,n)},r=xr(e,t.body);switch(r){case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Vm(t,n);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Xm(t,n);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Ic(t,n);default:let o=t.body;return Sr({output:e,parsedBody:o.Error,errorCode:r})}},m9=async(e,n)=>{if(e.statusCode>=300)return p9(e,n);let t=await qn(e.body,n),r={};return r=F9(t.GetSessionTokenResult,n),{$metadata:rt(e),...r}};_e.de_GetSessionTokenCommand=m9;var p9=async(e,n)=>{let t={...e,body:await Pr(e.body,n)},r=xr(e,t.body);switch(r){case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Ic(t,n);default:let o=t.body;return Sr({output:e,parsedBody:o.Error,errorCode:r})}},Yh=async(e,n)=>{let t=e.body,r=T9(t.Error,n),o=new Cr.ExpiredTokenException({$metadata:rt(e),...r});return(0,ee.decorateServiceException)(o,t)},f9=async(e,n)=>{let t=e.body,r=L9(t.Error,n),o=new Cr.IDPCommunicationErrorException({$metadata:rt(e),...r});return(0,ee.decorateServiceException)(o,t)},nq=async(e,n)=>{let t=e.body,r=j9(t.Error,n),o=new Cr.IDPRejectedClaimException({$metadata:rt(e),...r});return(0,ee.decorateServiceException)(o,t)},_9=async(e,n)=>{let t=e.body,r=U9(t.Error,n),o=new Cr.InvalidAuthorizationMessageException({$metadata:rt(e),...r});return(0,ee.decorateServiceException)(o,t)},rq=async(e,n)=>{let t=e.body,r=z9(t.Error,n),o=new Cr.InvalidIdentityTokenException({$metadata:rt(e),...r});return(0,ee.decorateServiceException)(o,t)},Vm=async(e,n)=>{let t=e.body,r=G9(t.Error,n),o=new Cr.MalformedPolicyDocumentException({$metadata:rt(e),...r});return(0,ee.decorateServiceException)(o,t)},Xm=async(e,n)=>{let t=e.body,r=H9(t.Error,n),o=new Cr.PackedPolicyTooLargeException({$metadata:rt(e),...r});return(0,ee.decorateServiceException)(o,t)},Ic=async(e,n)=>{let t=e.body,r=$9(t.Error,n),o=new Cr.RegionDisabledException({$metadata:rt(e),...r});return(0,ee.decorateServiceException)(o,t)},y9=(e,n)=>{var r,o,s,c;let t={};if(e.RoleArn!=null&&(t.RoleArn=e.RoleArn),e.RoleSessionName!=null&&(t.RoleSessionName=e.RoleSessionName),e.PolicyArns!=null){let i=Wm(e.PolicyArns,n);((r=e.PolicyArns)==null?void 0:r.length)===0&&(t.PolicyArns=[]),Object.entries(i).forEach(([u,l])=>{let a=`PolicyArns.${u}`;t[a]=l})}if(e.Policy!=null&&(t.Policy=e.Policy),e.DurationSeconds!=null&&(t.DurationSeconds=e.DurationSeconds),e.Tags!=null){let i=oq(e.Tags,n);((o=e.Tags)==null?void 0:o.length)===0&&(t.Tags=[]),Object.entries(i).forEach(([u,l])=>{let a=`Tags.${u}`;t[a]=l})}if(e.TransitiveTagKeys!=null){let i=A9(e.TransitiveTagKeys,n);((s=e.TransitiveTagKeys)==null?void 0:s.length)===0&&(t.TransitiveTagKeys=[]),Object.entries(i).forEach(([u,l])=>{let a=`TransitiveTagKeys.${u}`;t[a]=l})}if(e.ExternalId!=null&&(t.ExternalId=e.ExternalId),e.SerialNumber!=null&&(t.SerialNumber=e.SerialNumber),e.TokenCode!=null&&(t.TokenCode=e.TokenCode),e.SourceIdentity!=null&&(t.SourceIdentity=e.SourceIdentity),e.ProvidedContexts!=null){let i=w9(e.ProvidedContexts,n);((c=e.ProvidedContexts)==null?void 0:c.length)===0&&(t.ProvidedContexts=[]),Object.entries(i).forEach(([u,l])=>{let a=`ProvidedContexts.${u}`;t[a]=l})}return t},g9=(e,n)=>{var r;let t={};if(e.RoleArn!=null&&(t.RoleArn=e.RoleArn),e.PrincipalArn!=null&&(t.PrincipalArn=e.PrincipalArn),e.SAMLAssertion!=null&&(t.SAMLAssertion=e.SAMLAssertion),e.PolicyArns!=null){let o=Wm(e.PolicyArns,n);((r=e.PolicyArns)==null?void 0:r.length)===0&&(t.PolicyArns=[]),Object.entries(o).forEach(([s,c])=>{let i=`PolicyArns.${s}`;t[i]=c})}return e.Policy!=null&&(t.Policy=e.Policy),e.DurationSeconds!=null&&(t.DurationSeconds=e.DurationSeconds),t},h9=(e,n)=>{var r;let t={};if(e.RoleArn!=null&&(t.RoleArn=e.RoleArn),e.RoleSessionName!=null&&(t.RoleSessionName=e.RoleSessionName),e.WebIdentityToken!=null&&(t.WebIdentityToken=e.WebIdentityToken),e.ProviderId!=null&&(t.ProviderId=e.ProviderId),e.PolicyArns!=null){let o=Wm(e.PolicyArns,n);((r=e.PolicyArns)==null?void 0:r.length)===0&&(t.PolicyArns=[]),Object.entries(o).forEach(([s,c])=>{let i=`PolicyArns.${s}`;t[i]=c})}return e.Policy!=null&&(t.Policy=e.Policy),e.DurationSeconds!=null&&(t.DurationSeconds=e.DurationSeconds),t},C9=(e,n)=>{let t={};return e.EncodedMessage!=null&&(t.EncodedMessage=e.EncodedMessage),t},S9=(e,n)=>{let t={};return e.AccessKeyId!=null&&(t.AccessKeyId=e.AccessKeyId),t},E9=(e,n)=>({}),b9=(e,n)=>{var r,o;let t={};if(e.Name!=null&&(t.Name=e.Name),e.Policy!=null&&(t.Policy=e.Policy),e.PolicyArns!=null){let s=Wm(e.PolicyArns,n);((r=e.PolicyArns)==null?void 0:r.length)===0&&(t.PolicyArns=[]),Object.entries(s).forEach(([c,i])=>{let u=`PolicyArns.${c}`;t[u]=i})}if(e.DurationSeconds!=null&&(t.DurationSeconds=e.DurationSeconds),e.Tags!=null){let s=oq(e.Tags,n);((o=e.Tags)==null?void 0:o.length)===0&&(t.Tags=[]),Object.entries(s).forEach(([c,i])=>{let u=`Tags.${c}`;t[u]=i})}return t},P9=(e,n)=>{let t={};return e.DurationSeconds!=null&&(t.DurationSeconds=e.DurationSeconds),e.SerialNumber!=null&&(t.SerialNumber=e.SerialNumber),e.TokenCode!=null&&(t.TokenCode=e.TokenCode),t},Wm=(e,n)=>{let t={},r=1;for(let o of e){if(o===null)continue;let s=v9(o,n);Object.entries(s).forEach(([c,i])=>{t[`member.${r}.${c}`]=i}),r++}return t},v9=(e,n)=>{let t={};return e.arn!=null&&(t.arn=e.arn),t},x9=(e,n)=>{let t={};return e.ProviderArn!=null&&(t.ProviderArn=e.ProviderArn),e.ContextAssertion!=null&&(t.ContextAssertion=e.ContextAssertion),t},w9=(e,n)=>{let t={},r=1;for(let o of e){if(o===null)continue;let s=x9(o,n);Object.entries(s).forEach(([c,i])=>{t[`member.${r}.${c}`]=i}),r++}return t},k9=(e,n)=>{let t={};return e.Key!=null&&(t.Key=e.Key),e.Value!=null&&(t.Value=e.Value),t},A9=(e,n)=>{let t={},r=1;for(let o of e)o!==null&&(t[`member.${r}`]=o,r++);return t},oq=(e,n)=>{let t={},r=1;for(let o of e){if(o===null)continue;let s=k9(o,n);Object.entries(s).forEach(([c,i])=>{t[`member.${r}.${c}`]=i}),r++}return t},Qh=(e,n)=>{let t={};return e.AssumedRoleId!==void 0&&(t.AssumedRoleId=(0,ee.expectString)(e.AssumedRoleId)),e.Arn!==void 0&&(t.Arn=(0,ee.expectString)(e.Arn)),t},I9=(e,n)=>{let t={};return e.Credentials!==void 0&&(t.Credentials=Rc(e.Credentials,n)),e.AssumedRoleUser!==void 0&&(t.AssumedRoleUser=Qh(e.AssumedRoleUser,n)),e.PackedPolicySize!==void 0&&(t.PackedPolicySize=(0,ee.strictParseInt32)(e.PackedPolicySize)),e.SourceIdentity!==void 0&&(t.SourceIdentity=(0,ee.expectString)(e.SourceIdentity)),t},R9=(e,n)=>{let t={};return e.Credentials!==void 0&&(t.Credentials=Rc(e.Credentials,n)),e.AssumedRoleUser!==void 0&&(t.AssumedRoleUser=Qh(e.AssumedRoleUser,n)),e.PackedPolicySize!==void 0&&(t.PackedPolicySize=(0,ee.strictParseInt32)(e.PackedPolicySize)),e.Subject!==void 0&&(t.Subject=(0,ee.expectString)(e.Subject)),e.SubjectType!==void 0&&(t.SubjectType=(0,ee.expectString)(e.SubjectType)),e.Issuer!==void 0&&(t.Issuer=(0,ee.expectString)(e.Issuer)),e.Audience!==void 0&&(t.Audience=(0,ee.expectString)(e.Audience)),e.NameQualifier!==void 0&&(t.NameQualifier=(0,ee.expectString)(e.NameQualifier)),e.SourceIdentity!==void 0&&(t.SourceIdentity=(0,ee.expectString)(e.SourceIdentity)),t},N9=(e,n)=>{let t={};return e.Credentials!==void 0&&(t.Credentials=Rc(e.Credentials,n)),e.SubjectFromWebIdentityToken!==void 0&&(t.SubjectFromWebIdentityToken=(0,ee.expectString)(e.SubjectFromWebIdentityToken)),e.AssumedRoleUser!==void 0&&(t.AssumedRoleUser=Qh(e.AssumedRoleUser,n)),e.PackedPolicySize!==void 0&&(t.PackedPolicySize=(0,ee.strictParseInt32)(e.PackedPolicySize)),e.Provider!==void 0&&(t.Provider=(0,ee.expectString)(e.Provider)),e.Audience!==void 0&&(t.Audience=(0,ee.expectString)(e.Audience)),e.SourceIdentity!==void 0&&(t.SourceIdentity=(0,ee.expectString)(e.SourceIdentity)),t},Rc=(e,n)=>{let t={};return e.AccessKeyId!==void 0&&(t.AccessKeyId=(0,ee.expectString)(e.AccessKeyId)),e.SecretAccessKey!==void 0&&(t.SecretAccessKey=(0,ee.expectString)(e.SecretAccessKey)),e.SessionToken!==void 0&&(t.SessionToken=(0,ee.expectString)(e.SessionToken)),e.Expiration!==void 0&&(t.Expiration=(0,ee.expectNonNull)((0,ee.parseRfc3339DateTimeWithOffset)(e.Expiration))),t},O9=(e,n)=>{let t={};return e.DecodedMessage!==void 0&&(t.DecodedMessage=(0,ee.expectString)(e.DecodedMessage)),t},T9=(e,n)=>{let t={};return e.message!==void 0&&(t.message=(0,ee.expectString)(e.message)),t},q9=(e,n)=>{let t={};return e.FederatedUserId!==void 0&&(t.FederatedUserId=(0,ee.expectString)(e.FederatedUserId)),e.Arn!==void 0&&(t.Arn=(0,ee.expectString)(e.Arn)),t},M9=(e,n)=>{let t={};return e.Account!==void 0&&(t.Account=(0,ee.expectString)(e.Account)),t},B9=(e,n)=>{let t={};return e.UserId!==void 0&&(t.UserId=(0,ee.expectString)(e.UserId)),e.Account!==void 0&&(t.Account=(0,ee.expectString)(e.Account)),e.Arn!==void 0&&(t.Arn=(0,ee.expectString)(e.Arn)),t},D9=(e,n)=>{let t={};return e.Credentials!==void 0&&(t.Credentials=Rc(e.Credentials,n)),e.FederatedUser!==void 0&&(t.FederatedUser=q9(e.FederatedUser,n)),e.PackedPolicySize!==void 0&&(t.PackedPolicySize=(0,ee.strictParseInt32)(e.PackedPolicySize)),t},F9=(e,n)=>{let t={};return e.Credentials!==void 0&&(t.Credentials=Rc(e.Credentials,n)),t},L9=(e,n)=>{let t={};return e.message!==void 0&&(t.message=(0,ee.expectString)(e.message)),t},j9=(e,n)=>{let t={};return e.message!==void 0&&(t.message=(0,ee.expectString)(e.message)),t},U9=(e,n)=>{let t={};return e.message!==void 0&&(t.message=(0,ee.expectString)(e.message)),t},z9=(e,n)=>{let t={};return e.message!==void 0&&(t.message=(0,ee.expectString)(e.message)),t},G9=(e,n)=>{let t={};return e.message!==void 0&&(t.message=(0,ee.expectString)(e.message)),t},H9=(e,n)=>{let t={};return e.message!==void 0&&(t.message=(0,ee.expectString)(e.message)),t},$9=(e,n)=>{let t={};return e.message!==void 0&&(t.message=(0,ee.expectString)(e.message)),t},rt=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),K9=(e,n)=>(0,ee.collectBody)(e,n).then(t=>n.utf8Encoder(t)),Sr=(0,ee.withBaseException)(GY.STSServiceException),Er=async(e,n,t,r,o)=>{let{hostname:s,protocol:c="https",port:i,path:u}=await e.endpoint(),l={protocol:c,hostname:s,port:i,method:"POST",path:u.endsWith("/")?u.slice(0,-1)+t:u+t,headers:n};return r!==void 0&&(l.hostname=r),o!==void 0&&(l.body=o),new UY.HttpRequest(l)},br={"content-type":"application/x-www-form-urlencoded"},qn=(e,n)=>K9(e,n).then(t=>{if(t.length){let r=new zY.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(u,l)=>l.trim()===""&&l.includes(` `)?"":void 0});r.addEntity("#xD","\r"),r.addEntity("#10",` `);let o=r.parse(t),s="#text",c=Object.keys(o)[0],i=o[c];return i[s]&&(i[c]=i[s],delete i[s]),(0,ee.getValueFromTextNode)(i)}return{}}),Pr=async(e,n)=>{let t=await qn(e,n);return t.Error&&(t.Error.message=t.Error.message??t.Error.Message),t},vr=e=>Object.entries(e).map(([n,t])=>(0,ee.extendedEncodeURIComponent)(n)+"="+(0,ee.extendedEncodeURIComponent)(t)).join("&"),xr=(e,n)=>{var t;if(((t=n.Error)==null?void 0:t.Code)!==void 0)return n.Error.Code;if(e.statusCode==404)return"NotFound"}});var Ym=m(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.AssumeRoleCommand=Zo.$Command=void 0;var V9=kn(),X9=x(),W9=w(),iq=E();Object.defineProperty(Zo,"$Command",{enumerable:!0,get:function(){return iq.Command}});var Y9=v(),Q9=gr(),sq=Mn(),Jh=class e extends iq.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,W9.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,X9.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,V9.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"AssumeRoleCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:Q9.AssumeRoleResponseFilterSensitiveLog,[Y9.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"AssumeRole"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,sq.se_AssumeRoleCommand)(n,t)}deserialize(n,t){return(0,sq.de_AssumeRoleCommand)(n,t)}};Zo.AssumeRoleCommand=Jh});var Qm=m(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.AssumeRoleWithWebIdentityCommand=es.$Command=void 0;var J9=x(),Z9=w(),dq=E();Object.defineProperty(es,"$Command",{enumerable:!0,get:function(){return dq.Command}});var e7=v(),aq=gr(),cq=Mn(),Zh=class e extends dq.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,Z9.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,J9.getEndpointPlugin)(t,e.getEndpointParameterInstructions()));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"AssumeRoleWithWebIdentityCommand",inputFilterSensitiveLog:aq.AssumeRoleWithWebIdentityRequestFilterSensitiveLog,outputFilterSensitiveLog:aq.AssumeRoleWithWebIdentityResponseFilterSensitiveLog,[e7.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"AssumeRoleWithWebIdentity"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,cq.se_AssumeRoleWithWebIdentityCommand)(n,t)}deserialize(n,t){return(0,cq.de_AssumeRoleWithWebIdentityCommand)(n,t)}};es.AssumeRoleWithWebIdentityCommand=Zh});var eC=m(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.decorateDefaultCredentialProvider=rn.getDefaultRoleAssumerWithWebIdentity=rn.getDefaultRoleAssumer=void 0;var t7=Ym(),n7=Qm(),lq="us-east-1",uq=e=>typeof e!="function"?e===void 0?lq:e:async()=>{try{return await e()}catch{return lq}},r7=(e,n)=>{let t,r;return async(o,s)=>{if(r=o,!t){let{logger:i,region:u,requestHandler:l}=e;t=new n({logger:i,credentialDefaultProvider:()=>async()=>r,region:uq(u||e.region),...l?{requestHandler:l}:{}})}let{Credentials:c}=await t.send(new t7.AssumeRoleCommand(s));if(!c||!c.AccessKeyId||!c.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${s.RoleArn}`);return{accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.SessionToken,expiration:c.Expiration}}};rn.getDefaultRoleAssumer=r7;var o7=(e,n)=>{let t;return async r=>{if(!t){let{logger:s,region:c,requestHandler:i}=e;t=new n({logger:s,region:uq(c||e.region),...i?{requestHandler:i}:{}})}let{Credentials:o}=await t.send(new n7.AssumeRoleWithWebIdentityCommand(r));if(!o||!o.AccessKeyId||!o.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${r.RoleArn}`);return{accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration}}};rn.getDefaultRoleAssumerWithWebIdentity=o7;var s7=e=>n=>e({roleAssumer:(0,rn.getDefaultRoleAssumer)(n,n.stsClientCtor),roleAssumerWithWebIdentity:(0,rn.getDefaultRoleAssumerWithWebIdentity)(n,n.stsClientCtor),...n});rn.decorateDefaultCredentialProvider=s7});var mq=m(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.fromEnv=ot.ENV_EXPIRATION=ot.ENV_SESSION=ot.ENV_SECRET=ot.ENV_KEY=void 0;var i7=Ce();ot.ENV_KEY="AWS_ACCESS_KEY_ID";ot.ENV_SECRET="AWS_SECRET_ACCESS_KEY";ot.ENV_SESSION="AWS_SESSION_TOKEN";ot.ENV_EXPIRATION="AWS_CREDENTIAL_EXPIRATION";var a7=()=>async()=>{let e=process.env[ot.ENV_KEY],n=process.env[ot.ENV_SECRET],t=process.env[ot.ENV_SESSION],r=process.env[ot.ENV_EXPIRATION];if(e&&n)return{accessKeyId:e,secretAccessKey:n,...t&&{sessionToken:t},...r&&{expiration:new Date(r)}};throw new i7.CredentialsProviderError("Unable to find environment variable credentials.")};ot.fromEnv=a7});var nC=m(tC=>{"use strict";Object.defineProperty(tC,"__esModule",{value:!0});var c7=(z(),j(U));c7.__exportStar(mq(),tC)});var Zm=m(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});Jm.httpRequest=void 0;var rC=Ce(),d7=require("buffer"),l7=require("http");function u7(e){return new Promise((n,t)=>{var r;let o=(0,l7.request)({method:"GET",...e,hostname:(r=e.hostname)===null||r===void 0?void 0:r.replace(/^\[(.+)\]$/,"$1")});o.on("error",s=>{t(Object.assign(new rC.ProviderError("Unable to connect to instance metadata service"),s)),o.destroy()}),o.on("timeout",()=>{t(new rC.ProviderError("TimeoutError from instance metadata service")),o.destroy()}),o.on("response",s=>{let{statusCode:c=400}=s;(c<200||300<=c)&&(t(Object.assign(new rC.ProviderError("Error response received from instance metadata service"),{statusCode:c})),o.destroy());let i=[];s.on("data",u=>{i.push(u)}),s.on("end",()=>{n(d7.Buffer.concat(i)),o.destroy()})}),o.end()})}Jm.httpRequest=u7});var oC=m(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.fromImdsCredentials=ts.isImdsCredentials=void 0;var m7=e=>!!e&&typeof e=="object"&&typeof e.AccessKeyId=="string"&&typeof e.SecretAccessKey=="string"&&typeof e.Token=="string"&&typeof e.Expiration=="string";ts.isImdsCredentials=m7;var p7=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration)});ts.fromImdsCredentials=p7});var ep=m(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.providerConfigFromInit=on.DEFAULT_MAX_RETRIES=on.DEFAULT_TIMEOUT=void 0;on.DEFAULT_TIMEOUT=1e3;on.DEFAULT_MAX_RETRIES=0;var f7=({maxRetries:e=on.DEFAULT_MAX_RETRIES,timeout:n=on.DEFAULT_TIMEOUT})=>({maxRetries:e,timeout:n});on.providerConfigFromInit=f7});var sC=m(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});tp.retry=void 0;var _7=(e,n)=>{let t=e();for(let r=0;r{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.fromContainerMetadata=He.ENV_CMDS_AUTH_TOKEN=He.ENV_CMDS_RELATIVE_URI=He.ENV_CMDS_FULL_URI=void 0;var np=Ce(),y7=require("url"),g7=Zm(),pq=oC(),h7=ep(),C7=sC();He.ENV_CMDS_FULL_URI="AWS_CONTAINER_CREDENTIALS_FULL_URI";He.ENV_CMDS_RELATIVE_URI="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";He.ENV_CMDS_AUTH_TOKEN="AWS_CONTAINER_AUTHORIZATION_TOKEN";var S7=(e={})=>{let{timeout:n,maxRetries:t}=(0,h7.providerConfigFromInit)(e);return()=>(0,C7.retry)(async()=>{let r=await x7(),o=JSON.parse(await E7(n,r));if(!(0,pq.isImdsCredentials)(o))throw new np.CredentialsProviderError("Invalid response received from instance metadata service.");return(0,pq.fromImdsCredentials)(o)},t)};He.fromContainerMetadata=S7;var E7=async(e,n)=>(process.env[He.ENV_CMDS_AUTH_TOKEN]&&(n.headers={...n.headers,Authorization:process.env[He.ENV_CMDS_AUTH_TOKEN]}),(await(0,g7.httpRequest)({...n,timeout:e})).toString()),b7="169.254.170.2",P7={localhost:!0,"127.0.0.1":!0},v7={"http:":!0,"https:":!0},x7=async()=>{if(process.env[He.ENV_CMDS_RELATIVE_URI])return{hostname:b7,path:process.env[He.ENV_CMDS_RELATIVE_URI]};if(process.env[He.ENV_CMDS_FULL_URI]){let e=(0,y7.parse)(process.env[He.ENV_CMDS_FULL_URI]);if(!e.hostname||!(e.hostname in P7))throw new np.CredentialsProviderError(`${e.hostname} is not a valid container metadata service hostname`,!1);if(!e.protocol||!(e.protocol in v7))throw new np.CredentialsProviderError(`${e.protocol} is not a valid container metadata service protocol`,!1);return{...e,port:e.port?parseInt(e.port,10):void 0}}throw new np.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${He.ENV_CMDS_RELATIVE_URI} or ${He.ENV_CMDS_FULL_URI} environment variable is set`,!1)}});var _q=m(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});rp.InstanceMetadataV1FallbackError=void 0;var w7=Ce(),iC=class e extends w7.CredentialsProviderError{constructor(n,t=!0){super(n,t),this.tryNextLink=t,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,e.prototype)}};rp.InstanceMetadataV1FallbackError=iC});var yq=m(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.Endpoint=void 0;var k7;(function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"})(k7=Nc.Endpoint||(Nc.Endpoint={}))});var gq=m(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.ENDPOINT_CONFIG_OPTIONS=sn.CONFIG_ENDPOINT_NAME=sn.ENV_ENDPOINT_NAME=void 0;sn.ENV_ENDPOINT_NAME="AWS_EC2_METADATA_SERVICE_ENDPOINT";sn.CONFIG_ENDPOINT_NAME="ec2_metadata_service_endpoint";sn.ENDPOINT_CONFIG_OPTIONS={environmentVariableSelector:e=>e[sn.ENV_ENDPOINT_NAME],configFileSelector:e=>e[sn.CONFIG_ENDPOINT_NAME],default:void 0}});var aC=m(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.EndpointMode=void 0;var A7;(function(e){e.IPv4="IPv4",e.IPv6="IPv6"})(A7=Oc.EndpointMode||(Oc.EndpointMode={}))});var hq=m(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.ENDPOINT_MODE_CONFIG_OPTIONS=an.CONFIG_ENDPOINT_MODE_NAME=an.ENV_ENDPOINT_MODE_NAME=void 0;var I7=aC();an.ENV_ENDPOINT_MODE_NAME="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE";an.CONFIG_ENDPOINT_MODE_NAME="ec2_metadata_service_endpoint_mode";an.ENDPOINT_MODE_CONFIG_OPTIONS={environmentVariableSelector:e=>e[an.ENV_ENDPOINT_MODE_NAME],configFileSelector:e=>e[an.CONFIG_ENDPOINT_MODE_NAME],default:I7.EndpointMode.IPv4}});var dC=m(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});op.getInstanceMetadataEndpoint=void 0;var Sq=en(),R7=Zr(),Cq=yq(),N7=gq(),cC=aC(),O7=hq(),T7=async()=>(0,R7.parseUrl)(await q7()||await M7());op.getInstanceMetadataEndpoint=T7;var q7=async()=>(0,Sq.loadConfig)(N7.ENDPOINT_CONFIG_OPTIONS)(),M7=async()=>{let e=await(0,Sq.loadConfig)(O7.ENDPOINT_MODE_CONFIG_OPTIONS)();switch(e){case cC.EndpointMode.IPv4:return Cq.Endpoint.IPv4;case cC.EndpointMode.IPv6:return Cq.Endpoint.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(cC.EndpointMode)}`)}}});var Eq=m(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});sp.getExtendedInstanceMetadataCredentials=void 0;var B7=5*60,D7=5*60,F7="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",L7=(e,n)=>{var t;let r=B7+Math.floor(Math.random()*D7),o=new Date(Date.now()+r*1e3);n.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: "+F7);let s=(t=e.originalExpiration)!==null&&t!==void 0?t:e.expiration;return{...e,...s?{originalExpiration:s}:{},expiration:o}};sp.getExtendedInstanceMetadataCredentials=L7});var Pq=m(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.staticStabilityProvider=void 0;var bq=Eq(),j7=(e,n={})=>{let t=(n==null?void 0:n.logger)||console,r;return async()=>{let o;try{o=await e(),o.expiration&&o.expiration.getTime(){"use strict";Object.defineProperty(ap,"__esModule",{value:!0});ap.fromInstanceMetadata=void 0;var U7=en(),Aq=Ce(),z7=_q(),uC=Zm(),vq=oC(),G7=ep(),xq=sC(),H7=dC(),$7=Pq(),Iq="/latest/meta-data/iam/security-credentials/",K7="/latest/api/token",lC="AWS_EC2_METADATA_V1_DISABLED",wq="ec2_metadata_v1_disabled",kq="x-aws-ec2-metadata-token",V7=(e={})=>(0,$7.staticStabilityProvider)(X7(e),{logger:e.logger});ap.fromInstanceMetadata=V7;var X7=e=>{let n=!1,{logger:t,profile:r}=e,{timeout:o,maxRetries:s}=(0,G7.providerConfigFromInit)(e),c=async(i,u)=>{var l;if(n||((l=u.headers)===null||l===void 0?void 0:l[kq])==null){let y=!1,C=!1,b=await(0,U7.loadConfig)({environmentVariableSelector:A=>{let k=A[lC];if(C=!!k&&k!=="false",k===void 0)throw new Aq.CredentialsProviderError(`${lC} not set in env, checking config file next.`);return C},configFileSelector:A=>{let k=A[wq];return y=!!k&&k!=="false",y},default:!1},{profile:r})();if(e.ec2MetadataV1Disabled||b){let A=[];throw e.ec2MetadataV1Disabled&&A.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),y&&A.push(`config file profile (${wq})`),C&&A.push(`process environment variable (${lC})`),new z7.InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${A.join(", ")}].`)}}let _=(await(0,xq.retry)(async()=>{let y;try{y=await Y7(u)}catch(C){throw C.statusCode===401&&(n=!1),C}return y},i)).trim();return(0,xq.retry)(async()=>{let y;try{y=await Q7(_,u)}catch(C){throw C.statusCode===401&&(n=!1),C}return y},i)};return async()=>{let i=await(0,H7.getInstanceMetadataEndpoint)();if(n)return t==null||t.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),c(s,{...i,timeout:o});{let u;try{u=(await W7({...i,timeout:o})).toString()}catch(l){if((l==null?void 0:l.statusCode)===400)throw Object.assign(l,{message:"EC2 Metadata token request returned error"});return(l.message==="TimeoutError"||[403,404,405].includes(l.statusCode))&&(n=!0),t==null||t.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),c(s,{...i,timeout:o})}return c(s,{...i,headers:{[kq]:u},timeout:o})}}},W7=async e=>(0,uC.httpRequest)({...e,path:K7,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Y7=async e=>(await(0,uC.httpRequest)({...e,path:Iq})).toString(),Q7=async(e,n)=>{let t=JSON.parse((await(0,uC.httpRequest)({...n,path:Iq+e})).toString());if(!(0,vq.isImdsCredentials)(t))throw new Aq.CredentialsProviderError("Invalid response received from instance metadata service.");return(0,vq.fromImdsCredentials)(t)}});var Oq=m(Nq=>{"use strict";Object.defineProperty(Nq,"__esModule",{value:!0})});var dp=m(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.getInstanceMetadataEndpoint=cn.httpRequest=void 0;var cp=(z(),j(U));cp.__exportStar(fq(),cn);cp.__exportStar(Rq(),cn);cp.__exportStar(ep(),cn);cp.__exportStar(Oq(),cn);var J7=Zm();Object.defineProperty(cn,"httpRequest",{enumerable:!0,get:function(){return J7.httpRequest}});var Z7=dC();Object.defineProperty(cn,"getInstanceMetadataEndpoint",{enumerable:!0,get:function(){return Z7.getInstanceMetadataEndpoint}})});var qq=m(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});lp.resolveCredentialSource=void 0;var eQ=nC(),Tq=dp(),tQ=Ce(),nQ=(e,n)=>{let t={EcsContainer:Tq.fromContainerMetadata,Ec2InstanceMetadata:Tq.fromInstanceMetadata,Environment:eQ.fromEnv};if(e in t)return t[e]();throw new tQ.CredentialsProviderError(`Unsupported credential source in profile ${n}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`)};lp.resolveCredentialSource=nQ});var Mq=m(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.resolveAssumeRoleCredentials=ns.isAssumeRoleProfile=void 0;var mC=Ce(),rQ=Dt(),oQ=qq(),sQ=pC(),iQ=e=>!!e&&typeof e=="object"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(aQ(e)||cQ(e));ns.isAssumeRoleProfile=iQ;var aQ=e=>typeof e.source_profile=="string"&&typeof e.credential_source>"u",cQ=e=>typeof e.credential_source=="string"&&typeof e.source_profile>"u",dQ=async(e,n,t,r={})=>{let o=n[e];if(!t.roleAssumer)throw new mC.CredentialsProviderError(`Profile ${e} requires a role to be assumed, but no role assumption callback was provided.`,!1);let{source_profile:s}=o;if(s&&s in r)throw new mC.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${(0,rQ.getProfileName)(t)}. Profiles visited: `+Object.keys(r).join(", "),!1);let c=s?(0,sQ.resolveProfileData)(s,n,t,{...r,[s]:!0}):(0,oQ.resolveCredentialSource)(o.credential_source,e)(),i={RoleArn:o.role_arn,RoleSessionName:o.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:o.external_id,DurationSeconds:parseInt(o.duration_seconds||"3600",10)},{mfa_serial:u}=o;if(u){if(!t.mfaCodeProvider)throw new mC.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,!1);i.SerialNumber=u,i.TokenCode=await t.mfaCodeProvider(u)}let l=await c;return t.roleAssumer(l,i)};ns.resolveAssumeRoleCredentials=dQ});var Bq=m(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.getValidatedProcessCredentials=void 0;var lQ=(e,n)=>{if(n.Version!==1)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(n.Expiration){let t=new Date;if(new Date(n.Expiration){"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.resolveProcessCredentials=void 0;var fC=Ce(),uQ=require("child_process"),mQ=require("util"),pQ=Bq(),fQ=async(e,n)=>{let t=n[e];if(n[e]){let r=t.credential_process;if(r!==void 0){let o=(0,mQ.promisify)(uQ.exec);try{let{stdout:s}=await o(r),c;try{c=JSON.parse(s.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return(0,pQ.getValidatedProcessCredentials)(e,c)}catch(s){throw new fC.CredentialsProviderError(s.message)}}else throw new fC.CredentialsProviderError(`Profile ${e} did not contain credential_process.`)}else throw new fC.CredentialsProviderError(`Profile ${e} could not be found in shared credentials file.`)};mp.resolveProcessCredentials=fQ});var Lq=m(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.fromProcess=void 0;var Fq=Dt(),_Q=Dq(),yQ=(e={})=>async()=>{let n=await(0,Fq.parseKnownFiles)(e);return(0,_Q.resolveProcessCredentials)((0,Fq.getProfileName)(e),n)};pp.fromProcess=yQ});var yC=m(_C=>{"use strict";Object.defineProperty(_C,"__esModule",{value:!0});var gQ=(z(),j(U));gQ.__exportStar(Lq(),_C)});var jq=m(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.resolveProcessCredentials=rs.isProcessProfile=void 0;var hQ=yC(),CQ=e=>!!e&&typeof e=="object"&&typeof e.credential_process=="string";rs.isProcessProfile=CQ;var SQ=async(e,n)=>(0,hQ.fromProcess)({...e,profile:n})();rs.resolveProcessCredentials=SQ});var gC=m(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.isSsoProfile=void 0;var EQ=e=>e&&(typeof e.sso_start_url=="string"||typeof e.sso_account_id=="string"||typeof e.sso_session=="string"||typeof e.sso_region=="string"||typeof e.sso_role_name=="string");fp.isSsoProfile=EQ});var Uq=m(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p.resolveClientEndpointParameters=void 0;var bQ=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"});_p.resolveClientEndpointParameters=bQ});var zq=m((cOe,PQ)=>{PQ.exports={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.421.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"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/middleware-host-header":"3.418.0","@aws-sdk/middleware-logger":"3.418.0","@aws-sdk/middleware-recursion-detection":"3.418.0","@aws-sdk/middleware-user-agent":"3.418.0","@aws-sdk/region-config-resolver":"3.418.0","@aws-sdk/types":"3.418.0","@aws-sdk/util-endpoints":"3.418.0","@aws-sdk/util-user-agent-browser":"3.418.0","@aws-sdk/util-user-agent-node":"3.418.0","@smithy/config-resolver":"^2.0.10","@smithy/fetch-http-handler":"^2.1.5","@smithy/hash-node":"^2.0.9","@smithy/invalid-dependency":"^2.0.9","@smithy/middleware-content-length":"^2.0.11","@smithy/middleware-endpoint":"^2.0.9","@smithy/middleware-retry":"^2.0.12","@smithy/middleware-serde":"^2.0.9","@smithy/middleware-stack":"^2.0.2","@smithy/node-config-provider":"^2.0.12","@smithy/node-http-handler":"^2.1.5","@smithy/protocol-http":"^3.0.5","@smithy/smithy-client":"^2.1.6","@smithy/types":"^2.3.3","@smithy/url-parser":"^2.0.9","@smithy/util-base64":"^2.0.0","@smithy/util-body-length-browser":"^2.0.0","@smithy/util-body-length-node":"^2.1.0","@smithy/util-defaults-mode-browser":"^2.0.10","@smithy/util-defaults-mode-node":"^2.0.12","@smithy/util-retry":"^2.0.2","@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",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var Hq=m((yp,Gq)=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});yp.isCrtAvailable=void 0;var vQ=()=>{try{return typeof require=="function"&&typeof Gq<"u"&&require("aws-crt")?["md/crt-avail"]:null}catch{return null}};yp.isCrtAvailable=vQ});var Tc=m(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.defaultUserAgent=dn.UA_APP_ID_INI_NAME=dn.UA_APP_ID_ENV_NAME=void 0;var xQ=en(),$q=require("os"),hC=require("process"),wQ=Hq();dn.UA_APP_ID_ENV_NAME="AWS_SDK_UA_APP_ID";dn.UA_APP_ID_INI_NAME="sdk-ua-app-id";var kQ=({serviceId:e,clientVersion:n})=>{let t=[["aws-sdk-js",n],["ua","2.0"],[`os/${(0,$q.platform)()}`,(0,$q.release)()],["lang/js"],["md/nodejs",`${hC.versions.node}`]],r=(0,wQ.isCrtAvailable)();r&&t.push(r),e&&t.push([`api/${e}`,n]),hC.env.AWS_EXECUTION_ENV&&t.push([`exec-env/${hC.env.AWS_EXECUTION_ENV}`]);let o=(0,xQ.loadConfig)({environmentVariableSelector:c=>c[dn.UA_APP_ID_ENV_NAME],configFileSelector:c=>c[dn.UA_APP_ID_INI_NAME],default:void 0})(),s;return async()=>{if(!s){let c=await o;s=c?[...t,[`app/${c}`]]:[...t]}return s}};dn.defaultUserAgent=kQ});var qc=m(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});gp.Hash=void 0;var CC=Gr(),AQ=Pt(),IQ=require("buffer"),Kq=require("crypto"),SC=class{constructor(n,t){this.algorithmIdentifier=n,this.secret=t,this.reset()}update(n,t){this.hash.update((0,AQ.toUint8Array)(Vq(n,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?(0,Kq.createHmac)(this.algorithmIdentifier,Vq(this.secret)):(0,Kq.createHash)(this.algorithmIdentifier)}};gp.Hash=SC;function Vq(e,n){return IQ.Buffer.isBuffer(e)?e:typeof e=="string"?(0,CC.fromString)(e,n):ArrayBuffer.isView(e)?(0,CC.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength):(0,CC.fromArrayBuffer)(e)}});var Wq=m(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.calculateBodyLength=void 0;var Xq=require("fs"),RQ=e=>{if(!e)return 0;if(typeof e=="string")return Buffer.from(e).length;if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size;if(typeof e.start=="number"&&typeof e.end=="number")return e.end+1-e.start;if(typeof e.path=="string"||Buffer.isBuffer(e.path))return(0,Xq.lstatSync)(e.path).size;if(typeof e.fd=="number")return(0,Xq.fstatSync)(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)};hp.calculateBodyLength=RQ});var Mc=m(EC=>{"use strict";Object.defineProperty(EC,"__esModule",{value:!0});var NQ=(z(),j(U));NQ.__exportStar(Wq(),EC)});var c1=m(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});Cp.ruleSet=void 0;var s1="required",Dn="fn",Fn="argv",ss="ref",Yq="isSet",Bn="tree",os="error",Bc="endpoint",bC="PartitionResult",Qq={[s1]:!1,type:"String"},Jq={[s1]:!0,default:!1,type:"Boolean"},Zq={[ss]:"Endpoint"},i1={[Dn]:"booleanEquals",[Fn]:[{[ss]:"UseFIPS"},!0]},a1={[Dn]:"booleanEquals",[Fn]:[{[ss]:"UseDualStack"},!0]},ln={},e1={[Dn]:"booleanEquals",[Fn]:[!0,{[Dn]:"getAttr",[Fn]:[{[ss]:bC},"supportsFIPS"]}]},t1={[Dn]:"booleanEquals",[Fn]:[!0,{[Dn]:"getAttr",[Fn]:[{[ss]:bC},"supportsDualStack"]}]},n1=[i1],r1=[a1],o1=[{[ss]:"Region"}],OQ={version:"1.0",parameters:{Region:Qq,UseDualStack:Jq,UseFIPS:Jq,Endpoint:Qq},rules:[{conditions:[{[Dn]:Yq,[Fn]:[Zq]}],type:Bn,rules:[{conditions:n1,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:os},{conditions:r1,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:os},{endpoint:{url:Zq,properties:ln,headers:ln},type:Bc}]},{conditions:[{[Dn]:Yq,[Fn]:o1}],type:Bn,rules:[{conditions:[{[Dn]:"aws.partition",[Fn]:o1,assign:bC}],type:Bn,rules:[{conditions:[i1,a1],type:Bn,rules:[{conditions:[e1,t1],type:Bn,rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ln,headers:ln},type:Bc}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:os}]},{conditions:n1,type:Bn,rules:[{conditions:[e1],type:Bn,rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ln,headers:ln},type:Bc}]},{error:"FIPS is enabled but this partition does not support FIPS",type:os}]},{conditions:r1,type:Bn,rules:[{conditions:[t1],type:Bn,rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ln,headers:ln},type:Bc}]},{error:"DualStack is enabled but this partition does not support DualStack",type:os}]},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:ln,headers:ln},type:Bc}]}]},{error:"Invalid Configuration: Missing Region",type:os}]};Cp.ruleSet=OQ});var d1=m(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.defaultEndpointResolver=void 0;var TQ=Ko(),qQ=c1(),MQ=(e,n={})=>(0,TQ.resolveEndpoint)(qQ.ruleSet,{endpointParams:e,logger:n.logger});Sp.defaultEndpointResolver=MQ});var m1=m(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.getRuntimeConfig=void 0;var BQ=E(),DQ=Zr(),l1=Po(),u1=Pt(),FQ=d1(),LQ=e=>({apiVersion:"2019-06-10",base64Decoder:(e==null?void 0:e.base64Decoder)??l1.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??l1.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??FQ.defaultEndpointResolver,extensions:(e==null?void 0:e.extensions)??[],logger:(e==null?void 0:e.logger)??new BQ.NoOpLogger,serviceId:(e==null?void 0:e.serviceId)??"SSO",urlParser:(e==null?void 0:e.urlParser)??DQ.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??u1.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??u1.toUtf8});Ep.getRuntimeConfig=LQ});var p1=m(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.IMDS_REGION_PATH=ft.DEFAULTS_MODE_OPTIONS=ft.ENV_IMDS_DISABLED=ft.AWS_DEFAULT_REGION_ENV=ft.AWS_REGION_ENV=ft.AWS_EXECUTION_ENV=void 0;ft.AWS_EXECUTION_ENV="AWS_EXECUTION_ENV";ft.AWS_REGION_ENV="AWS_REGION";ft.AWS_DEFAULT_REGION_ENV="AWS_DEFAULT_REGION";ft.ENV_IMDS_DISABLED="AWS_EC2_METADATA_DISABLED";ft.DEFAULTS_MODE_OPTIONS=["in-region","cross-region","mobile","standard","legacy"];ft.IMDS_REGION_PATH="/latest/meta-data/placement/region"});var f1=m(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});bp.NODE_DEFAULTS_MODE_CONFIG_OPTIONS=void 0;var jQ="AWS_DEFAULTS_MODE",UQ="defaults_mode";bp.NODE_DEFAULTS_MODE_CONFIG_OPTIONS={environmentVariableSelector:e=>e[jQ],configFileSelector:e=>e[UQ],default:"legacy"}});var g1=m(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.resolveDefaultsModeConfig=void 0;var zQ=Qt(),_1=dp(),y1=en(),GQ=Ce(),wr=p1(),HQ=f1(),$Q=({region:e=(0,y1.loadConfig)(zQ.NODE_REGION_CONFIG_OPTIONS),defaultsMode:n=(0,y1.loadConfig)(HQ.NODE_DEFAULTS_MODE_CONFIG_OPTIONS)}={})=>(0,GQ.memoize)(async()=>{let t=typeof n=="function"?await n():n;switch(t==null?void 0:t.toLowerCase()){case"auto":return KQ(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(t==null?void 0:t.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${wr.DEFAULTS_MODE_OPTIONS.join(", ")}, got ${t}`)}});Pp.resolveDefaultsModeConfig=$Q;var KQ=async e=>{if(e){let n=typeof e=="function"?await e():e,t=await VQ();return t?n===t?"in-region":"cross-region":"standard"}return"standard"},VQ=async()=>{var e;if(process.env[wr.AWS_EXECUTION_ENV]&&(process.env[wr.AWS_REGION_ENV]||process.env[wr.AWS_DEFAULT_REGION_ENV]))return(e=process.env[wr.AWS_REGION_ENV])!==null&&e!==void 0?e:process.env[wr.AWS_DEFAULT_REGION_ENV];if(!process.env[wr.ENV_IMDS_DISABLED])try{let n=await(0,_1.getInstanceMetadataEndpoint)();return(await(0,_1.httpRequest)({...n,path:wr.IMDS_REGION_PATH})).toString()}catch{}}});var Dc=m(PC=>{"use strict";Object.defineProperty(PC,"__esModule",{value:!0});var XQ=(z(),j(U));XQ.__exportStar(g1(),PC)});var S1=m(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});xp.getRuntimeConfig=void 0;var WQ=(z(),j(U)),YQ=WQ.__importDefault(zq()),QQ=Tc(),vp=Qt(),JQ=qc(),h1=On(),Fc=en(),C1=wo(),ZQ=Mc(),eJ=Rt(),tJ=m1(),nJ=E(),rJ=Dc(),oJ=E(),sJ=e=>{(0,oJ.emitWarningIfUnsupportedVersion)(process.version);let n=(0,rJ.resolveDefaultsModeConfig)(e),t=()=>n().then(nJ.loadConfigsForDefaultMode),r=(0,tJ.getRuntimeConfig)(e);return{...r,...e,runtime:"node",defaultsMode:n,bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??ZQ.calculateBodyLength,defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,QQ.defaultUserAgent)({serviceId:r.serviceId,clientVersion:YQ.default.version}),maxAttempts:(e==null?void 0:e.maxAttempts)??(0,Fc.loadConfig)(h1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),region:(e==null?void 0:e.region)??(0,Fc.loadConfig)(vp.NODE_REGION_CONFIG_OPTIONS,vp.NODE_REGION_CONFIG_FILE_OPTIONS),requestHandler:(e==null?void 0:e.requestHandler)??new C1.NodeHttpHandler(t),retryMode:(e==null?void 0:e.retryMode)??(0,Fc.loadConfig)({...h1.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await t()).retryMode||eJ.DEFAULT_RETRY_MODE}),sha256:(e==null?void 0:e.sha256)??JQ.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??C1.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,Fc.loadConfig)(vp.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,Fc.loadConfig)(vp.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)}};xp.getRuntimeConfig=sJ});var E1=m(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.resolveAwsRegionExtensionConfiguration=is.getAwsRegionExtensionConfiguration=void 0;var iJ=e=>{let n=async()=>{if(e.region===void 0)throw new Error("Region is missing from runtimeConfig");let t=e.region;return typeof t=="string"?t:t()};return{setRegion(t){n=t},region(){return n}}};is.getAwsRegionExtensionConfiguration=iJ;var aJ=e=>({region:e.region()});is.resolveAwsRegionExtensionConfiguration=aJ});var b1=m(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.NODE_REGION_CONFIG_FILE_OPTIONS=Nt.NODE_REGION_CONFIG_OPTIONS=Nt.REGION_INI_NAME=Nt.REGION_ENV_NAME=void 0;Nt.REGION_ENV_NAME="AWS_REGION";Nt.REGION_INI_NAME="region";Nt.NODE_REGION_CONFIG_OPTIONS={environmentVariableSelector:e=>e[Nt.REGION_ENV_NAME],configFileSelector:e=>e[Nt.REGION_INI_NAME],default:()=>{throw new Error("Region is missing")}};Nt.NODE_REGION_CONFIG_FILE_OPTIONS={preferredFile:"credentials"}});var vC=m(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.isFipsRegion=void 0;var cJ=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips"));wp.isFipsRegion=cJ});var P1=m(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});kp.getRealRegion=void 0;var dJ=vC(),lJ=e=>(0,dJ.isFipsRegion)(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;kp.getRealRegion=lJ});var x1=m(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.resolveRegionConfig=void 0;var v1=P1(),uJ=vC(),mJ=e=>{let{region:n,useFipsEndpoint:t}=e;if(!n)throw new Error("Region is missing");return{...e,region:async()=>{if(typeof n=="string")return(0,v1.getRealRegion)(n);let r=await n();return(0,v1.getRealRegion)(r)},useFipsEndpoint:async()=>{let r=typeof n=="string"?n:await n();return(0,uJ.isFipsRegion)(r)?!0:typeof t!="function"?Promise.resolve(!!t):t()}}};Ap.resolveRegionConfig=mJ});var k1=m(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var w1=(z(),j(U));w1.__exportStar(b1(),Ip);w1.__exportStar(x1(),Ip)});var Np=m(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});var A1=(z(),j(U));A1.__exportStar(E1(),Rp);A1.__exportStar(k1(),Rp)});var O1=m(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});Op.resolveRuntimeExtensions=void 0;var I1=Np(),R1=we(),N1=E(),xC=e=>e,pJ=(e,n)=>{let t={...xC((0,I1.getAwsRegionExtensionConfiguration)(e)),...xC((0,N1.getDefaultExtensionConfiguration)(e)),...xC((0,R1.getHttpHandlerExtensionConfiguration)(e))};return n.forEach(r=>r.configure(t)),{...e,...(0,I1.resolveAwsRegionExtensionConfiguration)(t),...(0,N1.resolveDefaultRuntimeConfig)(t),...(0,R1.resolveHttpHandlerRuntimeConfig)(t)}};Op.resolveRuntimeExtensions=pJ});var Lc=m(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.SSOClient=as.__Client=void 0;var T1=Ka(),fJ=Va(),_J=Xa(),q1=pc(),yJ=Qt(),gJ=gc(),hJ=x(),M1=On(),B1=E();Object.defineProperty(as,"__Client",{enumerable:!0,get:function(){return B1.Client}});var CJ=Uq(),SJ=S1(),EJ=O1(),wC=class extends B1.Client{constructor(...[n]){let t=(0,SJ.getRuntimeConfig)(n||{}),r=(0,CJ.resolveClientEndpointParameters)(t),o=(0,yJ.resolveRegionConfig)(r),s=(0,hJ.resolveEndpointConfig)(o),c=(0,M1.resolveRetryConfig)(s),i=(0,T1.resolveHostHeaderConfig)(c),u=(0,q1.resolveUserAgentConfig)(i),l=(0,EJ.resolveRuntimeExtensions)(u,(n==null?void 0:n.extensions)||[]);super(l),this.config=l,this.middlewareStack.use((0,M1.getRetryPlugin)(this.config)),this.middlewareStack.use((0,gJ.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,T1.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,fJ.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,_J.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,q1.getUserAgentPlugin)(this.config))}destroy(){super.destroy()}};as.SSOClient=wC});var Tp=m(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.SSOServiceException=cs.__ServiceException=void 0;var D1=E();Object.defineProperty(cs,"__ServiceException",{enumerable:!0,get:function(){return D1.ServiceException}});var kC=class e extends D1.ServiceException{constructor(n){super(n),Object.setPrototypeOf(this,e.prototype)}};cs.SSOServiceException=kC});var ao=m(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.LogoutRequestFilterSensitiveLog=Re.ListAccountsRequestFilterSensitiveLog=Re.ListAccountRolesRequestFilterSensitiveLog=Re.GetRoleCredentialsResponseFilterSensitiveLog=Re.RoleCredentialsFilterSensitiveLog=Re.GetRoleCredentialsRequestFilterSensitiveLog=Re.UnauthorizedException=Re.TooManyRequestsException=Re.ResourceNotFoundException=Re.InvalidRequestException=void 0;var ds=E(),qp=Tp(),AC=class e extends qp.SSOServiceException{constructor(n){super({name:"InvalidRequestException",$fault:"client",...n}),this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};Re.InvalidRequestException=AC;var IC=class e extends qp.SSOServiceException{constructor(n){super({name:"ResourceNotFoundException",$fault:"client",...n}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};Re.ResourceNotFoundException=IC;var RC=class e extends qp.SSOServiceException{constructor(n){super({name:"TooManyRequestsException",$fault:"client",...n}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};Re.TooManyRequestsException=RC;var NC=class e extends qp.SSOServiceException{constructor(n){super({name:"UnauthorizedException",$fault:"client",...n}),this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};Re.UnauthorizedException=NC;var bJ=e=>({...e,...e.accessToken&&{accessToken:ds.SENSITIVE_STRING}});Re.GetRoleCredentialsRequestFilterSensitiveLog=bJ;var PJ=e=>({...e,...e.secretAccessKey&&{secretAccessKey:ds.SENSITIVE_STRING},...e.sessionToken&&{sessionToken:ds.SENSITIVE_STRING}});Re.RoleCredentialsFilterSensitiveLog=PJ;var vJ=e=>({...e,...e.roleCredentials&&{roleCredentials:(0,Re.RoleCredentialsFilterSensitiveLog)(e.roleCredentials)}});Re.GetRoleCredentialsResponseFilterSensitiveLog=vJ;var xJ=e=>({...e,...e.accessToken&&{accessToken:ds.SENSITIVE_STRING}});Re.ListAccountRolesRequestFilterSensitiveLog=xJ;var wJ=e=>({...e,...e.accessToken&&{accessToken:ds.SENSITIVE_STRING}});Re.ListAccountsRequestFilterSensitiveLog=wJ;var kJ=e=>({...e,...e.accessToken&&{accessToken:ds.SENSITIVE_STRING}});Re.LogoutRequestFilterSensitiveLog=kJ});var jc=m($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.de_LogoutCommand=$e.de_ListAccountsCommand=$e.de_ListAccountRolesCommand=$e.de_GetRoleCredentialsCommand=$e.se_LogoutCommand=$e.se_ListAccountsCommand=$e.se_ListAccountRolesCommand=$e.se_GetRoleCredentialsCommand=void 0;var Mp=we(),te=E(),Bp=ao(),AJ=Tp(),IJ=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,te.map)({},Up,{"x-amz-sso_bearer_token":e.accessToken}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/federation/credentials`,u=(0,te.map)({role_name:[,(0,te.expectNonNull)(e.roleName,"roleName")],account_id:[,(0,te.expectNonNull)(e.accountId,"accountId")]}),l;return new Mp.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};$e.se_GetRoleCredentialsCommand=IJ;var RJ=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,te.map)({},Up,{"x-amz-sso_bearer_token":e.accessToken}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/assignment/roles`,u=(0,te.map)({next_token:[,e.nextToken],max_result:[()=>e.maxResults!==void 0,()=>e.maxResults.toString()],account_id:[,(0,te.expectNonNull)(e.accountId,"accountId")]}),l;return new Mp.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};$e.se_ListAccountRolesCommand=RJ;var NJ=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,te.map)({},Up,{"x-amz-sso_bearer_token":e.accessToken}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/assignment/accounts`,u=(0,te.map)({next_token:[,e.nextToken],max_result:[()=>e.maxResults!==void 0,()=>e.maxResults.toString()]}),l;return new Mp.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};$e.se_ListAccountsCommand=NJ;var OJ=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,te.map)({},Up,{"x-amz-sso_bearer_token":e.accessToken}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/logout`,u;return new Mp.HttpRequest({protocol:r,hostname:t,port:o,method:"POST",headers:c,path:i,body:u})};$e.se_LogoutCommand=OJ;var TJ=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return qJ(e,n);let t=(0,te.map)({$metadata:kr(e)}),r=(0,te.expectNonNull)((0,te.expectObject)(await zp(e.body,n)),"body"),o=(0,te.take)(r,{roleCredentials:te._json});return Object.assign(t,o),t};$e.de_GetRoleCredentialsCommand=TJ;var qJ=async(e,n)=>{let t={...e,body:await Gp(e.body,n)},r=Hp(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await Fp(t,n);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await OC(t,n);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Lp(t,n);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await jp(t,n);default:let o=t.body;return Dp({output:e,parsedBody:o,errorCode:r})}},MJ=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return BJ(e,n);let t=(0,te.map)({$metadata:kr(e)}),r=(0,te.expectNonNull)((0,te.expectObject)(await zp(e.body,n)),"body"),o=(0,te.take)(r,{nextToken:te.expectString,roleList:te._json});return Object.assign(t,o),t};$e.de_ListAccountRolesCommand=MJ;var BJ=async(e,n)=>{let t={...e,body:await Gp(e.body,n)},r=Hp(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await Fp(t,n);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await OC(t,n);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Lp(t,n);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await jp(t,n);default:let o=t.body;return Dp({output:e,parsedBody:o,errorCode:r})}},DJ=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return FJ(e,n);let t=(0,te.map)({$metadata:kr(e)}),r=(0,te.expectNonNull)((0,te.expectObject)(await zp(e.body,n)),"body"),o=(0,te.take)(r,{accountList:te._json,nextToken:te.expectString});return Object.assign(t,o),t};$e.de_ListAccountsCommand=DJ;var FJ=async(e,n)=>{let t={...e,body:await Gp(e.body,n)},r=Hp(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await Fp(t,n);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await OC(t,n);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Lp(t,n);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await jp(t,n);default:let o=t.body;return Dp({output:e,parsedBody:o,errorCode:r})}},LJ=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return jJ(e,n);let t=(0,te.map)({$metadata:kr(e)});return await(0,te.collectBody)(e.body,n),t};$e.de_LogoutCommand=LJ;var jJ=async(e,n)=>{let t={...e,body:await Gp(e.body,n)},r=Hp(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await Fp(t,n);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Lp(t,n);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await jp(t,n);default:let o=t.body;return Dp({output:e,parsedBody:o,errorCode:r})}},Dp=(0,te.withBaseException)(AJ.SSOServiceException),Fp=async(e,n)=>{let t=(0,te.map)({}),r=e.body,o=(0,te.take)(r,{message:te.expectString});Object.assign(t,o);let s=new Bp.InvalidRequestException({$metadata:kr(e),...t});return(0,te.decorateServiceException)(s,e.body)},OC=async(e,n)=>{let t=(0,te.map)({}),r=e.body,o=(0,te.take)(r,{message:te.expectString});Object.assign(t,o);let s=new Bp.ResourceNotFoundException({$metadata:kr(e),...t});return(0,te.decorateServiceException)(s,e.body)},Lp=async(e,n)=>{let t=(0,te.map)({}),r=e.body,o=(0,te.take)(r,{message:te.expectString});Object.assign(t,o);let s=new Bp.TooManyRequestsException({$metadata:kr(e),...t});return(0,te.decorateServiceException)(s,e.body)},jp=async(e,n)=>{let t=(0,te.map)({}),r=e.body,o=(0,te.take)(r,{message:te.expectString});Object.assign(t,o);let s=new Bp.UnauthorizedException({$metadata:kr(e),...t});return(0,te.decorateServiceException)(s,e.body)},kr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),UJ=(e,n)=>(0,te.collectBody)(e,n).then(t=>n.utf8Encoder(t)),Up=e=>e!=null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),zp=(e,n)=>UJ(e,n).then(t=>t.length?JSON.parse(t):{}),Gp=async(e,n)=>{let t=await zp(e,n);return t.message=t.message??t.Message,t},Hp=(e,n)=>{let t=(s,c)=>Object.keys(s).find(i=>i.toLowerCase()===c.toLowerCase()),r=s=>{let c=s;return typeof c=="number"&&(c=c.toString()),c.indexOf(",")>=0&&(c=c.split(",")[0]),c.indexOf(":")>=0&&(c=c.split(":")[0]),c.indexOf("#")>=0&&(c=c.split("#")[1]),c},o=t(e.headers,"x-amzn-errortype");if(o!==void 0)return r(e.headers[o]);if(n.code!==void 0)return r(n.code);if(n.__type!==void 0)return r(n.__type)}});var qC=m(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.GetRoleCredentialsCommand=ls.$Command=void 0;var zJ=x(),GJ=w(),j1=E();Object.defineProperty(ls,"$Command",{enumerable:!0,get:function(){return j1.Command}});var HJ=v(),F1=ao(),L1=jc(),TC=class e extends j1.Command{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,GJ.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,zJ.getEndpointPlugin)(t,e.getEndpointParameterInstructions()));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"SSOClient",commandName:"GetRoleCredentialsCommand",inputFilterSensitiveLog:F1.GetRoleCredentialsRequestFilterSensitiveLog,outputFilterSensitiveLog:F1.GetRoleCredentialsResponseFilterSensitiveLog,[HJ.SMITHY_CONTEXT_KEY]:{service:"SWBPortalService",operation:"GetRoleCredentials"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,L1.se_GetRoleCredentialsCommand)(n,t)}deserialize(n,t){return(0,L1.de_GetRoleCredentialsCommand)(n,t)}};ls.GetRoleCredentialsCommand=TC});var $p=m(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.ListAccountRolesCommand=us.$Command=void 0;var $J=x(),KJ=w(),z1=E();Object.defineProperty(us,"$Command",{enumerable:!0,get:function(){return z1.Command}});var VJ=v(),XJ=ao(),U1=jc(),MC=class e extends z1.Command{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,KJ.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,$J.getEndpointPlugin)(t,e.getEndpointParameterInstructions()));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"SSOClient",commandName:"ListAccountRolesCommand",inputFilterSensitiveLog:XJ.ListAccountRolesRequestFilterSensitiveLog,outputFilterSensitiveLog:a=>a,[VJ.SMITHY_CONTEXT_KEY]:{service:"SWBPortalService",operation:"ListAccountRoles"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,U1.se_ListAccountRolesCommand)(n,t)}deserialize(n,t){return(0,U1.de_ListAccountRolesCommand)(n,t)}};us.ListAccountRolesCommand=MC});var Kp=m(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.ListAccountsCommand=ms.$Command=void 0;var WJ=x(),YJ=w(),H1=E();Object.defineProperty(ms,"$Command",{enumerable:!0,get:function(){return H1.Command}});var QJ=v(),JJ=ao(),G1=jc(),BC=class e extends H1.Command{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,YJ.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,WJ.getEndpointPlugin)(t,e.getEndpointParameterInstructions()));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"SSOClient",commandName:"ListAccountsCommand",inputFilterSensitiveLog:JJ.ListAccountsRequestFilterSensitiveLog,outputFilterSensitiveLog:a=>a,[QJ.SMITHY_CONTEXT_KEY]:{service:"SWBPortalService",operation:"ListAccounts"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,G1.se_ListAccountsCommand)(n,t)}deserialize(n,t){return(0,G1.de_ListAccountsCommand)(n,t)}};ms.ListAccountsCommand=BC});var FC=m(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});ps.LogoutCommand=ps.$Command=void 0;var ZJ=x(),eZ=w(),K1=E();Object.defineProperty(ps,"$Command",{enumerable:!0,get:function(){return K1.Command}});var tZ=v(),nZ=ao(),$1=jc(),DC=class e extends K1.Command{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,eZ.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ZJ.getEndpointPlugin)(t,e.getEndpointParameterInstructions()));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"SSOClient",commandName:"LogoutCommand",inputFilterSensitiveLog:nZ.LogoutRequestFilterSensitiveLog,outputFilterSensitiveLog:a=>a,[tZ.SMITHY_CONTEXT_KEY]:{service:"SWBPortalService",operation:"Logout"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,$1.se_LogoutCommand)(n,t)}deserialize(n,t){return(0,$1.de_LogoutCommand)(n,t)}};ps.LogoutCommand=DC});var V1=m(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});Xp.SSO=void 0;var rZ=E(),oZ=qC(),sZ=$p(),iZ=Kp(),aZ=FC(),cZ=Lc(),dZ={GetRoleCredentialsCommand:oZ.GetRoleCredentialsCommand,ListAccountRolesCommand:sZ.ListAccountRolesCommand,ListAccountsCommand:iZ.ListAccountsCommand,LogoutCommand:aZ.LogoutCommand},Vp=class extends cZ.SSOClient{};Xp.SSO=Vp;(0,rZ.createAggregatedClient)(dZ,Vp)});var X1=m(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var Wp=(z(),j(U));Wp.__exportStar(qC(),fs);Wp.__exportStar($p(),fs);Wp.__exportStar(Kp(),fs);Wp.__exportStar(FC(),fs)});var Y1=m(W1=>{"use strict";Object.defineProperty(W1,"__esModule",{value:!0})});var Q1=m(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});Yp.paginateListAccountRoles=void 0;var lZ=$p(),uZ=Lc(),mZ=async(e,n,...t)=>await e.send(new lZ.ListAccountRolesCommand(n),...t);async function*pZ(e,n,...t){let r=e.startingToken||void 0,o=!0,s;for(;o;){if(n.nextToken=r,n.maxResults=e.pageSize,e.client instanceof uZ.SSOClient)s=await mZ(e.client,n,...t);else throw new Error("Invalid client, expected SSO | SSOClient");yield s;let c=r;r=s.nextToken,o=!!(r&&(!e.stopOnSameToken||r!==c))}return void 0}Yp.paginateListAccountRoles=pZ});var J1=m(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});Qp.paginateListAccounts=void 0;var fZ=Kp(),_Z=Lc(),yZ=async(e,n,...t)=>await e.send(new fZ.ListAccountsCommand(n),...t);async function*gZ(e,n,...t){let r=e.startingToken||void 0,o=!0,s;for(;o;){if(n.nextToken=r,n.maxResults=e.pageSize,e.client instanceof _Z.SSOClient)s=await yZ(e.client,n,...t);else throw new Error("Invalid client, expected SSO | SSOClient");yield s;let c=r;r=s.nextToken,o=!!(r&&(!e.stopOnSameToken||r!==c))}return void 0}Qp.paginateListAccounts=gZ});var Z1=m(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var LC=(z(),j(U));LC.__exportStar(Y1(),Uc);LC.__exportStar(Q1(),Uc);LC.__exportStar(J1(),Uc)});var eM=m(jC=>{"use strict";Object.defineProperty(jC,"__esModule",{value:!0});var hZ=(z(),j(U));hZ.__exportStar(ao(),jC)});var tM=m(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.SSOServiceException=void 0;var zc=(z(),j(U));zc.__exportStar(Lc(),Ln);zc.__exportStar(V1(),Ln);zc.__exportStar(X1(),Ln);zc.__exportStar(Z1(),Ln);zc.__exportStar(eM(),Ln);var CZ=Tp();Object.defineProperty(Ln,"SSOServiceException",{enumerable:!0,get:function(){return CZ.SSOServiceException}})});var ef=m(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.UnsupportedGrantTypeException=Ee.UnauthorizedClientException=Ee.SlowDownException=Ee.SSOOIDCClient=Ee.InvalidScopeException=Ee.InvalidRequestException=Ee.InvalidClientException=Ee.InternalServerException=Ee.ExpiredTokenException=Ee.CreateTokenCommand=Ee.AuthorizationPendingException=Ee.AccessDeniedException=void 0;var nM=Ka(),SZ=Va(),EZ=Xa(),rM=pc(),bZ=Qt(),PZ=gc(),vZ=x(),oM=On(),xZ=E(),wZ=e=>{var n,t;return{...e,useDualstackEndpoint:(n=e.useDualstackEndpoint)!==null&&n!==void 0?n:!1,useFipsEndpoint:(t=e.useFipsEndpoint)!==null&&t!==void 0?t:!1,defaultSigningName:"awsssooidc"}},kZ={version:"3.387.0"},AZ=Tc(),Jp=Qt(),IZ=qc(),sM=On(),Gc=en(),iM=wo(),RZ=Mc(),NZ=Rt(),OZ=E(),TZ=Zr(),aM=Po(),cM=Pt(),qZ=Ko(),yM="required",jn="fn",Un="argv",_s="ref",UC="PartitionResult",un="tree",Hc="error",$c="endpoint",dM={[yM]:!1,type:"String"},lM={[yM]:!0,default:!1,type:"Boolean"},gM={[_s]:"Endpoint"},hM={[jn]:"booleanEquals",[Un]:[{[_s]:"UseFIPS"},!0]},CM={[jn]:"booleanEquals",[Un]:[{[_s]:"UseDualStack"},!0]},mn={},uM={[jn]:"booleanEquals",[Un]:[!0,{[jn]:"getAttr",[Un]:[{[_s]:UC},"supportsFIPS"]}]},mM={[jn]:"booleanEquals",[Un]:[!0,{[jn]:"getAttr",[Un]:[{[_s]:UC},"supportsDualStack"]}]},pM=[gM],fM=[hM],_M=[CM],MZ={version:"1.0",parameters:{Region:dM,UseDualStack:lM,UseFIPS:lM,Endpoint:dM},rules:[{conditions:[{[jn]:"aws.partition",[Un]:[{[_s]:"Region"}],assign:UC}],type:un,rules:[{conditions:[{[jn]:"isSet",[Un]:pM},{[jn]:"parseURL",[Un]:pM,assign:"url"}],type:un,rules:[{conditions:fM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Hc},{type:un,rules:[{conditions:_M,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Hc},{endpoint:{url:gM,properties:mn,headers:mn},type:$c}]}]},{conditions:[hM,CM],type:un,rules:[{conditions:[uM,mM],type:un,rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:mn,headers:mn},type:$c}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Hc}]},{conditions:fM,type:un,rules:[{conditions:[uM],type:un,rules:[{type:un,rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:mn,headers:mn},type:$c}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:Hc}]},{conditions:_M,type:un,rules:[{conditions:[mM],type:un,rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:mn,headers:mn},type:$c}]},{error:"DualStack is enabled but this partition does not support DualStack",type:Hc}]},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:mn,headers:mn},type:$c}]}]},BZ=MZ,DZ=(e,n={})=>(0,qZ.resolveEndpoint)(BZ,{endpointParams:e,logger:n.logger}),FZ=e=>{var n,t,r,o,s,c,i,u,l;return{apiVersion:"2019-06-10",base64Decoder:(n=e==null?void 0:e.base64Decoder)!==null&&n!==void 0?n:aM.fromBase64,base64Encoder:(t=e==null?void 0:e.base64Encoder)!==null&&t!==void 0?t:aM.toBase64,disableHostPrefix:(r=e==null?void 0:e.disableHostPrefix)!==null&&r!==void 0?r:!1,endpointProvider:(o=e==null?void 0:e.endpointProvider)!==null&&o!==void 0?o:DZ,logger:(s=e==null?void 0:e.logger)!==null&&s!==void 0?s:new OZ.NoOpLogger,serviceId:(c=e==null?void 0:e.serviceId)!==null&&c!==void 0?c:"SSO OIDC",urlParser:(i=e==null?void 0:e.urlParser)!==null&&i!==void 0?i:TZ.parseUrl,utf8Decoder:(u=e==null?void 0:e.utf8Decoder)!==null&&u!==void 0?u:cM.fromUtf8,utf8Encoder:(l=e==null?void 0:e.utf8Encoder)!==null&&l!==void 0?l:cM.toUtf8}},LZ=E(),jZ=Dc(),UZ=E(),zZ=e=>{var n,t,r,o,s,c,i,u,l,a;(0,UZ.emitWarningIfUnsupportedVersion)(process.version);let _=(0,jZ.resolveDefaultsModeConfig)(e),y=()=>_().then(LZ.loadConfigsForDefaultMode),C=FZ(e);return{...C,...e,runtime:"node",defaultsMode:_,bodyLengthChecker:(n=e==null?void 0:e.bodyLengthChecker)!==null&&n!==void 0?n:RZ.calculateBodyLength,defaultUserAgentProvider:(t=e==null?void 0:e.defaultUserAgentProvider)!==null&&t!==void 0?t:(0,AZ.defaultUserAgent)({serviceId:C.serviceId,clientVersion:kZ.version}),maxAttempts:(r=e==null?void 0:e.maxAttempts)!==null&&r!==void 0?r:(0,Gc.loadConfig)(sM.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),region:(o=e==null?void 0:e.region)!==null&&o!==void 0?o:(0,Gc.loadConfig)(Jp.NODE_REGION_CONFIG_OPTIONS,Jp.NODE_REGION_CONFIG_FILE_OPTIONS),requestHandler:(s=e==null?void 0:e.requestHandler)!==null&&s!==void 0?s:new iM.NodeHttpHandler(y),retryMode:(c=e==null?void 0:e.retryMode)!==null&&c!==void 0?c:(0,Gc.loadConfig)({...sM.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await y()).retryMode||NZ.DEFAULT_RETRY_MODE}),sha256:(i=e==null?void 0:e.sha256)!==null&&i!==void 0?i:IZ.Hash.bind(null,"sha256"),streamCollector:(u=e==null?void 0:e.streamCollector)!==null&&u!==void 0?u:iM.streamCollector,useDualstackEndpoint:(l=e==null?void 0:e.useDualstackEndpoint)!==null&&l!==void 0?l:(0,Gc.loadConfig)(Jp.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),useFipsEndpoint:(a=e==null?void 0:e.useFipsEndpoint)!==null&&a!==void 0?a:(0,Gc.loadConfig)(Jp.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)}},SM=class extends xZ.Client{constructor(...[e]){let n=zZ(e||{}),t=wZ(n),r=(0,bZ.resolveRegionConfig)(t),o=(0,vZ.resolveEndpointConfig)(r),s=(0,oM.resolveRetryConfig)(o),c=(0,nM.resolveHostHeaderConfig)(s),i=(0,rM.resolveUserAgentConfig)(c);super(i),this.config=i,this.middlewareStack.use((0,oM.getRetryPlugin)(this.config)),this.middlewareStack.use((0,PZ.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,nM.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,SZ.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,EZ.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,rM.getUserAgentPlugin)(this.config))}destroy(){super.destroy()}};Ee.SSOOIDCClient=SM;var GZ=E(),HZ=x(),$Z=w(),KZ=E(),zC=we(),O=E(),VZ=E(),St=class EM extends VZ.ServiceException{constructor(n){super(n),Object.setPrototypeOf(this,EM.prototype)}},bM=class PM extends St{constructor(n){super({name:"AccessDeniedException",$fault:"client",...n}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,PM.prototype),this.error=n.error,this.error_description=n.error_description}};Ee.AccessDeniedException=bM;var vM=class xM extends St{constructor(n){super({name:"AuthorizationPendingException",$fault:"client",...n}),this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,xM.prototype),this.error=n.error,this.error_description=n.error_description}};Ee.AuthorizationPendingException=vM;var wM=class kM extends St{constructor(n){super({name:"ExpiredTokenException",$fault:"client",...n}),this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,kM.prototype),this.error=n.error,this.error_description=n.error_description}};Ee.ExpiredTokenException=wM;var AM=class IM extends St{constructor(n){super({name:"InternalServerException",$fault:"server",...n}),this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,IM.prototype),this.error=n.error,this.error_description=n.error_description}};Ee.InternalServerException=AM;var RM=class NM extends St{constructor(n){super({name:"InvalidClientException",$fault:"client",...n}),this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,NM.prototype),this.error=n.error,this.error_description=n.error_description}};Ee.InvalidClientException=RM;var XZ=class OM extends St{constructor(n){super({name:"InvalidGrantException",$fault:"client",...n}),this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,OM.prototype),this.error=n.error,this.error_description=n.error_description}},TM=class qM extends St{constructor(n){super({name:"InvalidRequestException",$fault:"client",...n}),this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,qM.prototype),this.error=n.error,this.error_description=n.error_description}};Ee.InvalidRequestException=TM;var MM=class BM extends St{constructor(n){super({name:"InvalidScopeException",$fault:"client",...n}),this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,BM.prototype),this.error=n.error,this.error_description=n.error_description}};Ee.InvalidScopeException=MM;var DM=class FM extends St{constructor(n){super({name:"SlowDownException",$fault:"client",...n}),this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,FM.prototype),this.error=n.error,this.error_description=n.error_description}};Ee.SlowDownException=DM;var LM=class jM extends St{constructor(n){super({name:"UnauthorizedClientException",$fault:"client",...n}),this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,jM.prototype),this.error=n.error,this.error_description=n.error_description}};Ee.UnauthorizedClientException=LM;var UM=class zM extends St{constructor(n){super({name:"UnsupportedGrantTypeException",$fault:"client",...n}),this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,zM.prototype),this.error=n.error,this.error_description=n.error_description}};Ee.UnsupportedGrantTypeException=UM;var WZ=class GM extends St{constructor(n){super({name:"InvalidClientMetadataException",$fault:"client",...n}),this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,GM.prototype),this.error=n.error,this.error_description=n.error_description}},YZ=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c={"content-type":"application/json"},i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/token`,u;return u=JSON.stringify((0,O.take)(e,{clientId:[],clientSecret:[],code:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:l=>(0,O._json)(l)})),new zC.HttpRequest({protocol:r,hostname:t,port:o,method:"POST",headers:c,path:i,body:u})},QZ=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c={"content-type":"application/json"},i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/client/register`,u;return u=JSON.stringify((0,O.take)(e,{clientName:[],clientType:[],scopes:l=>(0,O._json)(l)})),new zC.HttpRequest({protocol:r,hostname:t,port:o,method:"POST",headers:c,path:i,body:u})},JZ=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c={"content-type":"application/json"},i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/device_authorization`,u;return u=JSON.stringify((0,O.take)(e,{clientId:[],clientSecret:[],startUrl:[]})),new zC.HttpRequest({protocol:r,hostname:t,port:o,method:"POST",headers:c,path:i,body:u})},ZZ=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return eee(e,n);let t=(0,O.map)({$metadata:ct(e)}),r=(0,O.expectNonNull)((0,O.expectObject)(await Zp(e.body,n)),"body"),o=(0,O.take)(r,{accessToken:O.expectString,expiresIn:O.expectInt32,idToken:O.expectString,refreshToken:O.expectString,tokenType:O.expectString});return Object.assign(t,o),t},eee=async(e,n)=>{let t={...e,body:await KC(e.body,n)},r=VC(e,t.body);switch(r){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await see(t,n);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await iee(t,n);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await aee(t,n);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await HC(t,n);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await HM(t,n);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await dee(t,n);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await $C(t,n);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await $M(t,n);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await KM(t,n);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await VM(t,n);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await lee(t,n);default:let o=t.body;return GC({output:e,parsedBody:o,errorCode:r})}},tee=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return nee(e,n);let t=(0,O.map)({$metadata:ct(e)}),r=(0,O.expectNonNull)((0,O.expectObject)(await Zp(e.body,n)),"body"),o=(0,O.take)(r,{authorizationEndpoint:O.expectString,clientId:O.expectString,clientIdIssuedAt:O.expectLong,clientSecret:O.expectString,clientSecretExpiresAt:O.expectLong,tokenEndpoint:O.expectString});return Object.assign(t,o),t},nee=async(e,n)=>{let t={...e,body:await KC(e.body,n)},r=VC(e,t.body);switch(r){case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await HC(t,n);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await cee(t,n);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await $C(t,n);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await $M(t,n);default:let o=t.body;return GC({output:e,parsedBody:o,errorCode:r})}},ree=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return oee(e,n);let t=(0,O.map)({$metadata:ct(e)}),r=(0,O.expectNonNull)((0,O.expectObject)(await Zp(e.body,n)),"body"),o=(0,O.take)(r,{deviceCode:O.expectString,expiresIn:O.expectInt32,interval:O.expectInt32,userCode:O.expectString,verificationUri:O.expectString,verificationUriComplete:O.expectString});return Object.assign(t,o),t},oee=async(e,n)=>{let t={...e,body:await KC(e.body,n)},r=VC(e,t.body);switch(r){case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await HC(t,n);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await HM(t,n);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await $C(t,n);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await KM(t,n);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await VM(t,n);default:let o=t.body;return GC({output:e,parsedBody:o,errorCode:r})}},GC=(0,O.withBaseException)(St),see=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new bM({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},iee=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new vM({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},aee=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new wM({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},HC=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new AM({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},HM=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new RM({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},cee=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new WZ({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},dee=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new XZ({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},$C=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new TM({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},$M=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new MM({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},KM=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new DM({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},VM=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new LM({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},lee=async(e,n)=>{let t=(0,O.map)({}),r=e.body,o=(0,O.take)(r,{error:O.expectString,error_description:O.expectString});Object.assign(t,o);let s=new UM({$metadata:ct(e),...t});return(0,O.decorateServiceException)(s,e.body)},ct=e=>{var n,t;return{httpStatusCode:e.statusCode,requestId:(t=(n=e.headers["x-amzn-requestid"])!==null&&n!==void 0?n:e.headers["x-amzn-request-id"])!==null&&t!==void 0?t:e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},uee=(e,n)=>(0,O.collectBody)(e,n).then(t=>n.utf8Encoder(t)),Zp=(e,n)=>uee(e,n).then(t=>t.length?JSON.parse(t):{}),KC=async(e,n)=>{var t;let r=await Zp(e,n);return r.message=(t=r.message)!==null&&t!==void 0?t:r.Message,r},VC=(e,n)=>{let t=(s,c)=>Object.keys(s).find(i=>i.toLowerCase()===c.toLowerCase()),r=s=>{let c=s;return typeof c=="number"&&(c=c.toString()),c.indexOf(",")>=0&&(c=c.split(",")[0]),c.indexOf(":")>=0&&(c=c.split(":")[0]),c.indexOf("#")>=0&&(c=c.split("#")[1]),c},o=t(e.headers,"x-amzn-errortype");if(o!==void 0)return r(e.headers[o]);if(n.code!==void 0)return r(n.code);if(n.__type!==void 0)return r(n.__type)},XM=class WM extends KZ.Command{constructor(n){super(),this.input=n}static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}resolveMiddleware(n,t,r){this.middlewareStack.use((0,$Z.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,HZ.getEndpointPlugin)(t,WM.getEndpointParameterInstructions()));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"SSOOIDCClient",commandName:"CreateTokenCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:a=>a},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return YZ(n,t)}deserialize(n,t){return ZZ(n,t)}};Ee.CreateTokenCommand=XM;var mee=x(),pee=w(),fee=E(),_ee=class YM extends fee.Command{constructor(n){super(),this.input=n}static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}resolveMiddleware(n,t,r){this.middlewareStack.use((0,pee.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,mee.getEndpointPlugin)(t,YM.getEndpointParameterInstructions()));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"SSOOIDCClient",commandName:"RegisterClientCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:a=>a},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return QZ(n,t)}deserialize(n,t){return tee(n,t)}},yee=x(),gee=w(),hee=E(),Cee=class QM extends hee.Command{constructor(n){super(),this.input=n}static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}resolveMiddleware(n,t,r){this.middlewareStack.use((0,gee.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,yee.getEndpointPlugin)(t,QM.getEndpointParameterInstructions()));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"SSOOIDCClient",commandName:"StartDeviceAuthorizationCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:a=>a},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return JZ(n,t)}deserialize(n,t){return ree(n,t)}},See={CreateTokenCommand:XM,RegisterClientCommand:_ee,StartDeviceAuthorizationCommand:Cee},Eee=class extends SM{};(0,GZ.createAggregatedClient)(See,Eee)});var tf=m(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.REFRESH_MESSAGE=ys.EXPIRE_WINDOW_MS=void 0;ys.EXPIRE_WINDOW_MS=5*60*1e3;ys.REFRESH_MESSAGE="To refresh this SSO session run 'aws sso login' with the corresponding profile."});var JM=m(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.getSsoOidcClient=void 0;var bee=ef(),XC={},Pee=e=>{if(XC[e])return XC[e];let n=new bee.SSOOIDCClient({region:e});return XC[e]=n,n};nf.getSsoOidcClient=Pee});var ZM=m(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.getNewSsoOidcToken=void 0;var vee=ef(),xee=JM(),wee=(e,n)=>(0,xee.getSsoOidcClient)(n).send(new vee.CreateTokenCommand({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}));rf.getNewSsoOidcToken=wee});var eB=m(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.validateTokenExpiry=void 0;var kee=Ce(),Aee=tf(),Iee=e=>{if(e.expiration&&e.expiration.getTime(){"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.validateTokenKey=void 0;var Ree=Ce(),Nee=tf(),Oee=(e,n,t=!1)=>{if(typeof n>"u")throw new Ree.TokenProviderError(`Value not present for '${e}' in SSO Token${t?". Cannot refresh":""}. ${Nee.REFRESH_MESSAGE}`,!1)};sf.validateTokenKey=Oee});var nB=m(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.writeSSOTokenToFile=void 0;var Tee=Dt(),qee=require("fs"),{writeFile:Mee}=qee.promises,Bee=(e,n)=>{let t=(0,Tee.getSSOTokenFilepath)(e),r=JSON.stringify(n,null,2);return Mee(t,r)};af.writeSSOTokenToFile=Bee});var WC=m(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.fromSso=void 0;var Kc=Ce(),cf=Dt(),rB=tf(),Dee=ZM(),oB=eB(),co=tB(),Fee=nB(),sB=new Date(0),Lee=(e={})=>async()=>{let n=await(0,cf.parseKnownFiles)(e),t=(0,cf.getProfileName)(e),r=n[t];if(r){if(!r.sso_session)throw new Kc.TokenProviderError(`Profile '${t}' is missing required property 'sso_session'.`)}else throw new Kc.TokenProviderError(`Profile '${t}' could not be found in shared credentials file.`,!1);let o=r.sso_session,c=(await(0,cf.loadSsoSessionData)(e))[o];if(!c)throw new Kc.TokenProviderError(`Sso session '${o}' could not be found in shared credentials file.`,!1);for(let C of["sso_start_url","sso_region"])if(!c[C])throw new Kc.TokenProviderError(`Sso session '${o}' is missing required property '${C}'.`,!1);let i=c.sso_start_url,u=c.sso_region,l;try{l=await(0,cf.getSSOTokenFromFile)(o)}catch{throw new Kc.TokenProviderError(`The SSO session token associated with profile=${t} was not found or is invalid. ${rB.REFRESH_MESSAGE}`,!1)}(0,co.validateTokenKey)("accessToken",l.accessToken),(0,co.validateTokenKey)("expiresAt",l.expiresAt);let{accessToken:a,expiresAt:_}=l,y={token:a,expiration:new Date(_)};if(y.expiration.getTime()-Date.now()>rB.EXPIRE_WINDOW_MS)return y;if(Date.now()-sB.getTime()<30*1e3)return(0,oB.validateTokenExpiry)(y),y;(0,co.validateTokenKey)("clientId",l.clientId,!0),(0,co.validateTokenKey)("clientSecret",l.clientSecret,!0),(0,co.validateTokenKey)("refreshToken",l.refreshToken,!0);try{sB.setTime(Date.now());let C=await(0,Dee.getNewSsoOidcToken)(l,u);(0,co.validateTokenKey)("accessToken",C.accessToken),(0,co.validateTokenKey)("expiresIn",C.expiresIn);let b=new Date(Date.now()+C.expiresIn*1e3);try{await(0,Fee.writeSSOTokenToFile)(o,{...l,accessToken:C.accessToken,expiresAt:b.toISOString(),refreshToken:C.refreshToken})}catch{}return{token:C.accessToken,expiration:b}}catch{return(0,oB.validateTokenExpiry)(y),y}};df.fromSso=Lee});var iB=m(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.fromStatic=void 0;var jee=Ce(),Uee=({token:e})=>async()=>{if(!e||!e.token)throw new jee.TokenProviderError("Please pass a valid token to fromStatic",!1);return e};lf.fromStatic=Uee});var aB=m(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.nodeProvider=void 0;var YC=Ce(),zee=WC(),Gee=(e={})=>(0,YC.memoize)((0,YC.chain)((0,zee.fromSso)(e),async()=>{throw new YC.TokenProviderError("Could not load token from any providers",!1)}),n=>n.expiration!==void 0&&n.expiration.getTime()-Date.now()<3e5,n=>n.expiration!==void 0);uf.nodeProvider=Gee});var cB=m(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});var mf=(z(),j(U));mf.__exportStar(ef(),gs);mf.__exportStar(WC(),gs);mf.__exportStar(iB(),gs);mf.__exportStar(aB(),gs)});var lB=m(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.resolveSSOCredentials=void 0;var dB=tM(),Hee=cB(),Vc=Ce(),$ee=Dt(),Xc=!1,Kee=async({ssoStartUrl:e,ssoSession:n,ssoAccountId:t,ssoRegion:r,ssoRoleName:o,ssoClient:s,profile:c})=>{let i,u="To refresh this SSO session run aws sso login with the corresponding profile.";if(n)try{let k=await(0,Hee.fromSso)({profile:c})();i={accessToken:k.token,expiresAt:new Date(k.expiration).toISOString()}}catch(k){throw new Vc.CredentialsProviderError(k.message,Xc)}else try{i=await(0,$ee.getSSOTokenFromFile)(e)}catch{throw new Vc.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${u}`,Xc)}if(new Date(i.expiresAt).getTime()-Date.now()<=0)throw new Vc.CredentialsProviderError(`The SSO session associated with this profile has expired. ${u}`,Xc);let{accessToken:l}=i,a=s||new dB.SSOClient({region:r}),_;try{_=await a.send(new dB.GetRoleCredentialsCommand({accountId:t,roleName:o,accessToken:l}))}catch(k){throw Vc.CredentialsProviderError.from(k,Xc)}let{roleCredentials:{accessKeyId:y,secretAccessKey:C,sessionToken:b,expiration:A}={}}=_;if(!y||!C||!b||!A)throw new Vc.CredentialsProviderError("SSO returns an invalid temporary credential.",Xc);return{accessKeyId:y,secretAccessKey:C,sessionToken:b,expiration:new Date(A)}};pf.resolveSSOCredentials=Kee});var QC=m(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.validateSsoProfile=void 0;var Vee=Ce(),Xee=e=>{let{sso_start_url:n,sso_account_id:t,sso_region:r,sso_role_name:o}=e;if(!n||!t||!r||!o)throw new Vee.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")} -Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,!1);return e};ff.validateSsoProfile=Xee});var mB=m(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.fromSSO=void 0;var Wc=Ce(),JC=Dt(),Wee=gC(),uB=lB(),Yee=QC(),Qee=(e={})=>async()=>{let{ssoStartUrl:n,ssoAccountId:t,ssoRegion:r,ssoRoleName:o,ssoClient:s,ssoSession:c}=e,i=(0,JC.getProfileName)(e);if(!n&&!t&&!r&&!o&&!c){let l=(await(0,JC.parseKnownFiles)(e))[i];if(!l)throw new Wc.CredentialsProviderError(`Profile ${i} was not found.`);if(!(0,Wee.isSsoProfile)(l))throw new Wc.CredentialsProviderError(`Profile ${i} is not configured with SSO credentials.`);if(l!=null&&l.sso_session){let k=(await(0,JC.loadSsoSessionData)(e))[l.sso_session],K=` configurations in profile ${i} and sso-session ${l.sso_session}`;if(r&&r!==k.sso_region)throw new Wc.CredentialsProviderError("Conflicting SSO region"+K,!1);if(n&&n!==k.sso_start_url)throw new Wc.CredentialsProviderError("Conflicting SSO start_url"+K,!1);l.sso_region=k.sso_region,l.sso_start_url=k.sso_start_url}let{sso_start_url:a,sso_account_id:_,sso_region:y,sso_role_name:C,sso_session:b}=(0,Yee.validateSsoProfile)(l);return(0,uB.resolveSSOCredentials)({ssoStartUrl:a,ssoSession:b,ssoAccountId:_,ssoRegion:y,ssoRoleName:C,ssoClient:s,profile:i})}else{if(!n||!t||!r||!o)throw new Wc.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"');return(0,uB.resolveSSOCredentials)({ssoStartUrl:n,ssoSession:c,ssoAccountId:t,ssoRegion:r,ssoRoleName:o,ssoClient:s,profile:i})}};_f.fromSSO=Qee});var fB=m(pB=>{"use strict";Object.defineProperty(pB,"__esModule",{value:!0})});var gf=m(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var yf=(z(),j(U));yf.__exportStar(mB(),hs);yf.__exportStar(gC(),hs);yf.__exportStar(fB(),hs);yf.__exportStar(QC(),hs)});var yB=m(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.resolveSsoCredentials=Cs.isSsoProfile=void 0;var _B=gf(),Jee=gf();Object.defineProperty(Cs,"isSsoProfile",{enumerable:!0,get:function(){return Jee.isSsoProfile}});var Zee=e=>{let{sso_start_url:n,sso_account_id:t,sso_session:r,sso_region:o,sso_role_name:s}=(0,_B.validateSsoProfile)(e);return(0,_B.fromSSO)({ssoStartUrl:n,ssoAccountId:t,ssoSession:r,ssoRegion:o,ssoRoleName:s})()};Cs.resolveSsoCredentials=Zee});var gB=m(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.resolveStaticCredentials=Ss.isStaticCredsProfile=void 0;var ete=e=>!!e&&typeof e=="object"&&typeof e.aws_access_key_id=="string"&&typeof e.aws_secret_access_key=="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1;Ss.isStaticCredsProfile=ete;var tte=e=>Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token});Ss.resolveStaticCredentials=tte});var ZC=m(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.fromWebToken=void 0;var nte=Ce(),rte=e=>()=>{let{roleArn:n,roleSessionName:t,webIdentityToken:r,providerId:o,policyArns:s,policy:c,durationSeconds:i,roleAssumerWithWebIdentity:u}=e;if(!u)throw new nte.CredentialsProviderError(`Role Arn '${n}' needs to be assumed with web identity, but no role assumption callback was provided.`,!1);return u({RoleArn:n,RoleSessionName:t??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:r,ProviderId:o,PolicyArns:s,Policy:c,DurationSeconds:i})};hf.fromWebToken=rte});var hB=m(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.fromTokenFile=void 0;var ote=Ce(),ste=require("fs"),ite=ZC(),ate="AWS_WEB_IDENTITY_TOKEN_FILE",cte="AWS_ROLE_ARN",dte="AWS_ROLE_SESSION_NAME",lte=(e={})=>async()=>{var n,t,r;let o=(n=e==null?void 0:e.webIdentityTokenFile)!==null&&n!==void 0?n:process.env[ate],s=(t=e==null?void 0:e.roleArn)!==null&&t!==void 0?t:process.env[cte],c=(r=e==null?void 0:e.roleSessionName)!==null&&r!==void 0?r:process.env[dte];if(!o||!s)throw new ote.CredentialsProviderError("Web identity configuration not specified");return(0,ite.fromWebToken)({...e,webIdentityToken:(0,ste.readFileSync)(o,{encoding:"ascii"}),roleArn:s,roleSessionName:c})()};Cf.fromTokenFile=lte});var eS=m(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var CB=(z(),j(U));CB.__exportStar(hB(),Sf);CB.__exportStar(ZC(),Sf)});var SB=m(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.resolveWebIdentityCredentials=Es.isWebIdentityProfile=void 0;var ute=eS(),mte=e=>!!e&&typeof e=="object"&&typeof e.web_identity_token_file=="string"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1;Es.isWebIdentityProfile=mte;var pte=async(e,n)=>(0,ute.fromTokenFile)({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:n.roleAssumerWithWebIdentity})();Es.resolveWebIdentityCredentials=pte});var pC=m(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.resolveProfileData=void 0;var fte=Ce(),EB=Mq(),bB=jq(),PB=yB(),Ef=gB(),vB=SB(),_te=async(e,n,t,r={})=>{let o=n[e];if(Object.keys(r).length>0&&(0,Ef.isStaticCredsProfile)(o))return(0,Ef.resolveStaticCredentials)(o);if((0,EB.isAssumeRoleProfile)(o))return(0,EB.resolveAssumeRoleCredentials)(e,n,t,r);if((0,Ef.isStaticCredsProfile)(o))return(0,Ef.resolveStaticCredentials)(o);if((0,vB.isWebIdentityProfile)(o))return(0,vB.resolveWebIdentityCredentials)(o,t);if((0,bB.isProcessProfile)(o))return(0,bB.resolveProcessCredentials)(t,e);if((0,PB.isSsoProfile)(o))return(0,PB.resolveSsoCredentials)(o);throw new fte.CredentialsProviderError(`Profile ${e} could not be found or parsed in shared credentials file.`)};bf.resolveProfileData=_te});var wB=m(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.fromIni=void 0;var xB=Dt(),yte=pC(),gte=(e={})=>async()=>{let n=await(0,xB.parseKnownFiles)(e);return(0,yte.resolveProfileData)((0,xB.getProfileName)(e),n,e)};Pf.fromIni=gte});var kB=m(tS=>{"use strict";Object.defineProperty(tS,"__esModule",{value:!0});var hte=(z(),j(U));hte.__exportStar(wB(),tS)});var AB=m(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.remoteProvider=lo.ENV_IMDS_DISABLED=void 0;var vf=dp(),Cte=Ce();lo.ENV_IMDS_DISABLED="AWS_EC2_METADATA_DISABLED";var Ste=e=>process.env[vf.ENV_CMDS_RELATIVE_URI]||process.env[vf.ENV_CMDS_FULL_URI]?(0,vf.fromContainerMetadata)(e):process.env[lo.ENV_IMDS_DISABLED]?async()=>{throw new Cte.CredentialsProviderError("EC2 Instance Metadata Service access disabled")}:(0,vf.fromInstanceMetadata)(e);lo.remoteProvider=Ste});var IB=m(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.defaultProvider=void 0;var Ete=nC(),bte=kB(),Pte=yC(),vte=gf(),xte=eS(),nS=Ce(),wte=Dt(),kte=AB(),Ate=(e={})=>(0,nS.memoize)((0,nS.chain)(...e.profile||process.env[wte.ENV_PROFILE]?[]:[(0,Ete.fromEnv)()],(0,vte.fromSSO)(e),(0,bte.fromIni)(e),(0,Pte.fromProcess)(e),(0,xte.fromTokenFile)(e),(0,kte.remoteProvider)(e),async()=>{throw new nS.CredentialsProviderError("Could not load credentials from any providers",!1)}),n=>n.expiration!==void 0&&n.expiration.getTime()-Date.now()<3e5,n=>n.expiration!==void 0);xf.defaultProvider=Ate});var oS=m(rS=>{"use strict";Object.defineProperty(rS,"__esModule",{value:!0});var Ite=(z(),j(U));Ite.__exportStar(IB(),rS)});var QB=m(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.ruleSet=void 0;var UB="required",ie="type",ge="fn",he="argv",Ar="ref",RB=!1,Rte=!0,uo="booleanEquals",pn="tree",Qe="stringEquals",zB="sigv4",GB="sts",HB="us-east-1",Ae="endpoint",NB="https://sts.{Region}.{PartitionResult#dnsSuffix}",bs="error",iS="getAttr",OB={[UB]:!1,[ie]:"String"},sS={[UB]:!0,default:!1,[ie]:"Boolean"},$B={[Ar]:"Endpoint"},TB={[ge]:"isSet",[he]:[{[Ar]:"Region"}]},Je={[Ar]:"Region"},qB={[ge]:"aws.partition",[he]:[Je],assign:"PartitionResult"},KB={[Ar]:"UseFIPS"},VB={[Ar]:"UseDualStack"},st={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:zB,signingName:GB,signingRegion:HB}]},headers:{}},Et={},MB={conditions:[{[ge]:Qe,[he]:[Je,"aws-global"]}],[Ae]:st,[ie]:Ae},XB={[ge]:uo,[he]:[KB,!0]},WB={[ge]:uo,[he]:[VB,!0]},BB={[ge]:uo,[he]:[!0,{[ge]:iS,[he]:[{[Ar]:"PartitionResult"},"supportsFIPS"]}]},YB={[Ar]:"PartitionResult"},DB={[ge]:uo,[he]:[!0,{[ge]:iS,[he]:[YB,"supportsDualStack"]}]},FB=[{[ge]:"isSet",[he]:[$B]}],LB=[XB],jB=[WB],Nte={version:"1.0",parameters:{Region:OB,UseDualStack:sS,UseFIPS:sS,Endpoint:OB,UseGlobalEndpoint:sS},rules:[{conditions:[{[ge]:uo,[he]:[{[Ar]:"UseGlobalEndpoint"},Rte]},{[ge]:"not",[he]:FB},TB,qB,{[ge]:uo,[he]:[KB,RB]},{[ge]:uo,[he]:[VB,RB]}],[ie]:pn,rules:[{conditions:[{[ge]:Qe,[he]:[Je,"ap-northeast-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"ap-south-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"ap-southeast-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"ap-southeast-2"]}],endpoint:st,[ie]:Ae},MB,{conditions:[{[ge]:Qe,[he]:[Je,"ca-central-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"eu-central-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"eu-north-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"eu-west-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"eu-west-2"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"eu-west-3"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"sa-east-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,HB]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"us-east-2"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"us-west-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"us-west-2"]}],endpoint:st,[ie]:Ae},{endpoint:{url:NB,properties:{authSchemes:[{name:zB,signingName:GB,signingRegion:"{Region}"}]},headers:Et},[ie]:Ae}]},{conditions:FB,[ie]:pn,rules:[{conditions:LB,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[ie]:bs},{conditions:jB,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[ie]:bs},{endpoint:{url:$B,properties:Et,headers:Et},[ie]:Ae}]},{conditions:[TB],[ie]:pn,rules:[{conditions:[qB],[ie]:pn,rules:[{conditions:[XB,WB],[ie]:pn,rules:[{conditions:[BB,DB],[ie]:pn,rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Et,headers:Et},[ie]:Ae}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[ie]:bs}]},{conditions:LB,[ie]:pn,rules:[{conditions:[BB],[ie]:pn,rules:[{conditions:[{[ge]:Qe,[he]:["aws-us-gov",{[ge]:iS,[he]:[YB,"name"]}]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Et,headers:Et},[ie]:Ae},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Et,headers:Et},[ie]:Ae}]},{error:"FIPS is enabled but this partition does not support FIPS",[ie]:bs}]},{conditions:jB,[ie]:pn,rules:[{conditions:[DB],[ie]:pn,rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Et,headers:Et},[ie]:Ae}]},{error:"DualStack is enabled but this partition does not support DualStack",[ie]:bs}]},MB,{endpoint:{url:NB,properties:Et,headers:Et},[ie]:Ae}]}]},{error:"Invalid Configuration: Missing Region",[ie]:bs}]};wf.ruleSet=Nte});var JB=m(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.defaultEndpointResolver=void 0;var Ote=Ko(),Tte=QB(),qte=(e,n={})=>(0,Ote.resolveEndpoint)(Tte.ruleSet,{endpointParams:e,logger:n.logger});kf.defaultEndpointResolver=qte});var tD=m(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.getRuntimeConfig=void 0;var Mte=E(),Bte=Zr(),ZB=Po(),eD=Pt(),Dte=JB(),Fte=e=>({apiVersion:"2011-06-15",base64Decoder:(e==null?void 0:e.base64Decoder)??ZB.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??ZB.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??Dte.defaultEndpointResolver,extensions:(e==null?void 0:e.extensions)??[],logger:(e==null?void 0:e.logger)??new Mte.NoOpLogger,serviceId:(e==null?void 0:e.serviceId)??"STS",urlParser:(e==null?void 0:e.urlParser)??Bte.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??eD.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??eD.toUtf8});Af.getRuntimeConfig=Fte});var oD=m(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.getRuntimeConfig=void 0;var Lte=(z(),j(U)),jte=Lte.__importDefault(vT()),Ute=eC(),zte=oS(),Gte=Tc(),If=Qt(),Hte=qc(),nD=On(),Yc=en(),rD=wo(),$te=Mc(),Kte=Rt(),Vte=tD(),Xte=E(),Wte=Dc(),Yte=E(),Qte=e=>{(0,Yte.emitWarningIfUnsupportedVersion)(process.version);let n=(0,Wte.resolveDefaultsModeConfig)(e),t=()=>n().then(Xte.loadConfigsForDefaultMode),r=(0,Vte.getRuntimeConfig)(e);return{...r,...e,runtime:"node",defaultsMode:n,bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??$te.calculateBodyLength,credentialDefaultProvider:(e==null?void 0:e.credentialDefaultProvider)??(0,Ute.decorateDefaultCredentialProvider)(zte.defaultProvider),defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,Gte.defaultUserAgent)({serviceId:r.serviceId,clientVersion:jte.default.version}),maxAttempts:(e==null?void 0:e.maxAttempts)??(0,Yc.loadConfig)(nD.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),region:(e==null?void 0:e.region)??(0,Yc.loadConfig)(If.NODE_REGION_CONFIG_OPTIONS,If.NODE_REGION_CONFIG_FILE_OPTIONS),requestHandler:(e==null?void 0:e.requestHandler)??new rD.NodeHttpHandler(t),retryMode:(e==null?void 0:e.retryMode)??(0,Yc.loadConfig)({...nD.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await t()).retryMode||Kte.DEFAULT_RETRY_MODE}),sha256:(e==null?void 0:e.sha256)??Hte.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??rD.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,Yc.loadConfig)(If.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,Yc.loadConfig)(If.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)}};Rf.getRuntimeConfig=Qte});var cD=m(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.resolveRuntimeExtensions=void 0;var sD=Np(),iD=we(),aD=E(),aS=e=>e,Jte=(e,n)=>{let t={...aS((0,sD.getAwsRegionExtensionConfiguration)(e)),...aS((0,aD.getDefaultExtensionConfiguration)(e)),...aS((0,iD.getHttpHandlerExtensionConfiguration)(e))};return n.forEach(r=>r.configure(t)),{...e,...(0,sD.resolveAwsRegionExtensionConfiguration)(t),...(0,aD.resolveDefaultRuntimeConfig)(t),...(0,iD.resolveHttpHandlerRuntimeConfig)(t)}};Nf.resolveRuntimeExtensions=Jte});var Of=m(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.STSClient=Ps.__Client=void 0;var dD=Ka(),Zte=Va(),ene=Xa(),tne=bT(),lD=pc(),nne=Qt(),rne=gc(),one=x(),uD=On(),mD=E();Object.defineProperty(Ps,"__Client",{enumerable:!0,get:function(){return mD.Client}});var sne=PT(),ine=oD(),ane=cD(),cS=class e extends mD.Client{constructor(...[n]){let t=(0,ine.getRuntimeConfig)(n||{}),r=(0,sne.resolveClientEndpointParameters)(t),o=(0,nne.resolveRegionConfig)(r),s=(0,one.resolveEndpointConfig)(o),c=(0,uD.resolveRetryConfig)(s),i=(0,dD.resolveHostHeaderConfig)(c),u=(0,tne.resolveStsAuthConfig)(i,{stsClientCtor:e}),l=(0,lD.resolveUserAgentConfig)(u),a=(0,ane.resolveRuntimeExtensions)(l,(n==null?void 0:n.extensions)||[]);super(a),this.config=a,this.middlewareStack.use((0,uD.getRetryPlugin)(this.config)),this.middlewareStack.use((0,rne.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,dD.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,Zte.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,ene.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,lD.getUserAgentPlugin)(this.config))}destroy(){super.destroy()}};Ps.STSClient=cS});var lS=m(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.AssumeRoleWithSAMLCommand=vs.$Command=void 0;var cne=x(),dne=w(),_D=E();Object.defineProperty(vs,"$Command",{enumerable:!0,get:function(){return _D.Command}});var lne=v(),pD=gr(),fD=Mn(),dS=class e extends _D.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,dne.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,cne.getEndpointPlugin)(t,e.getEndpointParameterInstructions()));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"AssumeRoleWithSAMLCommand",inputFilterSensitiveLog:pD.AssumeRoleWithSAMLRequestFilterSensitiveLog,outputFilterSensitiveLog:pD.AssumeRoleWithSAMLResponseFilterSensitiveLog,[lne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"AssumeRoleWithSAML"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,fD.se_AssumeRoleWithSAMLCommand)(n,t)}deserialize(n,t){return(0,fD.de_AssumeRoleWithSAMLCommand)(n,t)}};vs.AssumeRoleWithSAMLCommand=dS});var mS=m(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.DecodeAuthorizationMessageCommand=xs.$Command=void 0;var une=kn(),mne=x(),pne=w(),gD=E();Object.defineProperty(xs,"$Command",{enumerable:!0,get:function(){return gD.Command}});var fne=v(),yD=Mn(),uS=class e extends gD.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,pne.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,mne.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,une.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"DecodeAuthorizationMessageCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:a=>a,[fne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"DecodeAuthorizationMessage"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,yD.se_DecodeAuthorizationMessageCommand)(n,t)}deserialize(n,t){return(0,yD.de_DecodeAuthorizationMessageCommand)(n,t)}};xs.DecodeAuthorizationMessageCommand=uS});var fS=m(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.GetAccessKeyInfoCommand=ws.$Command=void 0;var _ne=kn(),yne=x(),gne=w(),CD=E();Object.defineProperty(ws,"$Command",{enumerable:!0,get:function(){return CD.Command}});var hne=v(),hD=Mn(),pS=class e extends CD.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,gne.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,yne.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,_ne.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"GetAccessKeyInfoCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:a=>a,[hne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"GetAccessKeyInfo"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,hD.se_GetAccessKeyInfoCommand)(n,t)}deserialize(n,t){return(0,hD.de_GetAccessKeyInfoCommand)(n,t)}};ws.GetAccessKeyInfoCommand=pS});var yS=m(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.GetCallerIdentityCommand=ks.$Command=void 0;var Cne=kn(),Sne=x(),Ene=w(),ED=E();Object.defineProperty(ks,"$Command",{enumerable:!0,get:function(){return ED.Command}});var bne=v(),SD=Mn(),_S=class e extends ED.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,Ene.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,Sne.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,Cne.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"GetCallerIdentityCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:a=>a,[bne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"GetCallerIdentity"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,SD.se_GetCallerIdentityCommand)(n,t)}deserialize(n,t){return(0,SD.de_GetCallerIdentityCommand)(n,t)}};ks.GetCallerIdentityCommand=_S});var hS=m(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.GetFederationTokenCommand=As.$Command=void 0;var Pne=kn(),vne=x(),xne=w(),PD=E();Object.defineProperty(As,"$Command",{enumerable:!0,get:function(){return PD.Command}});var wne=v(),kne=gr(),bD=Mn(),gS=class e extends PD.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,xne.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,vne.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,Pne.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"GetFederationTokenCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:kne.GetFederationTokenResponseFilterSensitiveLog,[wne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"GetFederationToken"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,bD.se_GetFederationTokenCommand)(n,t)}deserialize(n,t){return(0,bD.de_GetFederationTokenCommand)(n,t)}};As.GetFederationTokenCommand=gS});var SS=m(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.GetSessionTokenCommand=Is.$Command=void 0;var Ane=kn(),Ine=x(),Rne=w(),xD=E();Object.defineProperty(Is,"$Command",{enumerable:!0,get:function(){return xD.Command}});var Nne=v(),One=gr(),vD=Mn(),CS=class e extends xD.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,Rne.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,Ine.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,Ane.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"GetSessionTokenCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:One.GetSessionTokenResponseFilterSensitiveLog,[Nne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"GetSessionToken"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,vD.se_GetSessionTokenCommand)(n,t)}deserialize(n,t){return(0,vD.de_GetSessionTokenCommand)(n,t)}};Is.GetSessionTokenCommand=CS});var wD=m(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.STS=void 0;var Tne=E(),qne=Ym(),Mne=lS(),Bne=Qm(),Dne=mS(),Fne=fS(),Lne=yS(),jne=hS(),Une=SS(),zne=Of(),Gne={AssumeRoleCommand:qne.AssumeRoleCommand,AssumeRoleWithSAMLCommand:Mne.AssumeRoleWithSAMLCommand,AssumeRoleWithWebIdentityCommand:Bne.AssumeRoleWithWebIdentityCommand,DecodeAuthorizationMessageCommand:Dne.DecodeAuthorizationMessageCommand,GetAccessKeyInfoCommand:Fne.GetAccessKeyInfoCommand,GetCallerIdentityCommand:Lne.GetCallerIdentityCommand,GetFederationTokenCommand:jne.GetFederationTokenCommand,GetSessionTokenCommand:Une.GetSessionTokenCommand},Tf=class extends zne.STSClient{};qf.STS=Tf;(0,Tne.createAggregatedClient)(Gne,Tf)});var kD=m(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});var Ir=(z(),j(U));Ir.__exportStar(Ym(),fn);Ir.__exportStar(lS(),fn);Ir.__exportStar(Qm(),fn);Ir.__exportStar(mS(),fn);Ir.__exportStar(fS(),fn);Ir.__exportStar(yS(),fn);Ir.__exportStar(hS(),fn);Ir.__exportStar(SS(),fn)});var AD=m(ES=>{"use strict";Object.defineProperty(ES,"__esModule",{value:!0});var Hne=(z(),j(U));Hne.__exportStar(gr(),ES)});var OD=m(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.decorateDefaultCredentialProvider=_n.getDefaultRoleAssumerWithWebIdentity=_n.getDefaultRoleAssumer=void 0;var ID=eC(),RD=Of(),ND=(e,n)=>n?class extends e{constructor(r){super(r);for(let o of n)this.middlewareStack.use(o)}}:e,$ne=(e={},n)=>(0,ID.getDefaultRoleAssumer)(e,ND(RD.STSClient,n));_n.getDefaultRoleAssumer=$ne;var Kne=(e={},n)=>(0,ID.getDefaultRoleAssumerWithWebIdentity)(e,ND(RD.STSClient,n));_n.getDefaultRoleAssumerWithWebIdentity=Kne;var Vne=e=>n=>e({roleAssumer:(0,_n.getDefaultRoleAssumer)(n),roleAssumerWithWebIdentity:(0,_n.getDefaultRoleAssumerWithWebIdentity)(n),...n});_n.decorateDefaultCredentialProvider=Vne});var TD=m(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.STSServiceException=void 0;var Qc=(z(),j(U));Qc.__exportStar(Of(),zn);Qc.__exportStar(wD(),zn);Qc.__exportStar(kD(),zn);Qc.__exportStar(AD(),zn);Qc.__exportStar(OD(),zn);var Xne=$m();Object.defineProperty(zn,"STSServiceException",{enumerable:!0,get:function(){return Xne.STSServiceException}})});var qD=m(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS=yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME=yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME=void 0;var Mf=fc();yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME="AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS";yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME="s3_disable_multiregion_access_points";yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS={environmentVariableSelector:e=>(0,Mf.booleanSelector)(e,yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME,Mf.SelectorType.ENV),configFileSelector:e=>(0,Mf.booleanSelector)(e,yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME,Mf.SelectorType.CONFIG),default:!1}});var MD=m(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.NODE_USE_ARN_REGION_CONFIG_OPTIONS=gn.NODE_USE_ARN_REGION_INI_NAME=gn.NODE_USE_ARN_REGION_ENV_NAME=void 0;var Bf=fc();gn.NODE_USE_ARN_REGION_ENV_NAME="AWS_S3_USE_ARN_REGION";gn.NODE_USE_ARN_REGION_INI_NAME="s3_use_arn_region";gn.NODE_USE_ARN_REGION_CONFIG_OPTIONS={environmentVariableSelector:e=>(0,Bf.booleanSelector)(e,gn.NODE_USE_ARN_REGION_ENV_NAME,Bf.SelectorType.ENV),configFileSelector:e=>(0,Bf.booleanSelector)(e,gn.NODE_USE_ARN_REGION_INI_NAME,Bf.SelectorType.CONFIG),default:!1}});var vS=m(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.validateMrapAlias=re.validateNoFIPS=re.validateNoDualstack=re.getArnResources=re.validateCustomEndpoint=re.validateDNSHostLabel=re.validateAccountId=re.validateRegionalClient=re.validateRegion=re.validatePartition=re.validateOutpostService=re.validateS3Service=re.validateService=re.validateArnEndpointOptions=re.getSuffixForArnEndpoint=re.getSuffix=re.isDnsCompatibleBucketName=re.isBucketNameOptions=re.S3_HOSTNAME_PATTERN=re.DOT_PATTERN=void 0;var Wne=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Yne=/(\d+\.){3}\d+/,Qne=/\.\./;re.DOT_PATTERN=/\./;re.S3_HOSTNAME_PATTERN=/^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./;var BD=/^s3(-external-1)?\.amazonaws\.com$/,PS="amazonaws.com",Jne=e=>typeof e.bucketName=="string";re.isBucketNameOptions=Jne;var Zne=e=>Wne.test(e)&&!Yne.test(e)&&!Qne.test(e);re.isDnsCompatibleBucketName=Zne;var DD=e=>{let n=e.match(re.S3_HOSTNAME_PATTERN);return[n[4],e.replace(new RegExp(`^${n[0]}`),"")]},ere=e=>BD.test(e)?["us-east-1",PS]:DD(e);re.getSuffix=ere;var tre=e=>BD.test(e)?[e.replace(`.${PS}`,""),PS]:DD(e);re.getSuffixForArnEndpoint=tre;var nre=e=>{if(e.pathStyleEndpoint)throw new Error("Path-style S3 endpoint is not supported when bucket is an ARN");if(e.accelerateEndpoint)throw new Error("Accelerate endpoint is not supported when bucket is an ARN");if(!e.tlsCompatible)throw new Error("HTTPS is required when bucket is an ARN")};re.validateArnEndpointOptions=nre;var rre=e=>{if(e!=="s3"&&e!=="s3-outposts"&&e!=="s3-object-lambda")throw new Error("Expect 's3' or 's3-outposts' or 's3-object-lambda' in ARN service component")};re.validateService=rre;var ore=e=>{if(e!=="s3")throw new Error("Expect 's3' in Accesspoint ARN service component")};re.validateS3Service=ore;var sre=e=>{if(e!=="s3-outposts")throw new Error("Expect 's3-posts' in Outpost ARN service component")};re.validateOutpostService=sre;var ire=(e,n)=>{if(e!==n.clientPartition)throw new Error(`Partition in ARN is incompatible, got "${e}" but expected "${n.clientPartition}"`)};re.validatePartition=ire;var are=(e,n)=>{if(e==="")throw new Error("ARN region is empty");if(n.useFipsEndpoint)if(n.allowFipsRegion){if(!bS(e,n.clientRegion))throw new Error(`Client FIPS region ${n.clientRegion} doesn't match region ${e} in ARN`)}else throw new Error("FIPS region is not supported");if(!n.useArnRegion&&!bS(e,n.clientRegion||"")&&!bS(e,n.clientSigningRegion||""))throw new Error(`Region in ARN is incompatible, got ${e} but expected ${n.clientRegion}`)};re.validateRegion=are;var cre=e=>{if(["s3-external-1","aws-global"].includes(e))throw new Error(`Client region ${e} is not regional`)};re.validateRegionalClient=cre;var bS=(e,n)=>e===n,dre=e=>{if(!/[0-9]{12}/.exec(e))throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'")};re.validateAccountId=dre;var lre=(e,n={tlsCompatible:!0})=>{if(e.length>=64||!/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(e)||/(\d+\.){3}\d+/.test(e)||/[.-]{2}/.test(e)||n!=null&&n.tlsCompatible&&re.DOT_PATTERN.test(e))throw new Error(`Invalid DNS label ${e}`)};re.validateDNSHostLabel=lre;var ure=e=>{if(e.isCustomEndpoint){if(e.dualstackEndpoint)throw new Error("Dualstack endpoint is not supported with custom endpoint");if(e.accelerateEndpoint)throw new Error("Accelerate endpoint is not supported with custom endpoint")}};re.validateCustomEndpoint=ure;var mre=e=>{let n=e.includes(":")?":":"/",[t,...r]=e.split(n);if(t==="accesspoint"){if(r.length!==1||r[0]==="")throw new Error(`Access Point ARN should have one resource accesspoint${n}{accesspointname}`);return{accesspointName:r[0]}}else if(t==="outpost"){if(!r[0]||r[1]!=="accesspoint"||!r[2]||r.length!==3)throw new Error(`Outpost ARN should have resource outpost${n}{outpostId}${n}accesspoint${n}{accesspointName}`);let[o,s,c]=r;return{outpostId:o,accesspointName:c}}else throw new Error(`ARN resource should begin with 'accesspoint${n}' or 'outpost${n}'`)};re.getArnResources=mre;var pre=e=>{if(e)throw new Error("Dualstack endpoint is not supported with Outpost or Multi-region Access Point ARN.")};re.validateNoDualstack=pre;var fre=e=>{if(e)throw new Error("FIPS region is not supported with Outpost.")};re.validateNoFIPS=fre;var _re=e=>{try{e.split(".").forEach(n=>{(0,re.validateDNSHostLabel)(n)})}catch{throw new Error(`"${e}" is not a DNS compatible name.`)}};re.validateMrapAlias=_re});var xS=m(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.bucketHostname=void 0;var Se=vS(),yre=e=>((0,Se.validateCustomEndpoint)(e),(0,Se.isBucketNameOptions)(e)?gre(e):hre(e));Df.bucketHostname=yre;var gre=({accelerateEndpoint:e=!1,clientRegion:n,baseHostname:t,bucketName:r,dualstackEndpoint:o=!1,fipsEndpoint:s=!1,pathStyleEndpoint:c=!1,tlsCompatible:i=!0,isCustomEndpoint:u=!1})=>{let[l,a]=u?[n,t]:(0,Se.getSuffix)(t);return c||!(0,Se.isDnsCompatibleBucketName)(r)||i&&Se.DOT_PATTERN.test(r)?{bucketEndpoint:!1,hostname:o?`s3.dualstack.${l}.${a}`:t}:(e?t=`s3-accelerate${o?".dualstack":""}.${a}`:o&&(t=`s3.dualstack.${l}.${a}`),{bucketEndpoint:!0,hostname:`${r}.${t}`})},hre=e=>{let{isCustomEndpoint:n,baseHostname:t,clientRegion:r}=e,o=n?t:(0,Se.getSuffixForArnEndpoint)(t)[1],{pathStyleEndpoint:s,accelerateEndpoint:c=!1,fipsEndpoint:i=!1,tlsCompatible:u=!0,bucketName:l,clientPartition:a="aws"}=e;(0,Se.validateArnEndpointOptions)({pathStyleEndpoint:s,accelerateEndpoint:c,tlsCompatible:u});let{service:_,partition:y,accountId:C,region:b,resource:A}=l;(0,Se.validateService)(_),(0,Se.validatePartition)(y,{clientPartition:a}),(0,Se.validateAccountId)(C);let{accesspointName:k,outpostId:K}=(0,Se.getArnResources)(A);return _==="s3-object-lambda"?Cre({...e,tlsCompatible:u,bucketName:l,accesspointName:k,hostnameSuffix:o}):b===""?Sre({...e,clientRegion:r,mrapAlias:k,hostnameSuffix:o}):K?Ere({...e,clientRegion:r,outpostId:K,accesspointName:k,hostnameSuffix:o}):bre({...e,clientRegion:r,accesspointName:k,hostnameSuffix:o})},Cre=({dualstackEndpoint:e=!1,fipsEndpoint:n=!1,tlsCompatible:t=!0,useArnRegion:r,clientRegion:o,clientSigningRegion:s=o,accesspointName:c,bucketName:i,hostnameSuffix:u})=>{let{accountId:l,region:a,service:_}=i;(0,Se.validateRegionalClient)(o),(0,Se.validateRegion)(a,{useArnRegion:r,clientRegion:o,clientSigningRegion:s,allowFipsRegion:!0,useFipsEndpoint:n}),(0,Se.validateNoDualstack)(e);let y=`${c}-${l}`;(0,Se.validateDNSHostLabel)(y,{tlsCompatible:t});let C=r?a:o,b=r?a:s;return{bucketEndpoint:!0,hostname:`${y}.${_}${n?"-fips":""}.${C}.${u}`,signingRegion:b,signingService:_}},Sre=({disableMultiregionAccessPoints:e,dualstackEndpoint:n=!1,isCustomEndpoint:t,mrapAlias:r,hostnameSuffix:o})=>{if(e===!0)throw new Error("SDK is attempting to use a MRAP ARN. Please enable to feature.");return(0,Se.validateMrapAlias)(r),(0,Se.validateNoDualstack)(n),{bucketEndpoint:!0,hostname:`${r}${t?"":".accesspoint.s3-global"}.${o}`,signingRegion:"*"}},Ere=({useArnRegion:e,clientRegion:n,clientSigningRegion:t=n,bucketName:r,outpostId:o,dualstackEndpoint:s=!1,fipsEndpoint:c=!1,tlsCompatible:i=!0,accesspointName:u,isCustomEndpoint:l,hostnameSuffix:a})=>{(0,Se.validateRegionalClient)(n),(0,Se.validateRegion)(r.region,{useArnRegion:e,clientRegion:n,clientSigningRegion:t,useFipsEndpoint:c});let _=`${u}-${r.accountId}`;(0,Se.validateDNSHostLabel)(_,{tlsCompatible:i});let y=e?r.region:n,C=e?r.region:t;return(0,Se.validateOutpostService)(r.service),(0,Se.validateDNSHostLabel)(o,{tlsCompatible:i}),(0,Se.validateNoDualstack)(s),(0,Se.validateNoFIPS)(c),{bucketEndpoint:!0,hostname:`${`${_}.${o}`}${l?"":`.s3-outposts.${y}`}.${a}`,signingRegion:C,signingService:"s3-outposts"}},bre=({useArnRegion:e,clientRegion:n,clientSigningRegion:t=n,bucketName:r,dualstackEndpoint:o=!1,fipsEndpoint:s=!1,tlsCompatible:c=!0,accesspointName:i,isCustomEndpoint:u,hostnameSuffix:l})=>{(0,Se.validateRegionalClient)(n),(0,Se.validateRegion)(r.region,{useArnRegion:e,clientRegion:n,clientSigningRegion:t,allowFipsRegion:!0,useFipsEndpoint:s});let a=`${i}-${r.accountId}`;(0,Se.validateDNSHostLabel)(a,{tlsCompatible:c});let _=e?r.region:n,y=e?r.region:t;return(0,Se.validateS3Service)(r.service),{bucketEndpoint:!0,hostname:`${a}${u?"":`.s3-accesspoint${s?"-fips":""}${o?".dualstack":""}.${_}`}.${l}`,signingRegion:y}}});var jD=m(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.getBucketEndpointPlugin=hn.bucketEndpointMiddlewareOptions=hn.bucketEndpointMiddleware=void 0;var FD=$y(),Pre=we(),LD=xS(),vre=e=>(n,t)=>async r=>{let{Bucket:o}=r.input,s=e.bucketEndpoint,c=r.request;if(Pre.HttpRequest.isInstance(c)){if(e.bucketEndpoint)c.hostname=o;else if((0,FD.validate)(o)){let i=(0,FD.parse)(o),u=await e.region(),l=await e.useDualstackEndpoint(),a=await e.useFipsEndpoint(),{partition:_,signingRegion:y=u}=await e.regionInfoProvider(u,{useDualstackEndpoint:l,useFipsEndpoint:a})||{},C=await e.useArnRegion(),{hostname:b,bucketEndpoint:A,signingRegion:k,signingService:K}=(0,LD.bucketHostname)({bucketName:i,baseHostname:c.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:l,fipsEndpoint:a,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:c.protocol==="https:",useArnRegion:C,clientPartition:_,clientSigningRegion:y,clientRegion:u,isCustomEndpoint:e.isCustomEndpoint,disableMultiregionAccessPoints:await e.disableMultiregionAccessPoints()});k&&k!==y&&(t.signing_region=k),K&&K!=="s3"&&(t.signing_service=K),c.hostname=b,s=A}else{let i=await e.region(),u=await e.useDualstackEndpoint(),l=await e.useFipsEndpoint(),{hostname:a,bucketEndpoint:_}=(0,LD.bucketHostname)({bucketName:o,clientRegion:i,baseHostname:c.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:u,fipsEndpoint:l,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:c.protocol==="https:",isCustomEndpoint:e.isCustomEndpoint});c.hostname=a,s=_}s&&(c.path=c.path.replace(/^(\/)?[^\/]+/,""),c.path===""&&(c.path="/"))}return n({...r,request:c})};hn.bucketEndpointMiddleware=vre;hn.bucketEndpointMiddlewareOptions={tags:["BUCKET_ENDPOINT"],name:"bucketEndpointMiddleware",relation:"before",toMiddleware:"hostHeaderMiddleware",override:!0};var xre=e=>({applyToStack:n=>{n.addRelativeTo((0,hn.bucketEndpointMiddleware)(e),hn.bucketEndpointMiddlewareOptions)}});hn.getBucketEndpointPlugin=xre});var UD=m(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.resolveBucketEndpointConfig=void 0;function wre(e){let{bucketEndpoint:n=!1,forcePathStyle:t=!1,useAccelerateEndpoint:r=!1,useArnRegion:o=!1,disableMultiregionAccessPoints:s=!1}=e;return{...e,bucketEndpoint:n,forcePathStyle:t,useAccelerateEndpoint:r,useArnRegion:typeof o=="function"?o:()=>Promise.resolve(o),disableMultiregionAccessPoints:typeof s=="function"?s:()=>Promise.resolve(s)}}Ff.resolveBucketEndpointConfig=wre});var zD=m(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.validateNoFIPS=ve.validateNoDualstack=ve.validateDNSHostLabel=ve.validateRegion=ve.validateAccountId=ve.validatePartition=ve.validateOutpostService=ve.getSuffixForArnEndpoint=ve.getArnResources=void 0;var Jc=(z(),j(U));Jc.__exportStar(qD(),ve);Jc.__exportStar(MD(),ve);Jc.__exportStar(jD(),ve);Jc.__exportStar(xS(),ve);Jc.__exportStar(UD(),ve);var Gn=vS();Object.defineProperty(ve,"getArnResources",{enumerable:!0,get:function(){return Gn.getArnResources}});Object.defineProperty(ve,"getSuffixForArnEndpoint",{enumerable:!0,get:function(){return Gn.getSuffixForArnEndpoint}});Object.defineProperty(ve,"validateOutpostService",{enumerable:!0,get:function(){return Gn.validateOutpostService}});Object.defineProperty(ve,"validatePartition",{enumerable:!0,get:function(){return Gn.validatePartition}});Object.defineProperty(ve,"validateAccountId",{enumerable:!0,get:function(){return Gn.validateAccountId}});Object.defineProperty(ve,"validateRegion",{enumerable:!0,get:function(){return Gn.validateRegion}});Object.defineProperty(ve,"validateDNSHostLabel",{enumerable:!0,get:function(){return Gn.validateDNSHostLabel}});Object.defineProperty(ve,"validateNoDualstack",{enumerable:!0,get:function(){return Gn.validateNoDualstack}});Object.defineProperty(ve,"validateNoFIPS",{enumerable:!0,get:function(){return Gn.validateNoFIPS}})});var GD=m(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.getChunkedStream=void 0;function kre(e){let n=0,t=0,r=null,o=null,s=i=>{if(typeof i!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+i);n=i,t=4,r=new Uint8Array(i),new DataView(r.buffer).setUint32(0,i,!1)},c=async function*(){let i=e[Symbol.asyncIterator]();for(;;){let{value:u,done:l}=await i.next();if(l){if(n)if(n===t)yield r;else throw new Error("Truncated event message received.");else return;return}let a=u.length,_=0;for(;_{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.getMessageUnmarshaller=Rs.getUnmarshalledStream=void 0;function Are(e,n){let t=HD(n.deserializer,n.toUtf8);return{[Symbol.asyncIterator]:async function*(){for await(let r of e){let o=n.eventStreamCodec.decode(r),s=await t(o);s!==void 0&&(yield s)}}}}Rs.getUnmarshalledStream=Are;function HD(e,n){return async function(t){let{value:r}=t.headers[":message-type"];if(r==="error"){let o=new Error(t.headers[":error-message"].value||"UnknownError");throw o.name=t.headers[":error-code"].value,o}else if(r==="exception"){let o=t.headers[":exception-type"].value,s={[o]:t},c=await e(s);if(c.$unknown){let i=new Error(n(t.body));throw i.name=o,i}throw c[o]}else if(r==="event"){let o={[t.headers[":event-type"].value]:t},s=await e(o);return s.$unknown?void 0:s}else throw Error(`Unrecognizable event type: ${t.headers[":event-type"].value}`)}}Rs.getMessageUnmarshaller=HD});var kS=m(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.EventStreamMarshaller=void 0;var Zc=mg(),Ire=GD(),Rre=$D(),wS=class{constructor({utf8Encoder:n,utf8Decoder:t}){this.eventStreamCodec=new Zc.EventStreamCodec(n,t),this.utfEncoder=n}deserialize(n,t){let r=(0,Ire.getChunkedStream)(n);return new Zc.SmithyMessageDecoderStream({messageStream:new Zc.MessageDecoderStream({inputStream:r,decoder:this.eventStreamCodec}),deserializer:(0,Rre.getMessageUnmarshaller)(t,this.utfEncoder)})}serialize(n,t){return new Zc.MessageEncoderStream({messageStream:new Zc.SmithyMessageEncoderStream({inputStream:n,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};jf.EventStreamMarshaller=wS});var KD=m(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.eventStreamSerdeProvider=void 0;var Nre=kS(),Ore=e=>new Nre.EventStreamMarshaller(e);Uf.eventStreamSerdeProvider=Ore});var XD=m(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var VD=(z(),j(U));VD.__exportStar(kS(),zf);VD.__exportStar(KD(),zf)});var WD=m(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.readabletoIterable=void 0;async function*Tre(e){let n=!1,t=!1,r=new Array;for(e.on("error",o=>{if(n||(n=!0),o)throw o}),e.on("data",o=>{r.push(o)}),e.on("end",()=>{n=!0});!t;){let o=await new Promise(s=>setTimeout(()=>s(r.shift()),0));o&&(yield o),t=n&&r.length===0}}Gf.readabletoIterable=Tre});var IS=m(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.EventStreamMarshaller=void 0;var qre=XD(),Mre=require("stream"),Bre=WD(),AS=class{constructor({utf8Encoder:n,utf8Decoder:t}){this.universalMarshaller=new qre.EventStreamMarshaller({utf8Decoder:t,utf8Encoder:n})}deserialize(n,t){let r=typeof n[Symbol.asyncIterator]=="function"?n:(0,Bre.readabletoIterable)(n);return this.universalMarshaller.deserialize(r,t)}serialize(n,t){return Mre.Readable.from(this.universalMarshaller.serialize(n,t))}};Hf.EventStreamMarshaller=AS});var YD=m($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.eventStreamSerdeProvider=void 0;var Dre=IS(),Fre=e=>new Dre.EventStreamMarshaller(e);$f.eventStreamSerdeProvider=Fre});var JD=m(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var QD=(z(),j(U));QD.__exportStar(IS(),Kf);QD.__exportStar(YD(),Kf)});var NS=m(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.HashCalculator=void 0;var Lre=Pt(),jre=require("stream"),RS=class extends jre.Writable{constructor(n,t){super(t),this.hash=n}_write(n,t,r){try{this.hash.update((0,Lre.toUint8Array)(n))}catch(o){return r(o)}r()}};Vf.HashCalculator=RS});var ZD=m(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.fileStreamHasher=void 0;var Ure=require("fs"),zre=NS(),Gre=(e,n)=>new Promise((t,r)=>{if(!Hre(n)){r(new Error("Unable to calculate hash for non-file streams."));return}let o=(0,Ure.createReadStream)(n.path,{start:n.start,end:n.end}),s=new e,c=new zre.HashCalculator(s);o.pipe(c),o.on("error",i=>{c.end(),r(i)}),c.on("error",r),c.on("finish",function(){s.digest().then(t).catch(r)})});Xf.fileStreamHasher=Gre;var Hre=e=>typeof e.path=="string"});var eF=m(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.readableStreamHasher=void 0;var $re=NS(),Kre=(e,n)=>{if(n.readableFlowing!==null)throw new Error("Unable to calculate hash for flowing readable stream");let t=new e,r=new $re.HashCalculator(t);return n.pipe(r),new Promise((o,s)=>{n.on("error",c=>{r.end(),s(c)}),r.on("error",s),r.on("finish",()=>{t.digest().then(o).catch(s)})})};Wf.readableStreamHasher=Kre});var nF=m(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var tF=(z(),j(U));tF.__exportStar(ZD(),Yf);tF.__exportStar(eF(),Yf)});var Jf=m(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.signatureV4CrtContainer=void 0;Qf.signatureV4CrtContainer={CrtSignerV4:null}});var rF=m(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.loadCrt=void 0;var Vre=Jf();function Xre(){if(!Vre.signatureV4CrtContainer.CrtSignerV4)try{if(typeof require=="function"){let e=require,n="@aws-sdk/signature-v4-crt";e.call(null,n),process.emitWarning(`The package @aws-sdk/signature-v4-crt has been loaded dynamically. +Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,!1);return e};ff.validateSsoProfile=Xee});var mB=m(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.fromSSO=void 0;var Wc=Ce(),JC=Dt(),Wee=gC(),uB=lB(),Yee=QC(),Qee=(e={})=>async()=>{let{ssoStartUrl:n,ssoAccountId:t,ssoRegion:r,ssoRoleName:o,ssoClient:s,ssoSession:c}=e,i=(0,JC.getProfileName)(e);if(!n&&!t&&!r&&!o&&!c){let l=(await(0,JC.parseKnownFiles)(e))[i];if(!l)throw new Wc.CredentialsProviderError(`Profile ${i} was not found.`);if(!(0,Wee.isSsoProfile)(l))throw new Wc.CredentialsProviderError(`Profile ${i} is not configured with SSO credentials.`);if(l!=null&&l.sso_session){let k=(await(0,JC.loadSsoSessionData)(e))[l.sso_session],K=` configurations in profile ${i} and sso-session ${l.sso_session}`;if(r&&r!==k.sso_region)throw new Wc.CredentialsProviderError("Conflicting SSO region"+K,!1);if(n&&n!==k.sso_start_url)throw new Wc.CredentialsProviderError("Conflicting SSO start_url"+K,!1);l.sso_region=k.sso_region,l.sso_start_url=k.sso_start_url}let{sso_start_url:a,sso_account_id:_,sso_region:y,sso_role_name:C,sso_session:b}=(0,Yee.validateSsoProfile)(l);return(0,uB.resolveSSOCredentials)({ssoStartUrl:a,ssoSession:b,ssoAccountId:_,ssoRegion:y,ssoRoleName:C,ssoClient:s,profile:i})}else{if(!n||!t||!r||!o)throw new Wc.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"');return(0,uB.resolveSSOCredentials)({ssoStartUrl:n,ssoSession:c,ssoAccountId:t,ssoRegion:r,ssoRoleName:o,ssoClient:s,profile:i})}};_f.fromSSO=Qee});var fB=m(pB=>{"use strict";Object.defineProperty(pB,"__esModule",{value:!0})});var gf=m(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var yf=(z(),j(U));yf.__exportStar(mB(),hs);yf.__exportStar(gC(),hs);yf.__exportStar(fB(),hs);yf.__exportStar(QC(),hs)});var yB=m(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.resolveSsoCredentials=Cs.isSsoProfile=void 0;var _B=gf(),Jee=gf();Object.defineProperty(Cs,"isSsoProfile",{enumerable:!0,get:function(){return Jee.isSsoProfile}});var Zee=e=>{let{sso_start_url:n,sso_account_id:t,sso_session:r,sso_region:o,sso_role_name:s}=(0,_B.validateSsoProfile)(e);return(0,_B.fromSSO)({ssoStartUrl:n,ssoAccountId:t,ssoSession:r,ssoRegion:o,ssoRoleName:s})()};Cs.resolveSsoCredentials=Zee});var gB=m(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.resolveStaticCredentials=Ss.isStaticCredsProfile=void 0;var ete=e=>!!e&&typeof e=="object"&&typeof e.aws_access_key_id=="string"&&typeof e.aws_secret_access_key=="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1;Ss.isStaticCredsProfile=ete;var tte=e=>Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token});Ss.resolveStaticCredentials=tte});var ZC=m(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.fromWebToken=void 0;var nte=Ce(),rte=e=>()=>{let{roleArn:n,roleSessionName:t,webIdentityToken:r,providerId:o,policyArns:s,policy:c,durationSeconds:i,roleAssumerWithWebIdentity:u}=e;if(!u)throw new nte.CredentialsProviderError(`Role Arn '${n}' needs to be assumed with web identity, but no role assumption callback was provided.`,!1);return u({RoleArn:n,RoleSessionName:t??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:r,ProviderId:o,PolicyArns:s,Policy:c,DurationSeconds:i})};hf.fromWebToken=rte});var hB=m(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.fromTokenFile=void 0;var ote=Ce(),ste=require("fs"),ite=ZC(),ate="AWS_WEB_IDENTITY_TOKEN_FILE",cte="AWS_ROLE_ARN",dte="AWS_ROLE_SESSION_NAME",lte=(e={})=>async()=>{var n,t,r;let o=(n=e==null?void 0:e.webIdentityTokenFile)!==null&&n!==void 0?n:process.env[ate],s=(t=e==null?void 0:e.roleArn)!==null&&t!==void 0?t:process.env[cte],c=(r=e==null?void 0:e.roleSessionName)!==null&&r!==void 0?r:process.env[dte];if(!o||!s)throw new ote.CredentialsProviderError("Web identity configuration not specified");return(0,ite.fromWebToken)({...e,webIdentityToken:(0,ste.readFileSync)(o,{encoding:"ascii"}),roleArn:s,roleSessionName:c})()};Cf.fromTokenFile=lte});var eS=m(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var CB=(z(),j(U));CB.__exportStar(hB(),Sf);CB.__exportStar(ZC(),Sf)});var SB=m(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.resolveWebIdentityCredentials=Es.isWebIdentityProfile=void 0;var ute=eS(),mte=e=>!!e&&typeof e=="object"&&typeof e.web_identity_token_file=="string"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1;Es.isWebIdentityProfile=mte;var pte=async(e,n)=>(0,ute.fromTokenFile)({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:n.roleAssumerWithWebIdentity})();Es.resolveWebIdentityCredentials=pte});var pC=m(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.resolveProfileData=void 0;var fte=Ce(),EB=Mq(),bB=jq(),PB=yB(),Ef=gB(),vB=SB(),_te=async(e,n,t,r={})=>{let o=n[e];if(Object.keys(r).length>0&&(0,Ef.isStaticCredsProfile)(o))return(0,Ef.resolveStaticCredentials)(o);if((0,EB.isAssumeRoleProfile)(o))return(0,EB.resolveAssumeRoleCredentials)(e,n,t,r);if((0,Ef.isStaticCredsProfile)(o))return(0,Ef.resolveStaticCredentials)(o);if((0,vB.isWebIdentityProfile)(o))return(0,vB.resolveWebIdentityCredentials)(o,t);if((0,bB.isProcessProfile)(o))return(0,bB.resolveProcessCredentials)(t,e);if((0,PB.isSsoProfile)(o))return(0,PB.resolveSsoCredentials)(o);throw new fte.CredentialsProviderError(`Profile ${e} could not be found or parsed in shared credentials file.`)};bf.resolveProfileData=_te});var wB=m(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.fromIni=void 0;var xB=Dt(),yte=pC(),gte=(e={})=>async()=>{let n=await(0,xB.parseKnownFiles)(e);return(0,yte.resolveProfileData)((0,xB.getProfileName)(e),n,e)};Pf.fromIni=gte});var kB=m(tS=>{"use strict";Object.defineProperty(tS,"__esModule",{value:!0});var hte=(z(),j(U));hte.__exportStar(wB(),tS)});var AB=m(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.remoteProvider=lo.ENV_IMDS_DISABLED=void 0;var vf=dp(),Cte=Ce();lo.ENV_IMDS_DISABLED="AWS_EC2_METADATA_DISABLED";var Ste=e=>process.env[vf.ENV_CMDS_RELATIVE_URI]||process.env[vf.ENV_CMDS_FULL_URI]?(0,vf.fromContainerMetadata)(e):process.env[lo.ENV_IMDS_DISABLED]?async()=>{throw new Cte.CredentialsProviderError("EC2 Instance Metadata Service access disabled")}:(0,vf.fromInstanceMetadata)(e);lo.remoteProvider=Ste});var IB=m(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.defaultProvider=void 0;var Ete=nC(),bte=kB(),Pte=yC(),vte=gf(),xte=eS(),nS=Ce(),wte=Dt(),kte=AB(),Ate=(e={})=>(0,nS.memoize)((0,nS.chain)(...e.profile||process.env[wte.ENV_PROFILE]?[]:[(0,Ete.fromEnv)()],(0,vte.fromSSO)(e),(0,bte.fromIni)(e),(0,Pte.fromProcess)(e),(0,xte.fromTokenFile)(e),(0,kte.remoteProvider)(e),async()=>{throw new nS.CredentialsProviderError("Could not load credentials from any providers",!1)}),n=>n.expiration!==void 0&&n.expiration.getTime()-Date.now()<3e5,n=>n.expiration!==void 0);xf.defaultProvider=Ate});var oS=m(rS=>{"use strict";Object.defineProperty(rS,"__esModule",{value:!0});var Ite=(z(),j(U));Ite.__exportStar(IB(),rS)});var QB=m(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.ruleSet=void 0;var UB="required",ie="type",ge="fn",he="argv",Ar="ref",RB=!1,Rte=!0,uo="booleanEquals",pn="tree",Qe="stringEquals",zB="sigv4",GB="sts",HB="us-east-1",Ae="endpoint",NB="https://sts.{Region}.{PartitionResult#dnsSuffix}",bs="error",iS="getAttr",OB={[UB]:!1,[ie]:"String"},sS={[UB]:!0,default:!1,[ie]:"Boolean"},$B={[Ar]:"Endpoint"},TB={[ge]:"isSet",[he]:[{[Ar]:"Region"}]},Je={[Ar]:"Region"},qB={[ge]:"aws.partition",[he]:[Je],assign:"PartitionResult"},KB={[Ar]:"UseFIPS"},VB={[Ar]:"UseDualStack"},st={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:zB,signingName:GB,signingRegion:HB}]},headers:{}},Et={},MB={conditions:[{[ge]:Qe,[he]:[Je,"aws-global"]}],[Ae]:st,[ie]:Ae},XB={[ge]:uo,[he]:[KB,!0]},WB={[ge]:uo,[he]:[VB,!0]},BB={[ge]:uo,[he]:[!0,{[ge]:iS,[he]:[{[Ar]:"PartitionResult"},"supportsFIPS"]}]},YB={[Ar]:"PartitionResult"},DB={[ge]:uo,[he]:[!0,{[ge]:iS,[he]:[YB,"supportsDualStack"]}]},FB=[{[ge]:"isSet",[he]:[$B]}],LB=[XB],jB=[WB],Nte={version:"1.0",parameters:{Region:OB,UseDualStack:sS,UseFIPS:sS,Endpoint:OB,UseGlobalEndpoint:sS},rules:[{conditions:[{[ge]:uo,[he]:[{[Ar]:"UseGlobalEndpoint"},Rte]},{[ge]:"not",[he]:FB},TB,qB,{[ge]:uo,[he]:[KB,RB]},{[ge]:uo,[he]:[VB,RB]}],[ie]:pn,rules:[{conditions:[{[ge]:Qe,[he]:[Je,"ap-northeast-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"ap-south-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"ap-southeast-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"ap-southeast-2"]}],endpoint:st,[ie]:Ae},MB,{conditions:[{[ge]:Qe,[he]:[Je,"ca-central-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"eu-central-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"eu-north-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"eu-west-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"eu-west-2"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"eu-west-3"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"sa-east-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,HB]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"us-east-2"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"us-west-1"]}],endpoint:st,[ie]:Ae},{conditions:[{[ge]:Qe,[he]:[Je,"us-west-2"]}],endpoint:st,[ie]:Ae},{endpoint:{url:NB,properties:{authSchemes:[{name:zB,signingName:GB,signingRegion:"{Region}"}]},headers:Et},[ie]:Ae}]},{conditions:FB,[ie]:pn,rules:[{conditions:LB,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[ie]:bs},{conditions:jB,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[ie]:bs},{endpoint:{url:$B,properties:Et,headers:Et},[ie]:Ae}]},{conditions:[TB],[ie]:pn,rules:[{conditions:[qB],[ie]:pn,rules:[{conditions:[XB,WB],[ie]:pn,rules:[{conditions:[BB,DB],[ie]:pn,rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Et,headers:Et},[ie]:Ae}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[ie]:bs}]},{conditions:LB,[ie]:pn,rules:[{conditions:[BB],[ie]:pn,rules:[{conditions:[{[ge]:Qe,[he]:["aws-us-gov",{[ge]:iS,[he]:[YB,"name"]}]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Et,headers:Et},[ie]:Ae},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Et,headers:Et},[ie]:Ae}]},{error:"FIPS is enabled but this partition does not support FIPS",[ie]:bs}]},{conditions:jB,[ie]:pn,rules:[{conditions:[DB],[ie]:pn,rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Et,headers:Et},[ie]:Ae}]},{error:"DualStack is enabled but this partition does not support DualStack",[ie]:bs}]},MB,{endpoint:{url:NB,properties:Et,headers:Et},[ie]:Ae}]}]},{error:"Invalid Configuration: Missing Region",[ie]:bs}]};wf.ruleSet=Nte});var JB=m(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.defaultEndpointResolver=void 0;var Ote=Ko(),Tte=QB(),qte=(e,n={})=>(0,Ote.resolveEndpoint)(Tte.ruleSet,{endpointParams:e,logger:n.logger});kf.defaultEndpointResolver=qte});var tD=m(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.getRuntimeConfig=void 0;var Mte=E(),Bte=Zr(),ZB=Po(),eD=Pt(),Dte=JB(),Fte=e=>({apiVersion:"2011-06-15",base64Decoder:(e==null?void 0:e.base64Decoder)??ZB.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??ZB.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??Dte.defaultEndpointResolver,extensions:(e==null?void 0:e.extensions)??[],logger:(e==null?void 0:e.logger)??new Mte.NoOpLogger,serviceId:(e==null?void 0:e.serviceId)??"STS",urlParser:(e==null?void 0:e.urlParser)??Bte.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??eD.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??eD.toUtf8});Af.getRuntimeConfig=Fte});var oD=m(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.getRuntimeConfig=void 0;var Lte=(z(),j(U)),jte=Lte.__importDefault(vT()),Ute=eC(),zte=oS(),Gte=Tc(),If=Qt(),Hte=qc(),nD=On(),Yc=en(),rD=wo(),$te=Mc(),Kte=Rt(),Vte=tD(),Xte=E(),Wte=Dc(),Yte=E(),Qte=e=>{(0,Yte.emitWarningIfUnsupportedVersion)(process.version);let n=(0,Wte.resolveDefaultsModeConfig)(e),t=()=>n().then(Xte.loadConfigsForDefaultMode),r=(0,Vte.getRuntimeConfig)(e);return{...r,...e,runtime:"node",defaultsMode:n,bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??$te.calculateBodyLength,credentialDefaultProvider:(e==null?void 0:e.credentialDefaultProvider)??(0,Ute.decorateDefaultCredentialProvider)(zte.defaultProvider),defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,Gte.defaultUserAgent)({serviceId:r.serviceId,clientVersion:jte.default.version}),maxAttempts:(e==null?void 0:e.maxAttempts)??(0,Yc.loadConfig)(nD.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),region:(e==null?void 0:e.region)??(0,Yc.loadConfig)(If.NODE_REGION_CONFIG_OPTIONS,If.NODE_REGION_CONFIG_FILE_OPTIONS),requestHandler:(e==null?void 0:e.requestHandler)??new rD.NodeHttpHandler(t),retryMode:(e==null?void 0:e.retryMode)??(0,Yc.loadConfig)({...nD.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await t()).retryMode||Kte.DEFAULT_RETRY_MODE}),sha256:(e==null?void 0:e.sha256)??Hte.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??rD.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,Yc.loadConfig)(If.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,Yc.loadConfig)(If.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)}};Rf.getRuntimeConfig=Qte});var cD=m(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.resolveRuntimeExtensions=void 0;var sD=Np(),iD=we(),aD=E(),aS=e=>e,Jte=(e,n)=>{let t={...aS((0,sD.getAwsRegionExtensionConfiguration)(e)),...aS((0,aD.getDefaultExtensionConfiguration)(e)),...aS((0,iD.getHttpHandlerExtensionConfiguration)(e))};return n.forEach(r=>r.configure(t)),{...e,...(0,sD.resolveAwsRegionExtensionConfiguration)(t),...(0,aD.resolveDefaultRuntimeConfig)(t),...(0,iD.resolveHttpHandlerRuntimeConfig)(t)}};Nf.resolveRuntimeExtensions=Jte});var Of=m(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.STSClient=Ps.__Client=void 0;var dD=Ka(),Zte=Va(),ene=Xa(),tne=bT(),lD=pc(),nne=Qt(),rne=gc(),one=x(),uD=On(),mD=E();Object.defineProperty(Ps,"__Client",{enumerable:!0,get:function(){return mD.Client}});var sne=PT(),ine=oD(),ane=cD(),cS=class e extends mD.Client{constructor(...[n]){let t=(0,ine.getRuntimeConfig)(n||{}),r=(0,sne.resolveClientEndpointParameters)(t),o=(0,nne.resolveRegionConfig)(r),s=(0,one.resolveEndpointConfig)(o),c=(0,uD.resolveRetryConfig)(s),i=(0,dD.resolveHostHeaderConfig)(c),u=(0,tne.resolveStsAuthConfig)(i,{stsClientCtor:e}),l=(0,lD.resolveUserAgentConfig)(u),a=(0,ane.resolveRuntimeExtensions)(l,(n==null?void 0:n.extensions)||[]);super(a),this.config=a,this.middlewareStack.use((0,uD.getRetryPlugin)(this.config)),this.middlewareStack.use((0,rne.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,dD.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,Zte.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,ene.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,lD.getUserAgentPlugin)(this.config))}destroy(){super.destroy()}};Ps.STSClient=cS});var lS=m(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.AssumeRoleWithSAMLCommand=vs.$Command=void 0;var cne=x(),dne=w(),_D=E();Object.defineProperty(vs,"$Command",{enumerable:!0,get:function(){return _D.Command}});var lne=v(),pD=gr(),fD=Mn(),dS=class e extends _D.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,dne.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,cne.getEndpointPlugin)(t,e.getEndpointParameterInstructions()));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"AssumeRoleWithSAMLCommand",inputFilterSensitiveLog:pD.AssumeRoleWithSAMLRequestFilterSensitiveLog,outputFilterSensitiveLog:pD.AssumeRoleWithSAMLResponseFilterSensitiveLog,[lne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"AssumeRoleWithSAML"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,fD.se_AssumeRoleWithSAMLCommand)(n,t)}deserialize(n,t){return(0,fD.de_AssumeRoleWithSAMLCommand)(n,t)}};vs.AssumeRoleWithSAMLCommand=dS});var mS=m(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.DecodeAuthorizationMessageCommand=xs.$Command=void 0;var une=kn(),mne=x(),pne=w(),gD=E();Object.defineProperty(xs,"$Command",{enumerable:!0,get:function(){return gD.Command}});var fne=v(),yD=Mn(),uS=class e extends gD.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,pne.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,mne.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,une.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"DecodeAuthorizationMessageCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:a=>a,[fne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"DecodeAuthorizationMessage"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,yD.se_DecodeAuthorizationMessageCommand)(n,t)}deserialize(n,t){return(0,yD.de_DecodeAuthorizationMessageCommand)(n,t)}};xs.DecodeAuthorizationMessageCommand=uS});var fS=m(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.GetAccessKeyInfoCommand=ws.$Command=void 0;var _ne=kn(),yne=x(),gne=w(),CD=E();Object.defineProperty(ws,"$Command",{enumerable:!0,get:function(){return CD.Command}});var hne=v(),hD=Mn(),pS=class e extends CD.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,gne.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,yne.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,_ne.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"GetAccessKeyInfoCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:a=>a,[hne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"GetAccessKeyInfo"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,hD.se_GetAccessKeyInfoCommand)(n,t)}deserialize(n,t){return(0,hD.de_GetAccessKeyInfoCommand)(n,t)}};ws.GetAccessKeyInfoCommand=pS});var yS=m(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.GetCallerIdentityCommand=ks.$Command=void 0;var Cne=kn(),Sne=x(),Ene=w(),ED=E();Object.defineProperty(ks,"$Command",{enumerable:!0,get:function(){return ED.Command}});var bne=v(),SD=Mn(),_S=class e extends ED.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,Ene.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,Sne.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,Cne.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"GetCallerIdentityCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:a=>a,[bne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"GetCallerIdentity"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,SD.se_GetCallerIdentityCommand)(n,t)}deserialize(n,t){return(0,SD.de_GetCallerIdentityCommand)(n,t)}};ks.GetCallerIdentityCommand=_S});var hS=m(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.GetFederationTokenCommand=As.$Command=void 0;var Pne=kn(),vne=x(),xne=w(),PD=E();Object.defineProperty(As,"$Command",{enumerable:!0,get:function(){return PD.Command}});var wne=v(),kne=gr(),bD=Mn(),gS=class e extends PD.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,xne.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,vne.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,Pne.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"GetFederationTokenCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:kne.GetFederationTokenResponseFilterSensitiveLog,[wne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"GetFederationToken"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,bD.se_GetFederationTokenCommand)(n,t)}deserialize(n,t){return(0,bD.de_GetFederationTokenCommand)(n,t)}};As.GetFederationTokenCommand=gS});var SS=m(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.GetSessionTokenCommand=Is.$Command=void 0;var Ane=kn(),Ine=x(),Rne=w(),xD=E();Object.defineProperty(Is,"$Command",{enumerable:!0,get:function(){return xD.Command}});var Nne=v(),One=gr(),vD=Mn(),CS=class e extends xD.Command{static getEndpointParameterInstructions(){return{UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(n){super(),this.input=n}resolveMiddleware(n,t,r){this.middlewareStack.use((0,Rne.getSerdePlugin)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,Ine.getEndpointPlugin)(t,e.getEndpointParameterInstructions())),this.middlewareStack.use((0,Ane.getAwsAuthPlugin)(t));let o=n.concat(this.middlewareStack),{logger:s}=t,u={logger:s,clientName:"STSClient",commandName:"GetSessionTokenCommand",inputFilterSensitiveLog:a=>a,outputFilterSensitiveLog:One.GetSessionTokenResponseFilterSensitiveLog,[Nne.SMITHY_CONTEXT_KEY]:{service:"AWSSecurityTokenServiceV20110615",operation:"GetSessionToken"}},{requestHandler:l}=t;return o.resolve(a=>l.handle(a.request,r||{}),u)}serialize(n,t){return(0,vD.se_GetSessionTokenCommand)(n,t)}deserialize(n,t){return(0,vD.de_GetSessionTokenCommand)(n,t)}};Is.GetSessionTokenCommand=CS});var wD=m(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.STS=void 0;var Tne=E(),qne=Ym(),Mne=lS(),Bne=Qm(),Dne=mS(),Fne=fS(),Lne=yS(),jne=hS(),Une=SS(),zne=Of(),Gne={AssumeRoleCommand:qne.AssumeRoleCommand,AssumeRoleWithSAMLCommand:Mne.AssumeRoleWithSAMLCommand,AssumeRoleWithWebIdentityCommand:Bne.AssumeRoleWithWebIdentityCommand,DecodeAuthorizationMessageCommand:Dne.DecodeAuthorizationMessageCommand,GetAccessKeyInfoCommand:Fne.GetAccessKeyInfoCommand,GetCallerIdentityCommand:Lne.GetCallerIdentityCommand,GetFederationTokenCommand:jne.GetFederationTokenCommand,GetSessionTokenCommand:Une.GetSessionTokenCommand},Tf=class extends zne.STSClient{};qf.STS=Tf;(0,Tne.createAggregatedClient)(Gne,Tf)});var kD=m(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});var Ir=(z(),j(U));Ir.__exportStar(Ym(),fn);Ir.__exportStar(lS(),fn);Ir.__exportStar(Qm(),fn);Ir.__exportStar(mS(),fn);Ir.__exportStar(fS(),fn);Ir.__exportStar(yS(),fn);Ir.__exportStar(hS(),fn);Ir.__exportStar(SS(),fn)});var AD=m(ES=>{"use strict";Object.defineProperty(ES,"__esModule",{value:!0});var Hne=(z(),j(U));Hne.__exportStar(gr(),ES)});var OD=m(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.decorateDefaultCredentialProvider=_n.getDefaultRoleAssumerWithWebIdentity=_n.getDefaultRoleAssumer=void 0;var ID=eC(),RD=Of(),ND=(e,n)=>n?class extends e{constructor(r){super(r);for(let o of n)this.middlewareStack.use(o)}}:e,$ne=(e={},n)=>(0,ID.getDefaultRoleAssumer)(e,ND(RD.STSClient,n));_n.getDefaultRoleAssumer=$ne;var Kne=(e={},n)=>(0,ID.getDefaultRoleAssumerWithWebIdentity)(e,ND(RD.STSClient,n));_n.getDefaultRoleAssumerWithWebIdentity=Kne;var Vne=e=>n=>e({roleAssumer:(0,_n.getDefaultRoleAssumer)(n),roleAssumerWithWebIdentity:(0,_n.getDefaultRoleAssumerWithWebIdentity)(n),...n});_n.decorateDefaultCredentialProvider=Vne});var TD=m(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.STSServiceException=void 0;var Qc=(z(),j(U));Qc.__exportStar(Of(),zn);Qc.__exportStar(wD(),zn);Qc.__exportStar(kD(),zn);Qc.__exportStar(AD(),zn);Qc.__exportStar(OD(),zn);var Xne=$m();Object.defineProperty(zn,"STSServiceException",{enumerable:!0,get:function(){return Xne.STSServiceException}})});var qD=m(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS=yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME=yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME=void 0;var Mf=fc();yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME="AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS";yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME="s3_disable_multiregion_access_points";yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS={environmentVariableSelector:e=>(0,Mf.booleanSelector)(e,yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME,Mf.SelectorType.ENV),configFileSelector:e=>(0,Mf.booleanSelector)(e,yn.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME,Mf.SelectorType.CONFIG),default:!1}});var MD=m(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.NODE_USE_ARN_REGION_CONFIG_OPTIONS=gn.NODE_USE_ARN_REGION_INI_NAME=gn.NODE_USE_ARN_REGION_ENV_NAME=void 0;var Bf=fc();gn.NODE_USE_ARN_REGION_ENV_NAME="AWS_S3_USE_ARN_REGION";gn.NODE_USE_ARN_REGION_INI_NAME="s3_use_arn_region";gn.NODE_USE_ARN_REGION_CONFIG_OPTIONS={environmentVariableSelector:e=>(0,Bf.booleanSelector)(e,gn.NODE_USE_ARN_REGION_ENV_NAME,Bf.SelectorType.ENV),configFileSelector:e=>(0,Bf.booleanSelector)(e,gn.NODE_USE_ARN_REGION_INI_NAME,Bf.SelectorType.CONFIG),default:!1}});var vS=m(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.validateMrapAlias=re.validateNoFIPS=re.validateNoDualstack=re.getArnResources=re.validateCustomEndpoint=re.validateDNSHostLabel=re.validateAccountId=re.validateRegionalClient=re.validateRegion=re.validatePartition=re.validateOutpostService=re.validateS3Service=re.validateService=re.validateArnEndpointOptions=re.getSuffixForArnEndpoint=re.getSuffix=re.isDnsCompatibleBucketName=re.isBucketNameOptions=re.S3_HOSTNAME_PATTERN=re.DOT_PATTERN=void 0;var Wne=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Yne=/(\d+\.){3}\d+/,Qne=/\.\./;re.DOT_PATTERN=/\./;re.S3_HOSTNAME_PATTERN=/^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./;var BD=/^s3(-external-1)?\.amazonaws\.com$/,PS="amazonaws.com",Jne=e=>typeof e.bucketName=="string";re.isBucketNameOptions=Jne;var Zne=e=>Wne.test(e)&&!Yne.test(e)&&!Qne.test(e);re.isDnsCompatibleBucketName=Zne;var DD=e=>{let n=e.match(re.S3_HOSTNAME_PATTERN);return[n[4],e.replace(new RegExp(`^${n[0]}`),"")]},ere=e=>BD.test(e)?["us-east-1",PS]:DD(e);re.getSuffix=ere;var tre=e=>BD.test(e)?[e.replace(`.${PS}`,""),PS]:DD(e);re.getSuffixForArnEndpoint=tre;var nre=e=>{if(e.pathStyleEndpoint)throw new Error("Path-style S3 endpoint is not supported when bucket is an ARN");if(e.accelerateEndpoint)throw new Error("Accelerate endpoint is not supported when bucket is an ARN");if(!e.tlsCompatible)throw new Error("HTTPS is required when bucket is an ARN")};re.validateArnEndpointOptions=nre;var rre=e=>{if(e!=="s3"&&e!=="s3-outposts"&&e!=="s3-object-lambda")throw new Error("Expect 's3' or 's3-outposts' or 's3-object-lambda' in ARN service component")};re.validateService=rre;var ore=e=>{if(e!=="s3")throw new Error("Expect 's3' in Accesspoint ARN service component")};re.validateS3Service=ore;var sre=e=>{if(e!=="s3-outposts")throw new Error("Expect 's3-posts' in Outpost ARN service component")};re.validateOutpostService=sre;var ire=(e,n)=>{if(e!==n.clientPartition)throw new Error(`Partition in ARN is incompatible, got "${e}" but expected "${n.clientPartition}"`)};re.validatePartition=ire;var are=(e,n)=>{if(e==="")throw new Error("ARN region is empty");if(n.useFipsEndpoint)if(n.allowFipsRegion){if(!bS(e,n.clientRegion))throw new Error(`Client FIPS region ${n.clientRegion} doesn't match region ${e} in ARN`)}else throw new Error("FIPS region is not supported");if(!n.useArnRegion&&!bS(e,n.clientRegion||"")&&!bS(e,n.clientSigningRegion||""))throw new Error(`Region in ARN is incompatible, got ${e} but expected ${n.clientRegion}`)};re.validateRegion=are;var cre=e=>{if(["s3-external-1","aws-global"].includes(e))throw new Error(`Client region ${e} is not regional`)};re.validateRegionalClient=cre;var bS=(e,n)=>e===n,dre=e=>{if(!/[0-9]{12}/.exec(e))throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'")};re.validateAccountId=dre;var lre=(e,n={tlsCompatible:!0})=>{if(e.length>=64||!/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(e)||/(\d+\.){3}\d+/.test(e)||/[.-]{2}/.test(e)||n!=null&&n.tlsCompatible&&re.DOT_PATTERN.test(e))throw new Error(`Invalid DNS label ${e}`)};re.validateDNSHostLabel=lre;var ure=e=>{if(e.isCustomEndpoint){if(e.dualstackEndpoint)throw new Error("Dualstack endpoint is not supported with custom endpoint");if(e.accelerateEndpoint)throw new Error("Accelerate endpoint is not supported with custom endpoint")}};re.validateCustomEndpoint=ure;var mre=e=>{let n=e.includes(":")?":":"/",[t,...r]=e.split(n);if(t==="accesspoint"){if(r.length!==1||r[0]==="")throw new Error(`Access Point ARN should have one resource accesspoint${n}{accesspointname}`);return{accesspointName:r[0]}}else if(t==="outpost"){if(!r[0]||r[1]!=="accesspoint"||!r[2]||r.length!==3)throw new Error(`Outpost ARN should have resource outpost${n}{outpostId}${n}accesspoint${n}{accesspointName}`);let[o,s,c]=r;return{outpostId:o,accesspointName:c}}else throw new Error(`ARN resource should begin with 'accesspoint${n}' or 'outpost${n}'`)};re.getArnResources=mre;var pre=e=>{if(e)throw new Error("Dualstack endpoint is not supported with Outpost or Multi-region Access Point ARN.")};re.validateNoDualstack=pre;var fre=e=>{if(e)throw new Error("FIPS region is not supported with Outpost.")};re.validateNoFIPS=fre;var _re=e=>{try{e.split(".").forEach(n=>{(0,re.validateDNSHostLabel)(n)})}catch{throw new Error(`"${e}" is not a DNS compatible name.`)}};re.validateMrapAlias=_re});var xS=m(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.bucketHostname=void 0;var Se=vS(),yre=e=>((0,Se.validateCustomEndpoint)(e),(0,Se.isBucketNameOptions)(e)?gre(e):hre(e));Df.bucketHostname=yre;var gre=({accelerateEndpoint:e=!1,clientRegion:n,baseHostname:t,bucketName:r,dualstackEndpoint:o=!1,fipsEndpoint:s=!1,pathStyleEndpoint:c=!1,tlsCompatible:i=!0,isCustomEndpoint:u=!1})=>{let[l,a]=u?[n,t]:(0,Se.getSuffix)(t);return c||!(0,Se.isDnsCompatibleBucketName)(r)||i&&Se.DOT_PATTERN.test(r)?{bucketEndpoint:!1,hostname:o?`s3.dualstack.${l}.${a}`:t}:(e?t=`s3-accelerate${o?".dualstack":""}.${a}`:o&&(t=`s3.dualstack.${l}.${a}`),{bucketEndpoint:!0,hostname:`${r}.${t}`})},hre=e=>{let{isCustomEndpoint:n,baseHostname:t,clientRegion:r}=e,o=n?t:(0,Se.getSuffixForArnEndpoint)(t)[1],{pathStyleEndpoint:s,accelerateEndpoint:c=!1,fipsEndpoint:i=!1,tlsCompatible:u=!0,bucketName:l,clientPartition:a="aws"}=e;(0,Se.validateArnEndpointOptions)({pathStyleEndpoint:s,accelerateEndpoint:c,tlsCompatible:u});let{service:_,partition:y,accountId:C,region:b,resource:A}=l;(0,Se.validateService)(_),(0,Se.validatePartition)(y,{clientPartition:a}),(0,Se.validateAccountId)(C);let{accesspointName:k,outpostId:K}=(0,Se.getArnResources)(A);return _==="s3-object-lambda"?Cre({...e,tlsCompatible:u,bucketName:l,accesspointName:k,hostnameSuffix:o}):b===""?Sre({...e,clientRegion:r,mrapAlias:k,hostnameSuffix:o}):K?Ere({...e,clientRegion:r,outpostId:K,accesspointName:k,hostnameSuffix:o}):bre({...e,clientRegion:r,accesspointName:k,hostnameSuffix:o})},Cre=({dualstackEndpoint:e=!1,fipsEndpoint:n=!1,tlsCompatible:t=!0,useArnRegion:r,clientRegion:o,clientSigningRegion:s=o,accesspointName:c,bucketName:i,hostnameSuffix:u})=>{let{accountId:l,region:a,service:_}=i;(0,Se.validateRegionalClient)(o),(0,Se.validateRegion)(a,{useArnRegion:r,clientRegion:o,clientSigningRegion:s,allowFipsRegion:!0,useFipsEndpoint:n}),(0,Se.validateNoDualstack)(e);let y=`${c}-${l}`;(0,Se.validateDNSHostLabel)(y,{tlsCompatible:t});let C=r?a:o,b=r?a:s;return{bucketEndpoint:!0,hostname:`${y}.${_}${n?"-fips":""}.${C}.${u}`,signingRegion:b,signingService:_}},Sre=({disableMultiregionAccessPoints:e,dualstackEndpoint:n=!1,isCustomEndpoint:t,mrapAlias:r,hostnameSuffix:o})=>{if(e===!0)throw new Error("SDK is attempting to use a MRAP ARN. Please enable to feature.");return(0,Se.validateMrapAlias)(r),(0,Se.validateNoDualstack)(n),{bucketEndpoint:!0,hostname:`${r}${t?"":".accesspoint.s3-global"}.${o}`,signingRegion:"*"}},Ere=({useArnRegion:e,clientRegion:n,clientSigningRegion:t=n,bucketName:r,outpostId:o,dualstackEndpoint:s=!1,fipsEndpoint:c=!1,tlsCompatible:i=!0,accesspointName:u,isCustomEndpoint:l,hostnameSuffix:a})=>{(0,Se.validateRegionalClient)(n),(0,Se.validateRegion)(r.region,{useArnRegion:e,clientRegion:n,clientSigningRegion:t,useFipsEndpoint:c});let _=`${u}-${r.accountId}`;(0,Se.validateDNSHostLabel)(_,{tlsCompatible:i});let y=e?r.region:n,C=e?r.region:t;return(0,Se.validateOutpostService)(r.service),(0,Se.validateDNSHostLabel)(o,{tlsCompatible:i}),(0,Se.validateNoDualstack)(s),(0,Se.validateNoFIPS)(c),{bucketEndpoint:!0,hostname:`${`${_}.${o}`}${l?"":`.s3-outposts.${y}`}.${a}`,signingRegion:C,signingService:"s3-outposts"}},bre=({useArnRegion:e,clientRegion:n,clientSigningRegion:t=n,bucketName:r,dualstackEndpoint:o=!1,fipsEndpoint:s=!1,tlsCompatible:c=!0,accesspointName:i,isCustomEndpoint:u,hostnameSuffix:l})=>{(0,Se.validateRegionalClient)(n),(0,Se.validateRegion)(r.region,{useArnRegion:e,clientRegion:n,clientSigningRegion:t,allowFipsRegion:!0,useFipsEndpoint:s});let a=`${i}-${r.accountId}`;(0,Se.validateDNSHostLabel)(a,{tlsCompatible:c});let _=e?r.region:n,y=e?r.region:t;return(0,Se.validateS3Service)(r.service),{bucketEndpoint:!0,hostname:`${a}${u?"":`.s3-accesspoint${s?"-fips":""}${o?".dualstack":""}.${_}`}.${l}`,signingRegion:y}}});var jD=m(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.getBucketEndpointPlugin=hn.bucketEndpointMiddlewareOptions=hn.bucketEndpointMiddleware=void 0;var FD=$y(),Pre=we(),LD=xS(),vre=e=>(n,t)=>async r=>{let{Bucket:o}=r.input,s=e.bucketEndpoint,c=r.request;if(Pre.HttpRequest.isInstance(c)){if(e.bucketEndpoint)c.hostname=o;else if((0,FD.validate)(o)){let i=(0,FD.parse)(o),u=await e.region(),l=await e.useDualstackEndpoint(),a=await e.useFipsEndpoint(),{partition:_,signingRegion:y=u}=await e.regionInfoProvider(u,{useDualstackEndpoint:l,useFipsEndpoint:a})||{},C=await e.useArnRegion(),{hostname:b,bucketEndpoint:A,signingRegion:k,signingService:K}=(0,LD.bucketHostname)({bucketName:i,baseHostname:c.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:l,fipsEndpoint:a,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:c.protocol==="https:",useArnRegion:C,clientPartition:_,clientSigningRegion:y,clientRegion:u,isCustomEndpoint:e.isCustomEndpoint,disableMultiregionAccessPoints:await e.disableMultiregionAccessPoints()});k&&k!==y&&(t.signing_region=k),K&&K!=="s3"&&(t.signing_service=K),c.hostname=b,s=A}else{let i=await e.region(),u=await e.useDualstackEndpoint(),l=await e.useFipsEndpoint(),{hostname:a,bucketEndpoint:_}=(0,LD.bucketHostname)({bucketName:o,clientRegion:i,baseHostname:c.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:u,fipsEndpoint:l,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:c.protocol==="https:",isCustomEndpoint:e.isCustomEndpoint});c.hostname=a,s=_}s&&(c.path=c.path.replace(/^(\/)?[^\/]+/,""),c.path===""&&(c.path="/"))}return n({...r,request:c})};hn.bucketEndpointMiddleware=vre;hn.bucketEndpointMiddlewareOptions={tags:["BUCKET_ENDPOINT"],name:"bucketEndpointMiddleware",relation:"before",toMiddleware:"hostHeaderMiddleware",override:!0};var xre=e=>({applyToStack:n=>{n.addRelativeTo((0,hn.bucketEndpointMiddleware)(e),hn.bucketEndpointMiddlewareOptions)}});hn.getBucketEndpointPlugin=xre});var UD=m(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.resolveBucketEndpointConfig=void 0;function wre(e){let{bucketEndpoint:n=!1,forcePathStyle:t=!1,useAccelerateEndpoint:r=!1,useArnRegion:o=!1,disableMultiregionAccessPoints:s=!1}=e;return{...e,bucketEndpoint:n,forcePathStyle:t,useAccelerateEndpoint:r,useArnRegion:typeof o=="function"?o:()=>Promise.resolve(o),disableMultiregionAccessPoints:typeof s=="function"?s:()=>Promise.resolve(s)}}Ff.resolveBucketEndpointConfig=wre});var zD=m(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.validateNoFIPS=ve.validateNoDualstack=ve.validateDNSHostLabel=ve.validateRegion=ve.validateAccountId=ve.validatePartition=ve.validateOutpostService=ve.getSuffixForArnEndpoint=ve.getArnResources=void 0;var Jc=(z(),j(U));Jc.__exportStar(qD(),ve);Jc.__exportStar(MD(),ve);Jc.__exportStar(jD(),ve);Jc.__exportStar(xS(),ve);Jc.__exportStar(UD(),ve);var Gn=vS();Object.defineProperty(ve,"getArnResources",{enumerable:!0,get:function(){return Gn.getArnResources}});Object.defineProperty(ve,"getSuffixForArnEndpoint",{enumerable:!0,get:function(){return Gn.getSuffixForArnEndpoint}});Object.defineProperty(ve,"validateOutpostService",{enumerable:!0,get:function(){return Gn.validateOutpostService}});Object.defineProperty(ve,"validatePartition",{enumerable:!0,get:function(){return Gn.validatePartition}});Object.defineProperty(ve,"validateAccountId",{enumerable:!0,get:function(){return Gn.validateAccountId}});Object.defineProperty(ve,"validateRegion",{enumerable:!0,get:function(){return Gn.validateRegion}});Object.defineProperty(ve,"validateDNSHostLabel",{enumerable:!0,get:function(){return Gn.validateDNSHostLabel}});Object.defineProperty(ve,"validateNoDualstack",{enumerable:!0,get:function(){return Gn.validateNoDualstack}});Object.defineProperty(ve,"validateNoFIPS",{enumerable:!0,get:function(){return Gn.validateNoFIPS}})});var GD=m(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.getChunkedStream=void 0;function kre(e){let n=0,t=0,r=null,o=null,s=i=>{if(typeof i!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+i);n=i,t=4,r=new Uint8Array(i),new DataView(r.buffer).setUint32(0,i,!1)},c=async function*(){let i=e[Symbol.asyncIterator]();for(;;){let{value:u,done:l}=await i.next();if(l){if(n)if(n===t)yield r;else throw new Error("Truncated event message received.");else return;return}let a=u.length,_=0;for(;_{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.getMessageUnmarshaller=Rs.getUnmarshalledStream=void 0;function Are(e,n){let t=HD(n.deserializer,n.toUtf8);return{[Symbol.asyncIterator]:async function*(){for await(let r of e){let o=n.eventStreamCodec.decode(r),s=await t(o);s!==void 0&&(yield s)}}}}Rs.getUnmarshalledStream=Are;function HD(e,n){return async function(t){let{value:r}=t.headers[":message-type"];if(r==="error"){let o=new Error(t.headers[":error-message"].value||"UnknownError");throw o.name=t.headers[":error-code"].value,o}else if(r==="exception"){let o=t.headers[":exception-type"].value,s={[o]:t},c=await e(s);if(c.$unknown){let i=new Error(n(t.body));throw i.name=o,i}throw c[o]}else if(r==="event"){let o={[t.headers[":event-type"].value]:t},s=await e(o);return s.$unknown?void 0:s}else throw Error(`Unrecognizable event type: ${t.headers[":event-type"].value}`)}}Rs.getMessageUnmarshaller=HD});var kS=m(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.EventStreamMarshaller=void 0;var Zc=mg(),Ire=GD(),Rre=$D(),wS=class{constructor({utf8Encoder:n,utf8Decoder:t}){this.eventStreamCodec=new Zc.EventStreamCodec(n,t),this.utfEncoder=n}deserialize(n,t){let r=(0,Ire.getChunkedStream)(n);return new Zc.SmithyMessageDecoderStream({messageStream:new Zc.MessageDecoderStream({inputStream:r,decoder:this.eventStreamCodec}),deserializer:(0,Rre.getMessageUnmarshaller)(t,this.utfEncoder)})}serialize(n,t){return new Zc.MessageEncoderStream({messageStream:new Zc.SmithyMessageEncoderStream({inputStream:n,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};jf.EventStreamMarshaller=wS});var KD=m(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.eventStreamSerdeProvider=void 0;var Nre=kS(),Ore=e=>new Nre.EventStreamMarshaller(e);Uf.eventStreamSerdeProvider=Ore});var XD=m(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var VD=(z(),j(U));VD.__exportStar(kS(),zf);VD.__exportStar(KD(),zf)});var WD=m(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.readabletoIterable=void 0;async function*Tre(e){let n=!1,t=!1,r=new Array;for(e.on("error",o=>{if(n||(n=!0),o)throw o}),e.on("data",o=>{r.push(o)}),e.on("end",()=>{n=!0});!t;){let o=await new Promise(s=>setTimeout(()=>s(r.shift()),0));o&&(yield o),t=n&&r.length===0}}Gf.readabletoIterable=Tre});var IS=m(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.EventStreamMarshaller=void 0;var qre=XD(),Mre=require("stream"),Bre=WD(),AS=class{constructor({utf8Encoder:n,utf8Decoder:t}){this.universalMarshaller=new qre.EventStreamMarshaller({utf8Decoder:t,utf8Encoder:n})}deserialize(n,t){let r=typeof n[Symbol.asyncIterator]=="function"?n:(0,Bre.readabletoIterable)(n);return this.universalMarshaller.deserialize(r,t)}serialize(n,t){return Mre.Readable.from(this.universalMarshaller.serialize(n,t))}};Hf.EventStreamMarshaller=AS});var YD=m($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.eventStreamSerdeProvider=void 0;var Dre=IS(),Fre=e=>new Dre.EventStreamMarshaller(e);$f.eventStreamSerdeProvider=Fre});var JD=m(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var QD=(z(),j(U));QD.__exportStar(IS(),Kf);QD.__exportStar(YD(),Kf)});var NS=m(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.HashCalculator=void 0;var Lre=Pt(),jre=require("stream"),RS=class extends jre.Writable{constructor(n,t){super(t),this.hash=n}_write(n,t,r){try{this.hash.update((0,Lre.toUint8Array)(n))}catch(o){return r(o)}r()}};Vf.HashCalculator=RS});var ZD=m(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.fileStreamHasher=void 0;var Ure=require("fs"),zre=NS(),Gre=(e,n)=>new Promise((t,r)=>{if(!Hre(n)){r(new Error("Unable to calculate hash for non-file streams."));return}let o=(0,Ure.createReadStream)(n.path,{start:n.start,end:n.end}),s=new e,c=new zre.HashCalculator(s);o.pipe(c),o.on("error",i=>{c.end(),r(i)}),c.on("error",r),c.on("finish",function(){s.digest().then(t).catch(r)})});Xf.fileStreamHasher=Gre;var Hre=e=>typeof e.path=="string"});var eF=m(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.readableStreamHasher=void 0;var $re=NS(),Kre=(e,n)=>{if(n.readableFlowing!==null)throw new Error("Unable to calculate hash for flowing readable stream");let t=new e,r=new $re.HashCalculator(t);return n.pipe(r),new Promise((o,s)=>{n.on("error",c=>{r.end(),s(c)}),r.on("error",s),r.on("finish",()=>{t.digest().then(o).catch(s)})})};Wf.readableStreamHasher=Kre});var nF=m(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var tF=(z(),j(U));tF.__exportStar(ZD(),Yf);tF.__exportStar(eF(),Yf)});var Jf=m(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.signatureV4CrtContainer=void 0;Qf.signatureV4CrtContainer={CrtSignerV4:null}});var rF=m(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.loadCrt=void 0;var Vre=Jf();function Xre(){if(!Vre.signatureV4CrtContainer.CrtSignerV4)try{typeof require=="function"&&(require.call(null,"@aws-sdk/signature-v4-crt"),process.emitWarning(`The package @aws-sdk/signature-v4-crt has been loaded dynamically. To avoid this warning, please explicitly import the package in your application with: import "@aws-sdk/signature-v4-crt"; // ESM @@ -36,7 +36,7 @@ In a future version of the AWS SDK for JavaScript (v3), this warning will become an error and dynamic loading will not be available. See https://github.com/aws/aws-sdk-js-v3/issues/5229. -`)}}catch{}}Zf.loadCrt=Xre});var oF=m(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});e_.SignatureV4MultiRegion=void 0;var Wre=vg(),Yre=rF(),Qre=Jf(),OS=class{constructor(n){this.sigv4Signer=new Wre.SignatureV4(n),this.signerOptions=n}async sign(n,t={}){if(t.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(n,t)}return this.sigv4Signer.sign(n,t)}async presign(n,t={}){if(t.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(n,t)}return this.sigv4Signer.presign(n,t)}getSigv4aSigner(){if(!this.sigv4aSigner){let n=null;try{if((0,Yre.loadCrt)(),n=Qre.signatureV4CrtContainer.CrtSignerV4,typeof n!="function")throw new Error}catch(t){throw t.message=`${t.message} +`))}catch{}}Zf.loadCrt=Xre});var oF=m(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});e_.SignatureV4MultiRegion=void 0;var Wre=vg(),Yre=rF(),Qre=Jf(),OS=class{constructor(n){this.sigv4Signer=new Wre.SignatureV4(n),this.signerOptions=n}async sign(n,t={}){if(t.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(n,t)}return this.sigv4Signer.sign(n,t)}async presign(n,t={}){if(t.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(n,t)}return this.sigv4Signer.presign(n,t)}getSigv4aSigner(){if(!this.sigv4aSigner){let n=null;try{if((0,Yre.loadCrt)(),n=Qre.signatureV4CrtContainer.CrtSignerV4,typeof n!="function")throw new Error}catch(t){throw t.message=`${t.message} Please check if you have installed "@aws-sdk/signature-v4-crt" package explicitly. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,t}this.sigv4aSigner=new n({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}};e_.SignatureV4MultiRegion=OS});var iF=m(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});var sF=(z(),j(U));sF.__exportStar(oF(),t_);sF.__exportStar(Jf(),t_)});var gL=m(a_=>{"use strict";Object.defineProperty(a_,"__esModule",{value:!0});a_.ruleSet=void 0;var sE="required",g="type",S="conditions",I="fn",R="argv",se="ref",Ze="assign",W="url",Y="properties",$n="authSchemes",Kn="disableDoubleEncoding",Vn="signingName",Or="signingRegion",Q="headers",aF=!1,Cn=!0,Sn="isSet",G="tree",it="booleanEquals",X="error",s_="aws.partition",Te="stringEquals",Be="getAttr",Ot="name",ed="substring",eL="hardwareType",tL="regionPrefix",cF="bucketAliasSuffix",nE="outpostId",mo="isValidHostLabel",Lt="not",nL="parseURL",iE="s3-outposts",H="endpoint",dF="aws.isVirtualHostableS3Bucket",Os="s3",rL="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",oL="{url#scheme}://{Bucket}.{url#authority}{url#path}",sL="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",lF="https://{Bucket}.s3.{partitionResult#dnsSuffix}",iL="aws.parseArn",aL="bucketArn",cL="arnType",i_="",aE="s3-object-lambda",dL="accesspoint",cE="accessPointName",uF="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",mF="mrapPartition",pF="outpostType",fF="arnPrefix",lL="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",_F="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",rE="{url#scheme}://{url#authority}{url#path}",yF="https://s3.{partitionResult#dnsSuffix}",TS={[sE]:!1,[g]:"String"},Ns={[sE]:!0,default:!1,[g]:"Boolean"},qS={[sE]:!1,[g]:"Boolean"},Ft={[I]:it,[R]:[{[se]:"Accelerate"},!0]},Ie={[I]:it,[R]:[{[se]:"UseFIPS"},!0]},be={[I]:it,[R]:[{[se]:"UseDualStack"},!0]},Me={[I]:Sn,[R]:[{[se]:"Endpoint"}]},uL={[I]:s_,[R]:[{[se]:"Region"}],[Ze]:"partitionResult"},gF={[I]:Te,[R]:[{[I]:Be,[R]:[{[se]:"partitionResult"},Ot]},"aws-cn"]},mL={[I]:Sn,[R]:[{[se]:"Bucket"}]},Hn={[se]:"Bucket"},hF={[se]:eL},CF={[S]:[{[I]:Lt,[R]:[Me]}],[X]:"Expected a endpoint to be specified but no endpoint was found",[g]:X},oe={[I]:Lt,[R]:[Me]},dt={[I]:nL,[R]:[{[se]:"Endpoint"}],[Ze]:"url"},n_={[$n]:[{[Kn]:!0,[Ot]:"sigv4",[Vn]:iE,[Or]:"{Region}"}]},de={},MS={[I]:it,[R]:[{[se]:"ForcePathStyle"},!1]},Jre={[se]:"ForcePathStyle"},je={[I]:it,[R]:[{[se]:"Accelerate"},!1]},ze={[I]:Te,[R]:[{[se]:"Region"},"aws-global"]},Ke={[$n]:[{[Kn]:!0,[Ot]:"sigv4",[Vn]:Os,[Or]:"us-east-1"}]},pe={[I]:Lt,[R]:[ze]},Ve={[I]:it,[R]:[{[se]:"UseGlobalEndpoint"},!0]},SF={[W]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[Y]:{[$n]:[{[Kn]:!0,[Ot]:"sigv4",[Vn]:Os,[Or]:"{Region}"}]},[Q]:{}},Ue={[$n]:[{[Kn]:!0,[Ot]:"sigv4",[Vn]:Os,[Or]:"{Region}"}]},Xe={[I]:it,[R]:[{[se]:"UseGlobalEndpoint"},!1]},ue={[I]:it,[R]:[{[se]:"UseDualStack"},!1]},EF={[W]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[Y]:Ue,[Q]:{}},ae={[I]:it,[R]:[{[se]:"UseFIPS"},!1]},bF={[W]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[Y]:Ue,[Q]:{}},PF={[W]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[Y]:Ue,[Q]:{}},BS={[I]:it,[R]:[{[I]:Be,[R]:[{[se]:"url"},"isIp"]},!0]},pL={[se]:"url"},DS={[I]:it,[R]:[{[I]:Be,[R]:[pL,"isIp"]},!1]},FS={[W]:rL,[Y]:Ue,[Q]:{}},oE={[W]:oL,[Y]:Ue,[Q]:{}},vF={[H]:oE,[g]:H},LS={[W]:sL,[Y]:Ue,[Q]:{}},xF={[W]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[Y]:Ue,[Q]:{}},r_={[X]:"Invalid region: region was not a valid DNS name.",[g]:X},_t={[se]:aL},fL={[se]:cL},jS={[I]:Be,[R]:[_t,"service"]},dE={[se]:cE},wF={[S]:[be],[X]:"S3 Object Lambda does not support Dual-stack",[g]:X},kF={[S]:[Ft],[X]:"S3 Object Lambda does not support S3 Accelerate",[g]:X},AF={[S]:[{[I]:Sn,[R]:[{[se]:"DisableAccessPoints"}]},{[I]:it,[R]:[{[se]:"DisableAccessPoints"},!0]}],[X]:"Access points are not supported for this operation",[g]:X},US={[S]:[{[I]:Sn,[R]:[{[se]:"UseArnRegion"}]},{[I]:it,[R]:[{[se]:"UseArnRegion"},!1]},{[I]:Lt,[R]:[{[I]:Te,[R]:[{[I]:Be,[R]:[_t,"region"]},"{Region}"]}]}],[X]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[g]:X},_L={[I]:Be,[R]:[{[se]:"bucketPartition"},Ot]},yL={[I]:Be,[R]:[_t,"accountId"]},zS={[$n]:[{[Kn]:!0,[Ot]:"sigv4",[Vn]:aE,[Or]:"{bucketArn#region}"}]},IF={[X]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[g]:X},GS={[X]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[g]:X},HS={[X]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[g]:X},$S={[X]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[g]:X},RF={[X]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[g]:X},NF={[X]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[g]:X},td={[$n]:[{[Kn]:!0,[Ot]:"sigv4",[Vn]:Os,[Or]:"{bucketArn#region}"}]},OF={[$n]:[{[Kn]:!0,[Ot]:"sigv4",[Vn]:iE,[Or]:"{bucketArn#region}"}]},TF={[I]:iL,[R]:[Hn]},qF={[W]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Y]:Ue,[Q]:{}},MF={[W]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Y]:Ue,[Q]:{}},BF={[W]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Y]:Ue,[Q]:{}},KS={[W]:lL,[Y]:Ue,[Q]:{}},DF={[W]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Y]:Ue,[Q]:{}},FF={[se]:"UseObjectLambdaEndpoint"},VS={[$n]:[{[Kn]:!0,[Ot]:"sigv4",[Vn]:aE,[Or]:"{Region}"}]},LF={[W]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[Y]:Ue,[Q]:{}},jF={[W]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[Y]:Ue,[Q]:{}},UF={[W]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[Y]:Ue,[Q]:{}},XS={[W]:rE,[Y]:Ue,[Q]:{}},zF={[W]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[Y]:Ue,[Q]:{}},WS=[{[se]:"Region"}],Zre=[{[se]:"Endpoint"}],GF=[Hn],HF=[{[I]:mo,[R]:[{[se]:nE},!1]}],$F=[{[I]:Te,[R]:[{[se]:tL},"beta"]}],nd=[Me,dt],KF=[mL],Rr=[uL],VF=[{[I]:mo,[R]:[{[se]:"Region"},!1]}],Nr=[{[I]:Te,[R]:[{[se]:"Region"},"us-east-1"]}],YS=[{[I]:Te,[R]:[fL,dL]}],XF=[{[I]:Be,[R]:[_t,"resourceId[1]"],[Ze]:cE},{[I]:Lt,[R]:[{[I]:Te,[R]:[dE,i_]}]}],eoe=[_t,"resourceId[1]"],WF=[be],QS=[Ft],JS=[{[I]:Lt,[R]:[{[I]:Te,[R]:[{[I]:Be,[R]:[_t,"region"]},i_]}]}],YF=[{[I]:Lt,[R]:[{[I]:Sn,[R]:[{[I]:Be,[R]:[_t,"resourceId[2]"]}]}]}],toe=[_t,"resourceId[2]"],ZS=[{[I]:s_,[R]:[{[I]:Be,[R]:[_t,"region"]}],[Ze]:"bucketPartition"}],QF=[{[I]:Te,[R]:[_L,{[I]:Be,[R]:[{[se]:"partitionResult"},Ot]}]}],eE=[{[I]:mo,[R]:[{[I]:Be,[R]:[_t,"region"]},!0]}],tE=[{[I]:mo,[R]:[yL,!1]}],JF=[{[I]:mo,[R]:[dE,!1]}],o_=[Ie],ZF=[{[I]:mo,[R]:[{[se]:"Region"},!0]}],noe={version:"1.0",parameters:{Bucket:TS,Region:TS,UseFIPS:Ns,UseDualStack:Ns,Endpoint:TS,ForcePathStyle:Ns,Accelerate:Ns,UseGlobalEndpoint:Ns,UseObjectLambdaEndpoint:qS,DisableAccessPoints:qS,DisableMultiRegionAccessPoints:Ns,UseArnRegion:qS},rules:[{[S]:[{[I]:Sn,[R]:WS}],[g]:G,rules:[{[S]:[Ft,Ie],error:"Accelerate cannot be used with FIPS",[g]:X},{[S]:[be,Me],error:"Cannot set dual-stack in combination with a custom endpoint.",[g]:X},{[S]:[Me,Ie],error:"A custom endpoint cannot be combined with FIPS",[g]:X},{[S]:[Me,Ft],error:"A custom endpoint cannot be combined with S3 Accelerate",[g]:X},{[S]:[Ie,uL,gF],error:"Partition does not support FIPS",[g]:X},{[S]:[mL,{[I]:ed,[R]:[Hn,49,50,Cn],[Ze]:eL},{[I]:ed,[R]:[Hn,8,12,Cn],[Ze]:tL},{[I]:ed,[R]:[Hn,0,7,Cn],[Ze]:cF},{[I]:ed,[R]:[Hn,32,49,Cn],[Ze]:nE},{[I]:s_,[R]:WS,[Ze]:"regionPartition"},{[I]:Te,[R]:[{[se]:cF},"--op-s3"]}],[g]:G,rules:[{[S]:HF,[g]:G,rules:[{[S]:[{[I]:Te,[R]:[hF,"e"]}],[g]:G,rules:[{[S]:$F,[g]:G,rules:[CF,{[S]:nd,endpoint:{[W]:"https://{Bucket}.ec2.{url#authority}",[Y]:n_,[Q]:de},[g]:H}]},{endpoint:{[W]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[Y]:n_,[Q]:de},[g]:H}]},{[S]:[{[I]:Te,[R]:[hF,"o"]}],[g]:G,rules:[{[S]:$F,[g]:G,rules:[CF,{[S]:nd,endpoint:{[W]:"https://{Bucket}.op-{outpostId}.{url#authority}",[Y]:n_,[Q]:de},[g]:H}]},{endpoint:{[W]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[Y]:n_,[Q]:de},[g]:H}]},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[g]:X}]},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[g]:X}]},{[S]:KF,[g]:G,rules:[{[S]:[Me,{[I]:Lt,[R]:[{[I]:Sn,[R]:[{[I]:nL,[R]:Zre}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[g]:X},{[S]:[MS,{[I]:dF,[R]:[Hn,aF]}],[g]:G,rules:[{[S]:Rr,[g]:G,rules:[{[S]:VF,[g]:G,rules:[{[S]:[Ft,gF],error:"S3 Accelerate cannot be used in this region",[g]:X},{[S]:[be,Ie,je,oe,ze],endpoint:{[W]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Y]:Ke,[Q]:de},[g]:H},{[S]:[be,Ie,je,oe,pe,Ve],[g]:G,rules:[{endpoint:SF,[g]:H}]},{[S]:[be,Ie,je,oe,pe,Xe],endpoint:SF,[g]:H},{[S]:[ue,Ie,je,oe,ze],endpoint:{[W]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[Y]:Ke,[Q]:de},[g]:H},{[S]:[ue,Ie,je,oe,pe,Ve],[g]:G,rules:[{endpoint:EF,[g]:H}]},{[S]:[ue,Ie,je,oe,pe,Xe],endpoint:EF,[g]:H},{[S]:[be,ae,Ft,oe,ze],endpoint:{[W]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Y]:Ke,[Q]:de},[g]:H},{[S]:[be,ae,Ft,oe,pe,Ve],[g]:G,rules:[{endpoint:bF,[g]:H}]},{[S]:[be,ae,Ft,oe,pe,Xe],endpoint:bF,[g]:H},{[S]:[be,ae,je,oe,ze],endpoint:{[W]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Y]:Ke,[Q]:de},[g]:H},{[S]:[be,ae,je,oe,pe,Ve],[g]:G,rules:[{endpoint:PF,[g]:H}]},{[S]:[be,ae,je,oe,pe,Xe],endpoint:PF,[g]:H},{[S]:[ue,ae,je,Me,dt,BS,ze],endpoint:{[W]:rL,[Y]:Ke,[Q]:de},[g]:H},{[S]:[ue,ae,je,Me,dt,DS,ze],endpoint:{[W]:oL,[Y]:Ke,[Q]:de},[g]:H},{[S]:[ue,ae,je,Me,dt,BS,pe,Ve],[g]:G,rules:[{[S]:Nr,endpoint:FS,[g]:H},{endpoint:FS,[g]:H}]},{[S]:[ue,ae,je,Me,dt,DS,pe,Ve],[g]:G,rules:[{[S]:Nr,endpoint:oE,[g]:H},vF]},{[S]:[ue,ae,je,Me,dt,BS,pe,Xe],endpoint:FS,[g]:H},{[S]:[ue,ae,je,Me,dt,DS,pe,Xe],endpoint:oE,[g]:H},{[S]:[ue,ae,Ft,oe,ze],endpoint:{[W]:sL,[Y]:Ke,[Q]:de},[g]:H},{[S]:[ue,ae,Ft,oe,pe,Ve],[g]:G,rules:[{[S]:Nr,endpoint:LS,[g]:H},{endpoint:LS,[g]:H}]},{[S]:[ue,ae,Ft,oe,pe,Xe],endpoint:LS,[g]:H},{[S]:[ue,ae,je,oe,ze],endpoint:{[W]:lF,[Y]:Ke,[Q]:de},[g]:H},{[S]:[ue,ae,je,oe,pe,Ve],[g]:G,rules:[{[S]:Nr,endpoint:{[W]:lF,[Y]:Ue,[Q]:de},[g]:H},{endpoint:xF,[g]:H}]},{[S]:[ue,ae,je,oe,pe,Xe],endpoint:xF,[g]:H}]},r_]}]},{[S]:[Me,dt,{[I]:Te,[R]:[{[I]:Be,[R]:[pL,"scheme"]},"http"]},{[I]:dF,[R]:[Hn,Cn]},MS,ae,ue,je],[g]:G,rules:[{[S]:Rr,[g]:G,rules:[{[S]:VF,[g]:G,rules:[vF]},r_]}]},{[S]:[MS,{[I]:iL,[R]:GF,[Ze]:aL}],[g]:G,rules:[{[S]:[{[I]:Be,[R]:[_t,"resourceId[0]"],[Ze]:cL},{[I]:Lt,[R]:[{[I]:Te,[R]:[fL,i_]}]}],[g]:G,rules:[{[S]:[{[I]:Te,[R]:[jS,aE]}],[g]:G,rules:[{[S]:YS,[g]:G,rules:[{[S]:XF,[g]:G,rules:[wF,kF,{[S]:JS,[g]:G,rules:[AF,{[S]:YF,[g]:G,rules:[US,{[S]:ZS,[g]:G,rules:[{[S]:Rr,[g]:G,rules:[{[S]:QF,[g]:G,rules:[{[S]:eE,[g]:G,rules:[{[S]:[{[I]:Te,[R]:[yL,i_]}],error:"Invalid ARN: Missing account id",[g]:X},{[S]:tE,[g]:G,rules:[{[S]:JF,[g]:G,rules:[{[S]:nd,endpoint:{[W]:uF,[Y]:zS,[Q]:de},[g]:H},{[S]:o_,endpoint:{[W]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Y]:zS,[Q]:de},[g]:H},{endpoint:{[W]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Y]:zS,[Q]:de},[g]:H}]},IF]},GS]},HS]},$S]}]}]},RF]},{error:"Invalid ARN: bucket ARN is missing a region",[g]:X}]},NF]},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[g]:X}]},{[S]:YS,[g]:G,rules:[{[S]:XF,[g]:G,rules:[{[S]:JS,[g]:G,rules:[{[S]:YS,[g]:G,rules:[{[S]:JS,[g]:G,rules:[AF,{[S]:YF,[g]:G,rules:[US,{[S]:ZS,[g]:G,rules:[{[S]:Rr,[g]:G,rules:[{[S]:[{[I]:Te,[R]:[_L,"{partitionResult#name}"]}],[g]:G,rules:[{[S]:eE,[g]:G,rules:[{[S]:[{[I]:Te,[R]:[jS,Os]}],[g]:G,rules:[{[S]:tE,[g]:G,rules:[{[S]:JF,[g]:G,rules:[{[S]:QS,error:"Access Points do not support S3 Accelerate",[g]:X},{[S]:[Ie,be],endpoint:{[W]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Y]:td,[Q]:de},[g]:H},{[S]:[Ie,ue],endpoint:{[W]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Y]:td,[Q]:de},[g]:H},{[S]:[ae,be],endpoint:{[W]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Y]:td,[Q]:de},[g]:H},{[S]:[ae,ue,Me,dt],endpoint:{[W]:uF,[Y]:td,[Q]:de},[g]:H},{[S]:[ae,ue],endpoint:{[W]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Y]:td,[Q]:de},[g]:H}]},IF]},GS]},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[g]:X}]},HS]},$S]}]}]},RF]}]}]},{[S]:[{[I]:mo,[R]:[dE,Cn]}],[g]:G,rules:[{[S]:WF,error:"S3 MRAP does not support dual-stack",[g]:X},{[S]:o_,error:"S3 MRAP does not support FIPS",[g]:X},{[S]:QS,error:"S3 MRAP does not support S3 Accelerate",[g]:X},{[S]:[{[I]:it,[R]:[{[se]:"DisableMultiRegionAccessPoints"},Cn]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[g]:X},{[S]:[{[I]:s_,[R]:WS,[Ze]:mF}],[g]:G,rules:[{[S]:[{[I]:Te,[R]:[{[I]:Be,[R]:[{[se]:mF},Ot]},{[I]:Be,[R]:[_t,"partition"]}]}],[g]:G,rules:[{endpoint:{[W]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[Y]:{[$n]:[{[Kn]:Cn,name:"sigv4a",[Vn]:Os,signingRegionSet:["*"]}]},[Q]:de},[g]:H}]},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[g]:X}]}]},{error:"Invalid Access Point Name",[g]:X}]},NF]},{[S]:[{[I]:Te,[R]:[jS,iE]}],[g]:G,rules:[{[S]:WF,error:"S3 Outposts does not support Dual-stack",[g]:X},{[S]:o_,error:"S3 Outposts does not support FIPS",[g]:X},{[S]:QS,error:"S3 Outposts does not support S3 Accelerate",[g]:X},{[S]:[{[I]:Sn,[R]:[{[I]:Be,[R]:[_t,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[g]:X},{[S]:[{[I]:Be,[R]:eoe,[Ze]:nE}],[g]:G,rules:[{[S]:HF,[g]:G,rules:[US,{[S]:ZS,[g]:G,rules:[{[S]:Rr,[g]:G,rules:[{[S]:QF,[g]:G,rules:[{[S]:eE,[g]:G,rules:[{[S]:tE,[g]:G,rules:[{[S]:[{[I]:Be,[R]:toe,[Ze]:pF}],[g]:G,rules:[{[S]:[{[I]:Be,[R]:[_t,"resourceId[3]"],[Ze]:cE}],[g]:G,rules:[{[S]:[{[I]:Te,[R]:[{[se]:pF},dL]}],[g]:G,rules:[{[S]:nd,endpoint:{[W]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[Y]:OF,[Q]:de},[g]:H},{endpoint:{[W]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[Y]:OF,[Q]:de},[g]:H}]},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[g]:X}]},{error:"Invalid ARN: expected an access point name",[g]:X}]},{error:"Invalid ARN: Expected a 4-component resource",[g]:X}]},GS]},HS]},$S]}]}]},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[g]:X}]},{error:"Invalid ARN: The Outpost Id was not set",[g]:X}]},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[g]:X}]},{error:"Invalid ARN: No ARN type specified",[g]:X}]},{[S]:[{[I]:ed,[R]:[Hn,0,4,aF],[Ze]:fF},{[I]:Te,[R]:[{[se]:fF},"arn:"]},{[I]:Lt,[R]:[{[I]:Sn,[R]:[TF]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[g]:X},{[S]:[{[I]:it,[R]:[Jre,Cn]},TF],error:"Path-style addressing cannot be used with ARN buckets",[g]:X},{[S]:[{[I]:"uriEncode",[R]:GF,[Ze]:"uri_encoded_bucket"}],[g]:G,rules:[{[S]:Rr,[g]:G,rules:[{[S]:[je],[g]:G,rules:[{[S]:[be,oe,Ie,ze],endpoint:{[W]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Y]:Ke,[Q]:de},[g]:H},{[S]:[be,oe,Ie,pe,Ve],[g]:G,rules:[{endpoint:qF,[g]:H}]},{[S]:[be,oe,Ie,pe,Xe],endpoint:qF,[g]:H},{[S]:[ue,oe,Ie,ze],endpoint:{[W]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Y]:Ke,[Q]:de},[g]:H},{[S]:[ue,oe,Ie,pe,Ve],[g]:G,rules:[{endpoint:MF,[g]:H}]},{[S]:[ue,oe,Ie,pe,Xe],endpoint:MF,[g]:H},{[S]:[be,oe,ae,ze],endpoint:{[W]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[Y]:Ke,[Q]:de},[g]:H},{[S]:[be,oe,ae,pe,Ve],[g]:G,rules:[{endpoint:BF,[g]:H}]},{[S]:[be,oe,ae,pe,Xe],endpoint:BF,[g]:H},{[S]:[ue,Me,dt,ae,ze],endpoint:{[W]:lL,[Y]:Ke,[Q]:de},[g]:H},{[S]:[ue,Me,dt,ae,pe,Ve],[g]:G,rules:[{[S]:Nr,endpoint:KS,[g]:H},{endpoint:KS,[g]:H}]},{[S]:[ue,Me,dt,ae,pe,Xe],endpoint:KS,[g]:H},{[S]:[ue,oe,ae,ze],endpoint:{[W]:_F,[Y]:Ke,[Q]:de},[g]:H},{[S]:[ue,oe,ae,pe,Ve],[g]:G,rules:[{[S]:Nr,endpoint:{[W]:_F,[Y]:Ue,[Q]:de},[g]:H},{endpoint:DF,[g]:H}]},{[S]:[ue,oe,ae,pe,Xe],endpoint:DF,[g]:H}]},{error:"Path-style addressing cannot be used with S3 Accelerate",[g]:X}]}]}]},{[S]:[{[I]:Sn,[R]:[FF]},{[I]:it,[R]:[FF,Cn]}],[g]:G,rules:[{[S]:Rr,[g]:G,rules:[{[S]:ZF,[g]:G,rules:[wF,kF,{[S]:nd,endpoint:{[W]:rE,[Y]:VS,[Q]:de},[g]:H},{[S]:o_,endpoint:{[W]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[Y]:VS,[Q]:de},[g]:H},{endpoint:{[W]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[Y]:VS,[Q]:de},[g]:H}]},r_]}]},{[S]:[{[I]:Lt,[R]:KF}],[g]:G,rules:[{[S]:Rr,[g]:G,rules:[{[S]:ZF,[g]:G,rules:[{[S]:[Ie,be,oe,ze],endpoint:{[W]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Y]:Ke,[Q]:de},[g]:H},{[S]:[Ie,be,oe,pe,Ve],[g]:G,rules:[{endpoint:LF,[g]:H}]},{[S]:[Ie,be,oe,pe,Xe],endpoint:LF,[g]:H},{[S]:[Ie,ue,oe,ze],endpoint:{[W]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[Y]:Ke,[Q]:de},[g]:H},{[S]:[Ie,ue,oe,pe,Ve],[g]:G,rules:[{endpoint:jF,[g]:H}]},{[S]:[Ie,ue,oe,pe,Xe],endpoint:jF,[g]:H},{[S]:[ae,be,oe,ze],endpoint:{[W]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[Y]:Ke,[Q]:de},[g]:H},{[S]:[ae,be,oe,pe,Ve],[g]:G,rules:[{endpoint:UF,[g]:H}]},{[S]:[ae,be,oe,pe,Xe],endpoint:UF,[g]:H},{[S]:[ae,ue,Me,dt,ze],endpoint:{[W]:rE,[Y]:Ke,[Q]:de},[g]:H},{[S]:[ae,ue,Me,dt,pe,Ve],[g]:G,rules:[{[S]:Nr,endpoint:XS,[g]:H},{endpoint:XS,[g]:H}]},{[S]:[ae,ue,Me,dt,pe,Xe],endpoint:XS,[g]:H},{[S]:[ae,ue,oe,ze],endpoint:{[W]:yF,[Y]:Ke,[Q]:de},[g]:H},{[S]:[ae,ue,oe,pe,Ve],[g]:G,rules:[{[S]:Nr,endpoint:{[W]:yF,[Y]:Ue,[Q]:de},[g]:H},{endpoint:zF,[g]:H}]},{[S]:[ae,ue,oe,pe,Xe],endpoint:zF,[g]:H}]},r_]}]}]},{error:"A region must be set when sending requests to S3.",[g]:X}]};a_.ruleSet=noe});var hL=m(c_=>{"use strict";Object.defineProperty(c_,"__esModule",{value:!0});c_.defaultEndpointResolver=void 0;var roe=Ko(),ooe=gL(),soe=(e,n={})=>(0,roe.resolveEndpoint)(ooe.ruleSet,{endpointParams:e,logger:n.logger});c_.defaultEndpointResolver=soe});var bL=m(d_=>{"use strict";Object.defineProperty(d_,"__esModule",{value:!0});d_.getRuntimeConfig=void 0;var ioe=iF(),aoe=E(),coe=Zr(),CL=Po(),SL=Oy(),EL=Pt(),doe=hL(),loe=e=>({apiVersion:"2006-03-01",base64Decoder:(e==null?void 0:e.base64Decoder)??CL.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??CL.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??doe.defaultEndpointResolver,extensions:(e==null?void 0:e.extensions)??[],getAwsChunkedEncodingStream:(e==null?void 0:e.getAwsChunkedEncodingStream)??SL.getAwsChunkedEncodingStream,logger:(e==null?void 0:e.logger)??new aoe.NoOpLogger,sdkStreamMixin:(e==null?void 0:e.sdkStreamMixin)??SL.sdkStreamMixin,serviceId:(e==null?void 0:e.serviceId)??"S3",signerConstructor:(e==null?void 0:e.signerConstructor)??ioe.SignatureV4MultiRegion,signingEscapePath:(e==null?void 0:e.signingEscapePath)??!1,urlParser:(e==null?void 0:e.urlParser)??coe.parseUrl,useArnRegion:(e==null?void 0:e.useArnRegion)??!1,utf8Decoder:(e==null?void 0:e.utf8Decoder)??EL.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??EL.toUtf8});d_.getRuntimeConfig=loe});var xL=m(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});u_.getRuntimeConfig=void 0;var uoe=(z(),j(U)),moe=uoe.__importDefault(ET()),poe=TD(),foe=oS(),_oe=zD(),yoe=Tc(),l_=Qt(),goe=JD(),lE=qc(),hoe=nF(),PL=On(),Ts=en(),vL=wo(),Coe=Mc(),Soe=Rt(),Eoe=bL(),boe=E(),Poe=Dc(),voe=E(),xoe=e=>{(0,voe.emitWarningIfUnsupportedVersion)(process.version);let n=(0,Poe.resolveDefaultsModeConfig)(e),t=()=>n().then(boe.loadConfigsForDefaultMode),r=(0,Eoe.getRuntimeConfig)(e);return{...r,...e,runtime:"node",defaultsMode:n,bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??Coe.calculateBodyLength,credentialDefaultProvider:(e==null?void 0:e.credentialDefaultProvider)??(0,poe.decorateDefaultCredentialProvider)(foe.defaultProvider),defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,yoe.defaultUserAgent)({serviceId:r.serviceId,clientVersion:moe.default.version}),eventStreamSerdeProvider:(e==null?void 0:e.eventStreamSerdeProvider)??goe.eventStreamSerdeProvider,maxAttempts:(e==null?void 0:e.maxAttempts)??(0,Ts.loadConfig)(PL.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),md5:(e==null?void 0:e.md5)??lE.Hash.bind(null,"md5"),region:(e==null?void 0:e.region)??(0,Ts.loadConfig)(l_.NODE_REGION_CONFIG_OPTIONS,l_.NODE_REGION_CONFIG_FILE_OPTIONS),requestHandler:(e==null?void 0:e.requestHandler)??new vL.NodeHttpHandler(t),retryMode:(e==null?void 0:e.retryMode)??(0,Ts.loadConfig)({...PL.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await t()).retryMode||Soe.DEFAULT_RETRY_MODE}),sha1:(e==null?void 0:e.sha1)??lE.Hash.bind(null,"sha1"),sha256:(e==null?void 0:e.sha256)??lE.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??vL.streamCollector,streamHasher:(e==null?void 0:e.streamHasher)??hoe.readableStreamHasher,useArnRegion:(e==null?void 0:e.useArnRegion)??(0,Ts.loadConfig)(_oe.NODE_USE_ARN_REGION_CONFIG_OPTIONS),useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,Ts.loadConfig)(l_.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,Ts.loadConfig)(l_.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)}};u_.getRuntimeConfig=xoe});var IL=m(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});m_.resolveRuntimeExtensions=void 0;var wL=Np(),kL=we(),AL=E(),uE=e=>e,woe=(e,n)=>{let t={...uE((0,wL.getAwsRegionExtensionConfiguration)(e)),...uE((0,AL.getDefaultExtensionConfiguration)(e)),...uE((0,kL.getHttpHandlerExtensionConfiguration)(e))};return n.forEach(r=>r.configure(t)),{...e,...(0,wL.resolveAwsRegionExtensionConfiguration)(t),...(0,AL.resolveDefaultRuntimeConfig)(t),...(0,kL.resolveHttpHandlerRuntimeConfig)(t)}};m_.resolveRuntimeExtensions=woe});var rd=m(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.S3Client=qs.__Client=void 0;var koe=jw(),RL=Ka(),Aoe=Va(),Ioe=Xa(),NL=To(),OL=kn(),TL=pc(),Roe=Qt(),Noe=zN(),Ooe=gc(),Toe=x(),qL=On(),ML=E();Object.defineProperty(qs,"__Client",{enumerable:!0,get:function(){return ML.Client}});var qoe=ST(),Moe=xL(),Boe=IL(),mE=class extends ML.Client{constructor(...[n]){let t=(0,Moe.getRuntimeConfig)(n||{}),r=(0,qoe.resolveClientEndpointParameters)(t),o=(0,Roe.resolveRegionConfig)(r),s=(0,Toe.resolveEndpointConfig)(o),c=(0,qL.resolveRetryConfig)(s),i=(0,RL.resolveHostHeaderConfig)(c),u=(0,OL.resolveAwsAuthConfig)(i),l=(0,NL.resolveS3Config)(u),a=(0,TL.resolveUserAgentConfig)(l),_=(0,Noe.resolveEventStreamSerdeConfig)(a),y=(0,Boe.resolveRuntimeExtensions)(_,(n==null?void 0:n.extensions)||[]);super(y),this.config=y,this.middlewareStack.use((0,qL.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Ooe.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,RL.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,Aoe.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,Ioe.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,OL.getAwsAuthPlugin)(this.config)),this.middlewareStack.use((0,NL.getValidateBucketNamePlugin)(this.config)),this.middlewareStack.use((0,koe.getAddExpectContinuePlugin)(this.config)),this.middlewareStack.use((0,TL.getUserAgentPlugin)(this.config))}destroy(){super.destroy()}};qs.S3Client=mE});var BL=m(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});p_.escapeAttribute=void 0;function Doe(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}p_.escapeAttribute=Doe});var DL=m(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});f_.escapeElement=void 0;function Foe(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}f_.escapeElement=Foe});var fE=m(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});__.XmlText=void 0;var Loe=DL(),pE=class{constructor(n){this.value=n}toString(){return(0,Loe.escapeElement)(""+this.value)}};__.XmlText=pE});var FL=m(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});y_.XmlNode=void 0;var joe=BL(),Uoe=fE(),_E=class e{static of(n,t,r){let o=new e(n);return t!==void 0&&o.addChildNode(new Uoe.XmlText(t)),r!==void 0&&o.withName(r),o}constructor(n,t=[]){this.name=n,this.children=t,this.attributes={}}withName(n){return this.name=n,this}addAttribute(n,t){return this.attributes[n]=t,this}addChildNode(n){return this.children.push(n),this}removeAttribute(n){return delete this.attributes[n],this}toString(){let n=!!this.children.length,t=`<${this.name}`,r=this.attributes;for(let o of Object.keys(r)){let s=r[o];typeof s<"u"&&s!==null&&(t+=` ${o}="${(0,joe.escapeAttribute)(""+s)}"`)}return t+=n?`>${this.children.map(o=>o.toString()).join("")}`:"/>"}};y_.XmlNode=_E});var jL=m(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});var LL=(z(),j(U));LL.__exportStar(FL(),g_);LL.__exportStar(fE(),g_)});var od=m(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.S3ServiceException=Ms.__ServiceException=void 0;var UL=E();Object.defineProperty(Ms,"__ServiceException",{enumerable:!0,get:function(){return UL.ServiceException}});var yE=class e extends UL.ServiceException{constructor(n){super(n),Object.setPrototypeOf(this,e.prototype)}};Ms.S3ServiceException=yE});var et=m(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.ReplicationStatus=h.Protocol=h.BucketVersioningStatus=h.MFADeleteStatus=h.Payer=h.ReplicationRuleStatus=h.SseKmsEncryptedObjectsStatus=h.ReplicaModificationsStatus=h.ReplicationRuleFilter=h.ExistingObjectReplicationStatus=h.ReplicationTimeStatus=h.MetricsStatus=h.DeleteMarkerReplicationStatus=h.FilterRuleName=h.Event=h.MetricsFilter=h.BucketLogsPermission=h.ExpirationStatus=h.TransitionStorageClass=h.LifecycleRuleFilter=h.InventoryFrequency=h.InventoryOptionalField=h.InventoryIncludedObjectVersions=h.InventoryFormat=h.IntelligentTieringAccessTier=h.IntelligentTieringStatus=h.StorageClassAnalysisSchemaVersion=h.AnalyticsS3ExportFileFormat=h.AnalyticsFilter=h.ObjectOwnership=h.BucketLocationConstraint=h.BucketCannedACL=h.BucketAlreadyOwnedByYou=h.BucketAlreadyExists=h.ObjectNotInActiveTierError=h.TaggingDirective=h.StorageClass=h.ObjectLockMode=h.ObjectLockLegalHoldStatus=h.MetadataDirective=h.ChecksumAlgorithm=h.ObjectCannedACL=h.ServerSideEncryption=h.OwnerOverride=h.Permission=h.Type=h.BucketAccelerateStatus=h.NoSuchUpload=h.RequestPayer=h.RequestCharged=void 0;h.PutObjectRequestFilterSensitiveLog=h.PutObjectOutputFilterSensitiveLog=h.PutBucketInventoryConfigurationRequestFilterSensitiveLog=h.PutBucketEncryptionRequestFilterSensitiveLog=h.ListPartsRequestFilterSensitiveLog=h.ListBucketInventoryConfigurationsOutputFilterSensitiveLog=h.HeadObjectRequestFilterSensitiveLog=h.HeadObjectOutputFilterSensitiveLog=h.GetObjectTorrentOutputFilterSensitiveLog=h.GetObjectAttributesRequestFilterSensitiveLog=h.GetObjectRequestFilterSensitiveLog=h.GetObjectOutputFilterSensitiveLog=h.GetBucketInventoryConfigurationOutputFilterSensitiveLog=h.InventoryConfigurationFilterSensitiveLog=h.InventoryDestinationFilterSensitiveLog=h.InventoryS3BucketDestinationFilterSensitiveLog=h.InventoryEncryptionFilterSensitiveLog=h.SSEKMSFilterSensitiveLog=h.GetBucketEncryptionOutputFilterSensitiveLog=h.ServerSideEncryptionConfigurationFilterSensitiveLog=h.ServerSideEncryptionRuleFilterSensitiveLog=h.ServerSideEncryptionByDefaultFilterSensitiveLog=h.CreateMultipartUploadRequestFilterSensitiveLog=h.CreateMultipartUploadOutputFilterSensitiveLog=h.CopyObjectRequestFilterSensitiveLog=h.CopyObjectOutputFilterSensitiveLog=h.CompleteMultipartUploadRequestFilterSensitiveLog=h.CompleteMultipartUploadOutputFilterSensitiveLog=h.MFADelete=h.ObjectVersionStorageClass=h.NoSuchBucket=h.OptionalObjectAttributes=h.ObjectStorageClass=h.EncodingType=h.ArchiveStatus=h.NotFound=h.ObjectLockRetentionMode=h.ObjectLockEnabled=h.ObjectAttributes=h.NoSuchKey=h.InvalidObjectState=h.ChecksumMode=void 0;var Pe=E(),Tr=od();h.RequestCharged={requester:"requester"};h.RequestPayer={requester:"requester"};var gE=class e extends Tr.S3ServiceException{constructor(n){super({name:"NoSuchUpload",$fault:"client",...n}),this.name="NoSuchUpload",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};h.NoSuchUpload=gE;h.BucketAccelerateStatus={Enabled:"Enabled",Suspended:"Suspended"};h.Type={AmazonCustomerByEmail:"AmazonCustomerByEmail",CanonicalUser:"CanonicalUser",Group:"Group"};h.Permission={FULL_CONTROL:"FULL_CONTROL",READ:"READ",READ_ACP:"READ_ACP",WRITE:"WRITE",WRITE_ACP:"WRITE_ACP"};h.OwnerOverride={Destination:"Destination"};h.ServerSideEncryption={AES256:"AES256",aws_kms:"aws:kms",aws_kms_dsse:"aws:kms:dsse"};h.ObjectCannedACL={authenticated_read:"authenticated-read",aws_exec_read:"aws-exec-read",bucket_owner_full_control:"bucket-owner-full-control",bucket_owner_read:"bucket-owner-read",private:"private",public_read:"public-read",public_read_write:"public-read-write"};h.ChecksumAlgorithm={CRC32:"CRC32",CRC32C:"CRC32C",SHA1:"SHA1",SHA256:"SHA256"};h.MetadataDirective={COPY:"COPY",REPLACE:"REPLACE"};h.ObjectLockLegalHoldStatus={OFF:"OFF",ON:"ON"};h.ObjectLockMode={COMPLIANCE:"COMPLIANCE",GOVERNANCE:"GOVERNANCE"};h.StorageClass={DEEP_ARCHIVE:"DEEP_ARCHIVE",GLACIER:"GLACIER",GLACIER_IR:"GLACIER_IR",INTELLIGENT_TIERING:"INTELLIGENT_TIERING",ONEZONE_IA:"ONEZONE_IA",OUTPOSTS:"OUTPOSTS",REDUCED_REDUNDANCY:"REDUCED_REDUNDANCY",SNOW:"SNOW",STANDARD:"STANDARD",STANDARD_IA:"STANDARD_IA"};h.TaggingDirective={COPY:"COPY",REPLACE:"REPLACE"};var hE=class e extends Tr.S3ServiceException{constructor(n){super({name:"ObjectNotInActiveTierError",$fault:"client",...n}),this.name="ObjectNotInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};h.ObjectNotInActiveTierError=hE;var CE=class e extends Tr.S3ServiceException{constructor(n){super({name:"BucketAlreadyExists",$fault:"client",...n}),this.name="BucketAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};h.BucketAlreadyExists=CE;var SE=class e extends Tr.S3ServiceException{constructor(n){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...n}),this.name="BucketAlreadyOwnedByYou",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};h.BucketAlreadyOwnedByYou=SE;h.BucketCannedACL={authenticated_read:"authenticated-read",private:"private",public_read:"public-read",public_read_write:"public-read-write"};h.BucketLocationConstraint={EU:"EU",af_south_1:"af-south-1",ap_east_1:"ap-east-1",ap_northeast_1:"ap-northeast-1",ap_northeast_2:"ap-northeast-2",ap_northeast_3:"ap-northeast-3",ap_south_1:"ap-south-1",ap_south_2:"ap-south-2",ap_southeast_1:"ap-southeast-1",ap_southeast_2:"ap-southeast-2",ap_southeast_3:"ap-southeast-3",ca_central_1:"ca-central-1",cn_north_1:"cn-north-1",cn_northwest_1:"cn-northwest-1",eu_central_1:"eu-central-1",eu_north_1:"eu-north-1",eu_south_1:"eu-south-1",eu_south_2:"eu-south-2",eu_west_1:"eu-west-1",eu_west_2:"eu-west-2",eu_west_3:"eu-west-3",me_south_1:"me-south-1",sa_east_1:"sa-east-1",us_east_2:"us-east-2",us_gov_east_1:"us-gov-east-1",us_gov_west_1:"us-gov-west-1",us_west_1:"us-west-1",us_west_2:"us-west-2"};h.ObjectOwnership={BucketOwnerEnforced:"BucketOwnerEnforced",BucketOwnerPreferred:"BucketOwnerPreferred",ObjectWriter:"ObjectWriter"};var zoe;(function(e){e.visit=(n,t)=>n.Prefix!==void 0?t.Prefix(n.Prefix):n.Tag!==void 0?t.Tag(n.Tag):n.And!==void 0?t.And(n.And):t._(n.$unknown[0],n.$unknown[1])})(zoe=h.AnalyticsFilter||(h.AnalyticsFilter={}));h.AnalyticsS3ExportFileFormat={CSV:"CSV"};h.StorageClassAnalysisSchemaVersion={V_1:"V_1"};h.IntelligentTieringStatus={Disabled:"Disabled",Enabled:"Enabled"};h.IntelligentTieringAccessTier={ARCHIVE_ACCESS:"ARCHIVE_ACCESS",DEEP_ARCHIVE_ACCESS:"DEEP_ARCHIVE_ACCESS"};h.InventoryFormat={CSV:"CSV",ORC:"ORC",Parquet:"Parquet"};h.InventoryIncludedObjectVersions={All:"All",Current:"Current"};h.InventoryOptionalField={BucketKeyStatus:"BucketKeyStatus",ChecksumAlgorithm:"ChecksumAlgorithm",ETag:"ETag",EncryptionStatus:"EncryptionStatus",IntelligentTieringAccessTier:"IntelligentTieringAccessTier",IsMultipartUploaded:"IsMultipartUploaded",LastModifiedDate:"LastModifiedDate",ObjectAccessControlList:"ObjectAccessControlList",ObjectLockLegalHoldStatus:"ObjectLockLegalHoldStatus",ObjectLockMode:"ObjectLockMode",ObjectLockRetainUntilDate:"ObjectLockRetainUntilDate",ObjectOwner:"ObjectOwner",ReplicationStatus:"ReplicationStatus",Size:"Size",StorageClass:"StorageClass"};h.InventoryFrequency={Daily:"Daily",Weekly:"Weekly"};var Goe;(function(e){e.visit=(n,t)=>n.Prefix!==void 0?t.Prefix(n.Prefix):n.Tag!==void 0?t.Tag(n.Tag):n.ObjectSizeGreaterThan!==void 0?t.ObjectSizeGreaterThan(n.ObjectSizeGreaterThan):n.ObjectSizeLessThan!==void 0?t.ObjectSizeLessThan(n.ObjectSizeLessThan):n.And!==void 0?t.And(n.And):t._(n.$unknown[0],n.$unknown[1])})(Goe=h.LifecycleRuleFilter||(h.LifecycleRuleFilter={}));h.TransitionStorageClass={DEEP_ARCHIVE:"DEEP_ARCHIVE",GLACIER:"GLACIER",GLACIER_IR:"GLACIER_IR",INTELLIGENT_TIERING:"INTELLIGENT_TIERING",ONEZONE_IA:"ONEZONE_IA",STANDARD_IA:"STANDARD_IA"};h.ExpirationStatus={Disabled:"Disabled",Enabled:"Enabled"};h.BucketLogsPermission={FULL_CONTROL:"FULL_CONTROL",READ:"READ",WRITE:"WRITE"};var Hoe;(function(e){e.visit=(n,t)=>n.Prefix!==void 0?t.Prefix(n.Prefix):n.Tag!==void 0?t.Tag(n.Tag):n.AccessPointArn!==void 0?t.AccessPointArn(n.AccessPointArn):n.And!==void 0?t.And(n.And):t._(n.$unknown[0],n.$unknown[1])})(Hoe=h.MetricsFilter||(h.MetricsFilter={}));h.Event={s3_IntelligentTiering:"s3:IntelligentTiering",s3_LifecycleExpiration_:"s3:LifecycleExpiration:*",s3_LifecycleExpiration_Delete:"s3:LifecycleExpiration:Delete",s3_LifecycleExpiration_DeleteMarkerCreated:"s3:LifecycleExpiration:DeleteMarkerCreated",s3_LifecycleTransition:"s3:LifecycleTransition",s3_ObjectAcl_Put:"s3:ObjectAcl:Put",s3_ObjectCreated_:"s3:ObjectCreated:*",s3_ObjectCreated_CompleteMultipartUpload:"s3:ObjectCreated:CompleteMultipartUpload",s3_ObjectCreated_Copy:"s3:ObjectCreated:Copy",s3_ObjectCreated_Post:"s3:ObjectCreated:Post",s3_ObjectCreated_Put:"s3:ObjectCreated:Put",s3_ObjectRemoved_:"s3:ObjectRemoved:*",s3_ObjectRemoved_Delete:"s3:ObjectRemoved:Delete",s3_ObjectRemoved_DeleteMarkerCreated:"s3:ObjectRemoved:DeleteMarkerCreated",s3_ObjectRestore_:"s3:ObjectRestore:*",s3_ObjectRestore_Completed:"s3:ObjectRestore:Completed",s3_ObjectRestore_Delete:"s3:ObjectRestore:Delete",s3_ObjectRestore_Post:"s3:ObjectRestore:Post",s3_ObjectTagging_:"s3:ObjectTagging:*",s3_ObjectTagging_Delete:"s3:ObjectTagging:Delete",s3_ObjectTagging_Put:"s3:ObjectTagging:Put",s3_ReducedRedundancyLostObject:"s3:ReducedRedundancyLostObject",s3_Replication_:"s3:Replication:*",s3_Replication_OperationFailedReplication:"s3:Replication:OperationFailedReplication",s3_Replication_OperationMissedThreshold:"s3:Replication:OperationMissedThreshold",s3_Replication_OperationNotTracked:"s3:Replication:OperationNotTracked",s3_Replication_OperationReplicatedAfterThreshold:"s3:Replication:OperationReplicatedAfterThreshold"};h.FilterRuleName={prefix:"prefix",suffix:"suffix"};h.DeleteMarkerReplicationStatus={Disabled:"Disabled",Enabled:"Enabled"};h.MetricsStatus={Disabled:"Disabled",Enabled:"Enabled"};h.ReplicationTimeStatus={Disabled:"Disabled",Enabled:"Enabled"};h.ExistingObjectReplicationStatus={Disabled:"Disabled",Enabled:"Enabled"};var $oe;(function(e){e.visit=(n,t)=>n.Prefix!==void 0?t.Prefix(n.Prefix):n.Tag!==void 0?t.Tag(n.Tag):n.And!==void 0?t.And(n.And):t._(n.$unknown[0],n.$unknown[1])})($oe=h.ReplicationRuleFilter||(h.ReplicationRuleFilter={}));h.ReplicaModificationsStatus={Disabled:"Disabled",Enabled:"Enabled"};h.SseKmsEncryptedObjectsStatus={Disabled:"Disabled",Enabled:"Enabled"};h.ReplicationRuleStatus={Disabled:"Disabled",Enabled:"Enabled"};h.Payer={BucketOwner:"BucketOwner",Requester:"Requester"};h.MFADeleteStatus={Disabled:"Disabled",Enabled:"Enabled"};h.BucketVersioningStatus={Enabled:"Enabled",Suspended:"Suspended"};h.Protocol={http:"http",https:"https"};h.ReplicationStatus={COMPLETE:"COMPLETE",COMPLETED:"COMPLETED",FAILED:"FAILED",PENDING:"PENDING",REPLICA:"REPLICA"};h.ChecksumMode={ENABLED:"ENABLED"};var EE=class e extends Tr.S3ServiceException{constructor(n){super({name:"InvalidObjectState",$fault:"client",...n}),this.name="InvalidObjectState",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.StorageClass=n.StorageClass,this.AccessTier=n.AccessTier}};h.InvalidObjectState=EE;var bE=class e extends Tr.S3ServiceException{constructor(n){super({name:"NoSuchKey",$fault:"client",...n}),this.name="NoSuchKey",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};h.NoSuchKey=bE;h.ObjectAttributes={CHECKSUM:"Checksum",ETAG:"ETag",OBJECT_PARTS:"ObjectParts",OBJECT_SIZE:"ObjectSize",STORAGE_CLASS:"StorageClass"};h.ObjectLockEnabled={Enabled:"Enabled"};h.ObjectLockRetentionMode={COMPLIANCE:"COMPLIANCE",GOVERNANCE:"GOVERNANCE"};var PE=class e extends Tr.S3ServiceException{constructor(n){super({name:"NotFound",$fault:"client",...n}),this.name="NotFound",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};h.NotFound=PE;h.ArchiveStatus={ARCHIVE_ACCESS:"ARCHIVE_ACCESS",DEEP_ARCHIVE_ACCESS:"DEEP_ARCHIVE_ACCESS"};h.EncodingType={url:"url"};h.ObjectStorageClass={DEEP_ARCHIVE:"DEEP_ARCHIVE",GLACIER:"GLACIER",GLACIER_IR:"GLACIER_IR",INTELLIGENT_TIERING:"INTELLIGENT_TIERING",ONEZONE_IA:"ONEZONE_IA",OUTPOSTS:"OUTPOSTS",REDUCED_REDUNDANCY:"REDUCED_REDUNDANCY",SNOW:"SNOW",STANDARD:"STANDARD",STANDARD_IA:"STANDARD_IA"};h.OptionalObjectAttributes={RESTORE_STATUS:"RestoreStatus"};var vE=class e extends Tr.S3ServiceException{constructor(n){super({name:"NoSuchBucket",$fault:"client",...n}),this.name="NoSuchBucket",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};h.NoSuchBucket=vE;h.ObjectVersionStorageClass={STANDARD:"STANDARD"};h.MFADelete={Disabled:"Disabled",Enabled:"Enabled"};var Koe=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Pe.SENSITIVE_STRING}});h.CompleteMultipartUploadOutputFilterSensitiveLog=Koe;var Voe=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Pe.SENSITIVE_STRING}});h.CompleteMultipartUploadRequestFilterSensitiveLog=Voe;var Xoe=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Pe.SENSITIVE_STRING},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Pe.SENSITIVE_STRING}});h.CopyObjectOutputFilterSensitiveLog=Xoe;var Woe=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Pe.SENSITIVE_STRING},...e.SSEKMSKeyId&&{SSEKMSKeyId:Pe.SENSITIVE_STRING},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Pe.SENSITIVE_STRING},...e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:Pe.SENSITIVE_STRING}});h.CopyObjectRequestFilterSensitiveLog=Woe;var Yoe=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Pe.SENSITIVE_STRING},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Pe.SENSITIVE_STRING}});h.CreateMultipartUploadOutputFilterSensitiveLog=Yoe;var Qoe=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Pe.SENSITIVE_STRING},...e.SSEKMSKeyId&&{SSEKMSKeyId:Pe.SENSITIVE_STRING},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Pe.SENSITIVE_STRING}});h.CreateMultipartUploadRequestFilterSensitiveLog=Qoe;var Joe=e=>({...e,...e.KMSMasterKeyID&&{KMSMasterKeyID:Pe.SENSITIVE_STRING}});h.ServerSideEncryptionByDefaultFilterSensitiveLog=Joe;var Zoe=e=>({...e,...e.ApplyServerSideEncryptionByDefault&&{ApplyServerSideEncryptionByDefault:(0,h.ServerSideEncryptionByDefaultFilterSensitiveLog)(e.ApplyServerSideEncryptionByDefault)}});h.ServerSideEncryptionRuleFilterSensitiveLog=Zoe;var ese=e=>({...e,...e.Rules&&{Rules:e.Rules.map(n=>(0,h.ServerSideEncryptionRuleFilterSensitiveLog)(n))}});h.ServerSideEncryptionConfigurationFilterSensitiveLog=ese;var tse=e=>({...e,...e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:(0,h.ServerSideEncryptionConfigurationFilterSensitiveLog)(e.ServerSideEncryptionConfiguration)}});h.GetBucketEncryptionOutputFilterSensitiveLog=tse;var nse=e=>({...e,...e.KeyId&&{KeyId:Pe.SENSITIVE_STRING}});h.SSEKMSFilterSensitiveLog=nse;var rse=e=>({...e,...e.SSEKMS&&{SSEKMS:(0,h.SSEKMSFilterSensitiveLog)(e.SSEKMS)}});h.InventoryEncryptionFilterSensitiveLog=rse;var ose=e=>({...e,...e.Encryption&&{Encryption:(0,h.InventoryEncryptionFilterSensitiveLog)(e.Encryption)}});h.InventoryS3BucketDestinationFilterSensitiveLog=ose;var sse=e=>({...e,...e.S3BucketDestination&&{S3BucketDestination:(0,h.InventoryS3BucketDestinationFilterSensitiveLog)(e.S3BucketDestination)}});h.InventoryDestinationFilterSensitiveLog=sse;var ise=e=>({...e,...e.Destination&&{Destination:(0,h.InventoryDestinationFilterSensitiveLog)(e.Destination)}});h.InventoryConfigurationFilterSensitiveLog=ise;var ase=e=>({...e,...e.InventoryConfiguration&&{InventoryConfiguration:(0,h.InventoryConfigurationFilterSensitiveLog)(e.InventoryConfiguration)}});h.GetBucketInventoryConfigurationOutputFilterSensitiveLog=ase;var cse=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Pe.SENSITIVE_STRING}});h.GetObjectOutputFilterSensitiveLog=cse;var dse=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Pe.SENSITIVE_STRING}});h.GetObjectRequestFilterSensitiveLog=dse;var lse=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Pe.SENSITIVE_STRING}});h.GetObjectAttributesRequestFilterSensitiveLog=lse;var use=e=>({...e});h.GetObjectTorrentOutputFilterSensitiveLog=use;var mse=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Pe.SENSITIVE_STRING}});h.HeadObjectOutputFilterSensitiveLog=mse;var pse=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Pe.SENSITIVE_STRING}});h.HeadObjectRequestFilterSensitiveLog=pse;var fse=e=>({...e,...e.InventoryConfigurationList&&{InventoryConfigurationList:e.InventoryConfigurationList.map(n=>(0,h.InventoryConfigurationFilterSensitiveLog)(n))}});h.ListBucketInventoryConfigurationsOutputFilterSensitiveLog=fse;var _se=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Pe.SENSITIVE_STRING}});h.ListPartsRequestFilterSensitiveLog=_se;var yse=e=>({...e,...e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:(0,h.ServerSideEncryptionConfigurationFilterSensitiveLog)(e.ServerSideEncryptionConfiguration)}});h.PutBucketEncryptionRequestFilterSensitiveLog=yse;var gse=e=>({...e,...e.InventoryConfiguration&&{InventoryConfiguration:(0,h.InventoryConfigurationFilterSensitiveLog)(e.InventoryConfiguration)}});h.PutBucketInventoryConfigurationRequestFilterSensitiveLog=gse;var hse=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:Pe.SENSITIVE_STRING},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Pe.SENSITIVE_STRING}});h.PutObjectOutputFilterSensitiveLog=hse;var Cse=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:Pe.SENSITIVE_STRING},...e.SSEKMSKeyId&&{SSEKMSKeyId:Pe.SENSITIVE_STRING},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Pe.SENSITIVE_STRING}});h.PutObjectRequestFilterSensitiveLog=Cse});var Mr=m(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.WriteGetObjectResponseRequestFilterSensitiveLog=Z.UploadPartCopyRequestFilterSensitiveLog=Z.UploadPartCopyOutputFilterSensitiveLog=Z.UploadPartRequestFilterSensitiveLog=Z.UploadPartOutputFilterSensitiveLog=Z.SelectObjectContentRequestFilterSensitiveLog=Z.SelectObjectContentOutputFilterSensitiveLog=Z.SelectObjectContentEventStreamFilterSensitiveLog=Z.RestoreObjectRequestFilterSensitiveLog=Z.RestoreRequestFilterSensitiveLog=Z.OutputLocationFilterSensitiveLog=Z.S3LocationFilterSensitiveLog=Z.EncryptionFilterSensitiveLog=Z.SelectObjectContentEventStream=Z.RestoreRequestType=Z.QuoteFields=Z.JSONType=Z.FileHeaderInfo=Z.CompressionType=Z.ExpressionType=Z.Tier=Z.ObjectAlreadyInActiveTierError=void 0;var qr=E(),Sse=od(),xE=class e extends Sse.S3ServiceException{constructor(n){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...n}),this.name="ObjectAlreadyInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};Z.ObjectAlreadyInActiveTierError=xE;Z.Tier={Bulk:"Bulk",Expedited:"Expedited",Standard:"Standard"};Z.ExpressionType={SQL:"SQL"};Z.CompressionType={BZIP2:"BZIP2",GZIP:"GZIP",NONE:"NONE"};Z.FileHeaderInfo={IGNORE:"IGNORE",NONE:"NONE",USE:"USE"};Z.JSONType={DOCUMENT:"DOCUMENT",LINES:"LINES"};Z.QuoteFields={ALWAYS:"ALWAYS",ASNEEDED:"ASNEEDED"};Z.RestoreRequestType={SELECT:"SELECT"};var Ese;(function(e){e.visit=(n,t)=>n.Records!==void 0?t.Records(n.Records):n.Stats!==void 0?t.Stats(n.Stats):n.Progress!==void 0?t.Progress(n.Progress):n.Cont!==void 0?t.Cont(n.Cont):n.End!==void 0?t.End(n.End):t._(n.$unknown[0],n.$unknown[1])})(Ese=Z.SelectObjectContentEventStream||(Z.SelectObjectContentEventStream={}));var bse=e=>({...e,...e.KMSKeyId&&{KMSKeyId:qr.SENSITIVE_STRING}});Z.EncryptionFilterSensitiveLog=bse;var Pse=e=>({...e,...e.Encryption&&{Encryption:(0,Z.EncryptionFilterSensitiveLog)(e.Encryption)}});Z.S3LocationFilterSensitiveLog=Pse;var vse=e=>({...e,...e.S3&&{S3:(0,Z.S3LocationFilterSensitiveLog)(e.S3)}});Z.OutputLocationFilterSensitiveLog=vse;var xse=e=>({...e,...e.OutputLocation&&{OutputLocation:(0,Z.OutputLocationFilterSensitiveLog)(e.OutputLocation)}});Z.RestoreRequestFilterSensitiveLog=xse;var wse=e=>({...e,...e.RestoreRequest&&{RestoreRequest:(0,Z.RestoreRequestFilterSensitiveLog)(e.RestoreRequest)}});Z.RestoreObjectRequestFilterSensitiveLog=wse;var kse=e=>{if(e.Records!==void 0)return{Records:e.Records};if(e.Stats!==void 0)return{Stats:e.Stats};if(e.Progress!==void 0)return{Progress:e.Progress};if(e.Cont!==void 0)return{Cont:e.Cont};if(e.End!==void 0)return{End:e.End};if(e.$unknown!==void 0)return{[e.$unknown[0]]:"UNKNOWN"}};Z.SelectObjectContentEventStreamFilterSensitiveLog=kse;var Ase=e=>({...e,...e.Payload&&{Payload:"STREAMING_CONTENT"}});Z.SelectObjectContentOutputFilterSensitiveLog=Ase;var Ise=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:qr.SENSITIVE_STRING}});Z.SelectObjectContentRequestFilterSensitiveLog=Ise;var Rse=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:qr.SENSITIVE_STRING}});Z.UploadPartOutputFilterSensitiveLog=Rse;var Nse=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:qr.SENSITIVE_STRING}});Z.UploadPartRequestFilterSensitiveLog=Nse;var Ose=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:qr.SENSITIVE_STRING}});Z.UploadPartCopyOutputFilterSensitiveLog=Ose;var Tse=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:qr.SENSITIVE_STRING},...e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:qr.SENSITIVE_STRING}});Z.UploadPartCopyRequestFilterSensitiveLog=Tse;var qse=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:qr.SENSITIVE_STRING}});Z.WriteGetObjectResponseRequestFilterSensitiveLog=qse});var M=m(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});p.se_GetObjectTorrentCommand=p.se_GetObjectTaggingCommand=p.se_GetObjectRetentionCommand=p.se_GetObjectLockConfigurationCommand=p.se_GetObjectLegalHoldCommand=p.se_GetObjectAttributesCommand=p.se_GetObjectAclCommand=p.se_GetObjectCommand=p.se_GetBucketWebsiteCommand=p.se_GetBucketVersioningCommand=p.se_GetBucketTaggingCommand=p.se_GetBucketRequestPaymentCommand=p.se_GetBucketReplicationCommand=p.se_GetBucketPolicyStatusCommand=p.se_GetBucketPolicyCommand=p.se_GetBucketOwnershipControlsCommand=p.se_GetBucketNotificationConfigurationCommand=p.se_GetBucketMetricsConfigurationCommand=p.se_GetBucketLoggingCommand=p.se_GetBucketLocationCommand=p.se_GetBucketLifecycleConfigurationCommand=p.se_GetBucketInventoryConfigurationCommand=p.se_GetBucketIntelligentTieringConfigurationCommand=p.se_GetBucketEncryptionCommand=p.se_GetBucketCorsCommand=p.se_GetBucketAnalyticsConfigurationCommand=p.se_GetBucketAclCommand=p.se_GetBucketAccelerateConfigurationCommand=p.se_DeletePublicAccessBlockCommand=p.se_DeleteObjectTaggingCommand=p.se_DeleteObjectsCommand=p.se_DeleteObjectCommand=p.se_DeleteBucketWebsiteCommand=p.se_DeleteBucketTaggingCommand=p.se_DeleteBucketReplicationCommand=p.se_DeleteBucketPolicyCommand=p.se_DeleteBucketOwnershipControlsCommand=p.se_DeleteBucketMetricsConfigurationCommand=p.se_DeleteBucketLifecycleCommand=p.se_DeleteBucketInventoryConfigurationCommand=p.se_DeleteBucketIntelligentTieringConfigurationCommand=p.se_DeleteBucketEncryptionCommand=p.se_DeleteBucketCorsCommand=p.se_DeleteBucketAnalyticsConfigurationCommand=p.se_DeleteBucketCommand=p.se_CreateMultipartUploadCommand=p.se_CreateBucketCommand=p.se_CopyObjectCommand=p.se_CompleteMultipartUploadCommand=p.se_AbortMultipartUploadCommand=void 0;p.de_DeleteBucketAnalyticsConfigurationCommand=p.de_DeleteBucketCommand=p.de_CreateMultipartUploadCommand=p.de_CreateBucketCommand=p.de_CopyObjectCommand=p.de_CompleteMultipartUploadCommand=p.de_AbortMultipartUploadCommand=p.se_WriteGetObjectResponseCommand=p.se_UploadPartCopyCommand=p.se_UploadPartCommand=p.se_SelectObjectContentCommand=p.se_RestoreObjectCommand=p.se_PutPublicAccessBlockCommand=p.se_PutObjectTaggingCommand=p.se_PutObjectRetentionCommand=p.se_PutObjectLockConfigurationCommand=p.se_PutObjectLegalHoldCommand=p.se_PutObjectAclCommand=p.se_PutObjectCommand=p.se_PutBucketWebsiteCommand=p.se_PutBucketVersioningCommand=p.se_PutBucketTaggingCommand=p.se_PutBucketRequestPaymentCommand=p.se_PutBucketReplicationCommand=p.se_PutBucketPolicyCommand=p.se_PutBucketOwnershipControlsCommand=p.se_PutBucketNotificationConfigurationCommand=p.se_PutBucketMetricsConfigurationCommand=p.se_PutBucketLoggingCommand=p.se_PutBucketLifecycleConfigurationCommand=p.se_PutBucketInventoryConfigurationCommand=p.se_PutBucketIntelligentTieringConfigurationCommand=p.se_PutBucketEncryptionCommand=p.se_PutBucketCorsCommand=p.se_PutBucketAnalyticsConfigurationCommand=p.se_PutBucketAclCommand=p.se_PutBucketAccelerateConfigurationCommand=p.se_ListPartsCommand=p.se_ListObjectVersionsCommand=p.se_ListObjectsV2Command=p.se_ListObjectsCommand=p.se_ListMultipartUploadsCommand=p.se_ListBucketsCommand=p.se_ListBucketMetricsConfigurationsCommand=p.se_ListBucketInventoryConfigurationsCommand=p.se_ListBucketIntelligentTieringConfigurationsCommand=p.se_ListBucketAnalyticsConfigurationsCommand=p.se_HeadObjectCommand=p.se_HeadBucketCommand=p.se_GetPublicAccessBlockCommand=void 0;p.de_ListBucketMetricsConfigurationsCommand=p.de_ListBucketInventoryConfigurationsCommand=p.de_ListBucketIntelligentTieringConfigurationsCommand=p.de_ListBucketAnalyticsConfigurationsCommand=p.de_HeadObjectCommand=p.de_HeadBucketCommand=p.de_GetPublicAccessBlockCommand=p.de_GetObjectTorrentCommand=p.de_GetObjectTaggingCommand=p.de_GetObjectRetentionCommand=p.de_GetObjectLockConfigurationCommand=p.de_GetObjectLegalHoldCommand=p.de_GetObjectAttributesCommand=p.de_GetObjectAclCommand=p.de_GetObjectCommand=p.de_GetBucketWebsiteCommand=p.de_GetBucketVersioningCommand=p.de_GetBucketTaggingCommand=p.de_GetBucketRequestPaymentCommand=p.de_GetBucketReplicationCommand=p.de_GetBucketPolicyStatusCommand=p.de_GetBucketPolicyCommand=p.de_GetBucketOwnershipControlsCommand=p.de_GetBucketNotificationConfigurationCommand=p.de_GetBucketMetricsConfigurationCommand=p.de_GetBucketLoggingCommand=p.de_GetBucketLocationCommand=p.de_GetBucketLifecycleConfigurationCommand=p.de_GetBucketInventoryConfigurationCommand=p.de_GetBucketIntelligentTieringConfigurationCommand=p.de_GetBucketEncryptionCommand=p.de_GetBucketCorsCommand=p.de_GetBucketAnalyticsConfigurationCommand=p.de_GetBucketAclCommand=p.de_GetBucketAccelerateConfigurationCommand=p.de_DeletePublicAccessBlockCommand=p.de_DeleteObjectTaggingCommand=p.de_DeleteObjectsCommand=p.de_DeleteObjectCommand=p.de_DeleteBucketWebsiteCommand=p.de_DeleteBucketTaggingCommand=p.de_DeleteBucketReplicationCommand=p.de_DeleteBucketPolicyCommand=p.de_DeleteBucketOwnershipControlsCommand=p.de_DeleteBucketMetricsConfigurationCommand=p.de_DeleteBucketLifecycleCommand=p.de_DeleteBucketInventoryConfigurationCommand=p.de_DeleteBucketIntelligentTieringConfigurationCommand=p.de_DeleteBucketEncryptionCommand=p.de_DeleteBucketCorsCommand=void 0;p.de_WriteGetObjectResponseCommand=p.de_UploadPartCopyCommand=p.de_UploadPartCommand=p.de_SelectObjectContentCommand=p.de_RestoreObjectCommand=p.de_PutPublicAccessBlockCommand=p.de_PutObjectTaggingCommand=p.de_PutObjectRetentionCommand=p.de_PutObjectLockConfigurationCommand=p.de_PutObjectLegalHoldCommand=p.de_PutObjectAclCommand=p.de_PutObjectCommand=p.de_PutBucketWebsiteCommand=p.de_PutBucketVersioningCommand=p.de_PutBucketTaggingCommand=p.de_PutBucketRequestPaymentCommand=p.de_PutBucketReplicationCommand=p.de_PutBucketPolicyCommand=p.de_PutBucketOwnershipControlsCommand=p.de_PutBucketNotificationConfigurationCommand=p.de_PutBucketMetricsConfigurationCommand=p.de_PutBucketLoggingCommand=p.de_PutBucketLifecycleConfigurationCommand=p.de_PutBucketInventoryConfigurationCommand=p.de_PutBucketIntelligentTieringConfigurationCommand=p.de_PutBucketEncryptionCommand=p.de_PutBucketCorsCommand=p.de_PutBucketAnalyticsConfigurationCommand=p.de_PutBucketAclCommand=p.de_PutBucketAccelerateConfigurationCommand=p.de_ListPartsCommand=p.de_ListObjectVersionsCommand=p.de_ListObjectsV2Command=p.de_ListObjectsCommand=p.de_ListMultipartUploadsCommand=p.de_ListBucketsCommand=void 0;var f=jL(),q=we(),d=E(),Mse=Wh(),Tt=et(),Bse=Mr(),Dse=od(),Fse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"x-id":[,"AbortMultipartUpload"],uploadId:[,(0,d.expectNonNull)(e.UploadId,"UploadId")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_AbortMultipartUploadCommand=Fse;var Lse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-checksum-crc32":e.ChecksumCRC32,"x-amz-checksum-crc32c":e.ChecksumCRC32C,"x-amz-checksum-sha1":e.ChecksumSHA1,"x-amz-checksum-sha256":e.ChecksumSHA256,"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"x-id":[,"CompleteMultipartUpload"],uploadId:[,(0,d.expectNonNull)(e.UploadId,"UploadId")]}),l;e.MultipartUpload!==void 0&&(l=KL(e.MultipartUpload,n));let a;return e.MultipartUpload!==void 0&&(a=KL(e.MultipartUpload,n),a=a.withName("CompleteMultipartUpload"),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"POST",headers:c,path:i,query:u,body:l})};p.se_CompleteMultipartUploadCommand=Lse;var jse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-acl":e.ACL,"cache-control":e.CacheControl,"x-amz-checksum-algorithm":e.ChecksumAlgorithm,"content-disposition":e.ContentDisposition,"content-encoding":e.ContentEncoding,"content-language":e.ContentLanguage,"content-type":e.ContentType,"x-amz-copy-source":e.CopySource,"x-amz-copy-source-if-match":e.CopySourceIfMatch,"x-amz-copy-source-if-modified-since":[()=>P(e.CopySourceIfModifiedSince),()=>(0,d.dateToUtcString)(e.CopySourceIfModifiedSince).toString()],"x-amz-copy-source-if-none-match":e.CopySourceIfNoneMatch,"x-amz-copy-source-if-unmodified-since":[()=>P(e.CopySourceIfUnmodifiedSince),()=>(0,d.dateToUtcString)(e.CopySourceIfUnmodifiedSince).toString()],expires:[()=>P(e.Expires),()=>(0,d.dateToUtcString)(e.Expires).toString()],"x-amz-grant-full-control":e.GrantFullControl,"x-amz-grant-read":e.GrantRead,"x-amz-grant-read-acp":e.GrantReadACP,"x-amz-grant-write-acp":e.GrantWriteACP,"x-amz-metadata-directive":e.MetadataDirective,"x-amz-tagging-directive":e.TaggingDirective,"x-amz-server-side-encryption":e.ServerSideEncryption,"x-amz-storage-class":e.StorageClass,"x-amz-website-redirect-location":e.WebsiteRedirectLocation,"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5,"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId,"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext,"x-amz-server-side-encryption-bucket-key-enabled":[()=>P(e.BucketKeyEnabled),()=>e.BucketKeyEnabled.toString()],"x-amz-copy-source-server-side-encryption-customer-algorithm":e.CopySourceSSECustomerAlgorithm,"x-amz-copy-source-server-side-encryption-customer-key":e.CopySourceSSECustomerKey,"x-amz-copy-source-server-side-encryption-customer-key-md5":e.CopySourceSSECustomerKeyMD5,"x-amz-request-payer":e.RequestPayer,"x-amz-tagging":e.Tagging,"x-amz-object-lock-mode":e.ObjectLockMode,"x-amz-object-lock-retain-until-date":[()=>P(e.ObjectLockRetainUntilDate),()=>(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()],"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-source-expected-bucket-owner":e.ExpectedSourceBucketOwner,...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((a,_)=>(a[`x-amz-meta-${_.toLowerCase()}`]=e.Metadata[_],a),{})}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"x-id":[,"CopyObject"]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_CopyObjectCommand=jse;var Use=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-acl":e.ACL,"x-amz-grant-full-control":e.GrantFullControl,"x-amz-grant-read":e.GrantRead,"x-amz-grant-read-acp":e.GrantReadACP,"x-amz-grant-write":e.GrantWrite,"x-amz-grant-write-acp":e.GrantWriteACP,"x-amz-bucket-object-lock-enabled":[()=>P(e.ObjectLockEnabledForBucket),()=>e.ObjectLockEnabledForBucket.toString()],"x-amz-object-ownership":e.ObjectOwnership}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u;e.CreateBucketConfiguration!==void 0&&(u=XL(e.CreateBucketConfiguration,n));let l;return e.CreateBucketConfiguration!==void 0&&(l=XL(e.CreateBucketConfiguration,n),u='',l.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),u+=l.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,body:u})};p.se_CreateBucketCommand=Use;var zse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-acl":e.ACL,"cache-control":e.CacheControl,"content-disposition":e.ContentDisposition,"content-encoding":e.ContentEncoding,"content-language":e.ContentLanguage,"content-type":e.ContentType,expires:[()=>P(e.Expires),()=>(0,d.dateToUtcString)(e.Expires).toString()],"x-amz-grant-full-control":e.GrantFullControl,"x-amz-grant-read":e.GrantRead,"x-amz-grant-read-acp":e.GrantReadACP,"x-amz-grant-write-acp":e.GrantWriteACP,"x-amz-server-side-encryption":e.ServerSideEncryption,"x-amz-storage-class":e.StorageClass,"x-amz-website-redirect-location":e.WebsiteRedirectLocation,"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5,"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId,"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext,"x-amz-server-side-encryption-bucket-key-enabled":[()=>P(e.BucketKeyEnabled),()=>e.BucketKeyEnabled.toString()],"x-amz-request-payer":e.RequestPayer,"x-amz-tagging":e.Tagging,"x-amz-object-lock-mode":e.ObjectLockMode,"x-amz-object-lock-retain-until-date":[()=>P(e.ObjectLockRetainUntilDate),()=>(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()],"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-checksum-algorithm":e.ChecksumAlgorithm,...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((a,_)=>(a[`x-amz-meta-${_.toLowerCase()}`]=e.Metadata[_],a),{})}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({uploads:[,""],"x-id":[,"CreateMultipartUpload"]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"POST",headers:c,path:i,query:u,body:l})};p.se_CreateMultipartUploadCommand=zse;var Gse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,body:u})};p.se_DeleteBucketCommand=Gse;var Hse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({analytics:[,""],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketAnalyticsConfigurationCommand=Hse;var $se=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({cors:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketCorsCommand=$se;var Kse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({encryption:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketEncryptionCommand=Kse;var Vse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c={},i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({"intelligent-tiering":[,""],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketIntelligentTieringConfigurationCommand=Vse;var Xse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({inventory:[,""],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketInventoryConfigurationCommand=Xse;var Wse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({lifecycle:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketLifecycleCommand=Wse;var Yse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({metrics:[,""],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketMetricsConfigurationCommand=Yse;var Qse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({ownershipControls:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketOwnershipControlsCommand=Qse;var Jse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({policy:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketPolicyCommand=Jse;var Zse=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({replication:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketReplicationCommand=Zse;var eie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({tagging:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketTaggingCommand=eie;var tie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({website:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteBucketWebsiteCommand=tie;var nie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-mfa":e.MFA,"x-amz-request-payer":e.RequestPayer,"x-amz-bypass-governance-retention":[()=>P(e.BypassGovernanceRetention),()=>e.BypassGovernanceRetention.toString()],"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"x-id":[,"DeleteObject"],versionId:[,e.VersionId]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteObjectCommand=nie;var rie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-mfa":e.MFA,"x-amz-request-payer":e.RequestPayer,"x-amz-bypass-governance-retention":[()=>P(e.BypassGovernanceRetention),()=>e.BypassGovernanceRetention.toString()],"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({delete:[,""],"x-id":[,"DeleteObjects"]}),l;e.Delete!==void 0&&(l=WL(e.Delete,n));let a;return e.Delete!==void 0&&(a=WL(e.Delete,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"POST",headers:c,path:i,query:u,body:l})};p.se_DeleteObjectsCommand=rie;var oie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({tagging:[,""],versionId:[,e.VersionId]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeleteObjectTaggingCommand=oie;var sie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({publicAccessBlock:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"DELETE",headers:c,path:i,query:u,body:l})};p.se_DeletePublicAccessBlockCommand=sie;var iie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-request-payer":e.RequestPayer}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({accelerate:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketAccelerateConfigurationCommand=iie;var aie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({acl:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketAclCommand=aie;var cie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({analytics:[,""],"x-id":[,"GetBucketAnalyticsConfiguration"],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketAnalyticsConfigurationCommand=cie;var die=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({cors:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketCorsCommand=die;var lie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({encryption:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketEncryptionCommand=lie;var uie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c={},i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({"intelligent-tiering":[,""],"x-id":[,"GetBucketIntelligentTieringConfiguration"],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketIntelligentTieringConfigurationCommand=uie;var mie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({inventory:[,""],"x-id":[,"GetBucketInventoryConfiguration"],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketInventoryConfigurationCommand=mie;var pie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({lifecycle:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketLifecycleConfigurationCommand=pie;var fie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({location:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketLocationCommand=fie;var _ie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({logging:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketLoggingCommand=_ie;var yie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({metrics:[,""],"x-id":[,"GetBucketMetricsConfiguration"],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketMetricsConfigurationCommand=yie;var gie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({notification:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketNotificationConfigurationCommand=gie;var hie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({ownershipControls:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketOwnershipControlsCommand=hie;var Cie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({policy:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketPolicyCommand=Cie;var Sie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({policyStatus:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketPolicyStatusCommand=Sie;var Eie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({replication:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketReplicationCommand=Eie;var bie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({requestPayment:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketRequestPaymentCommand=bie;var Pie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({tagging:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketTaggingCommand=Pie;var vie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({versioning:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketVersioningCommand=vie;var xie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({website:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetBucketWebsiteCommand=xie;var wie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"if-match":e.IfMatch,"if-modified-since":[()=>P(e.IfModifiedSince),()=>(0,d.dateToUtcString)(e.IfModifiedSince).toString()],"if-none-match":e.IfNoneMatch,"if-unmodified-since":[()=>P(e.IfUnmodifiedSince),()=>(0,d.dateToUtcString)(e.IfUnmodifiedSince).toString()],range:e.Range,"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5,"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-checksum-mode":e.ChecksumMode}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"x-id":[,"GetObject"],"response-cache-control":[,e.ResponseCacheControl],"response-content-disposition":[,e.ResponseContentDisposition],"response-content-encoding":[,e.ResponseContentEncoding],"response-content-language":[,e.ResponseContentLanguage],"response-content-type":[,e.ResponseContentType],"response-expires":[()=>e.ResponseExpires!==void 0,()=>(0,d.dateToUtcString)(e.ResponseExpires).toString()],versionId:[,e.VersionId],partNumber:[()=>e.PartNumber!==void 0,()=>e.PartNumber.toString()]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetObjectCommand=wie;var kie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({acl:[,""],versionId:[,e.VersionId]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetObjectAclCommand=kie;var Aie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-max-parts":[()=>P(e.MaxParts),()=>e.MaxParts.toString()],"x-amz-part-number-marker":e.PartNumberMarker,"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5,"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-object-attributes":[()=>P(e.ObjectAttributes),()=>(e.ObjectAttributes||[]).map(a=>a).join(", ")]}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({attributes:[,""],versionId:[,e.VersionId]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetObjectAttributesCommand=Aie;var Iie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"legal-hold":[,""],versionId:[,e.VersionId]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetObjectLegalHoldCommand=Iie;var Rie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({"object-lock":[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetObjectLockConfigurationCommand=Rie;var Nie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({retention:[,""],versionId:[,e.VersionId]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetObjectRetentionCommand=Nie;var Oie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-request-payer":e.RequestPayer}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({tagging:[,""],versionId:[,e.VersionId]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetObjectTaggingCommand=Oie;var Tie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({torrent:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetObjectTorrentCommand=Tie;var qie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({publicAccessBlock:[,""]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_GetPublicAccessBlockCommand=qie;var Mie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"HEAD",headers:c,path:i,body:u})};p.se_HeadBucketCommand=Mie;var Bie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"if-match":e.IfMatch,"if-modified-since":[()=>P(e.IfModifiedSince),()=>(0,d.dateToUtcString)(e.IfModifiedSince).toString()],"if-none-match":e.IfNoneMatch,"if-unmodified-since":[()=>P(e.IfUnmodifiedSince),()=>(0,d.dateToUtcString)(e.IfUnmodifiedSince).toString()],range:e.Range,"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5,"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-checksum-mode":e.ChecksumMode}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({versionId:[,e.VersionId],partNumber:[()=>e.PartNumber!==void 0,()=>e.PartNumber.toString()]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"HEAD",headers:c,path:i,query:u,body:l})};p.se_HeadObjectCommand=Bie;var Die=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({analytics:[,""],"x-id":[,"ListBucketAnalyticsConfigurations"],"continuation-token":[,e.ContinuationToken]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_ListBucketAnalyticsConfigurationsCommand=Die;var Fie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c={},i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({"intelligent-tiering":[,""],"x-id":[,"ListBucketIntelligentTieringConfigurations"],"continuation-token":[,e.ContinuationToken]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_ListBucketIntelligentTieringConfigurationsCommand=Fie;var Lie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({inventory:[,""],"x-id":[,"ListBucketInventoryConfigurations"],"continuation-token":[,e.ContinuationToken]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_ListBucketInventoryConfigurationsCommand=Lie;var jie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({metrics:[,""],"x-id":[,"ListBucketMetricsConfigurations"],"continuation-token":[,e.ContinuationToken]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_ListBucketMetricsConfigurationsCommand=jie;var Uie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c={"content-type":"application/xml"},i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`,u;return u="",new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,body:u})};p.se_ListBucketsCommand=Uie;var zie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-request-payer":e.RequestPayer}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({uploads:[,""],delimiter:[,e.Delimiter],"encoding-type":[,e.EncodingType],"key-marker":[,e.KeyMarker],"max-uploads":[()=>e.MaxUploads!==void 0,()=>e.MaxUploads.toString()],prefix:[,e.Prefix],"upload-id-marker":[,e.UploadIdMarker]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_ListMultipartUploadsCommand=zie;var Gie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-optional-object-attributes":[()=>P(e.OptionalObjectAttributes),()=>(e.OptionalObjectAttributes||[]).map(a=>a).join(", ")]}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({delimiter:[,e.Delimiter],"encoding-type":[,e.EncodingType],marker:[,e.Marker],"max-keys":[()=>e.MaxKeys!==void 0,()=>e.MaxKeys.toString()],prefix:[,e.Prefix]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_ListObjectsCommand=Gie;var Hie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-optional-object-attributes":[()=>P(e.OptionalObjectAttributes),()=>(e.OptionalObjectAttributes||[]).map(a=>a).join(", ")]}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({"list-type":[,"2"],delimiter:[,e.Delimiter],"encoding-type":[,e.EncodingType],"max-keys":[()=>e.MaxKeys!==void 0,()=>e.MaxKeys.toString()],prefix:[,e.Prefix],"continuation-token":[,e.ContinuationToken],"fetch-owner":[()=>e.FetchOwner!==void 0,()=>e.FetchOwner.toString()],"start-after":[,e.StartAfter]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_ListObjectsV2Command=Hie;var $ie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-request-payer":e.RequestPayer,"x-amz-optional-object-attributes":[()=>P(e.OptionalObjectAttributes),()=>(e.OptionalObjectAttributes||[]).map(a=>a).join(", ")]}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({versions:[,""],delimiter:[,e.Delimiter],"encoding-type":[,e.EncodingType],"key-marker":[,e.KeyMarker],"max-keys":[()=>e.MaxKeys!==void 0,()=>e.MaxKeys.toString()],prefix:[,e.Prefix],"version-id-marker":[,e.VersionIdMarker]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_ListObjectVersionsCommand=$ie;var Kie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"x-id":[,"ListParts"],"max-parts":[()=>e.MaxParts!==void 0,()=>e.MaxParts.toString()],"part-number-marker":[,e.PartNumberMarker],uploadId:[,(0,d.expectNonNull)(e.UploadId,"UploadId")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"GET",headers:c,path:i,query:u,body:l})};p.se_ListPartsCommand=Kie;var Vie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({accelerate:[,""]}),l;e.AccelerateConfiguration!==void 0&&(l=zL(e.AccelerateConfiguration,n));let a;return e.AccelerateConfiguration!==void 0&&(a=zL(e.AccelerateConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketAccelerateConfigurationCommand=Vie;var Xie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-acl":e.ACL,"content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-grant-full-control":e.GrantFullControl,"x-amz-grant-read":e.GrantRead,"x-amz-grant-read-acp":e.GrantReadACP,"x-amz-grant-write":e.GrantWrite,"x-amz-grant-write-acp":e.GrantWriteACP,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({acl:[,""]}),l;e.AccessControlPolicy!==void 0&&(l=h_(e.AccessControlPolicy,n));let a;return e.AccessControlPolicy!==void 0&&(a=h_(e.AccessControlPolicy,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketAclCommand=Xie;var Wie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({analytics:[,""],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;e.AnalyticsConfiguration!==void 0&&(l=GL(e.AnalyticsConfiguration,n));let a;return e.AnalyticsConfiguration!==void 0&&(a=GL(e.AnalyticsConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketAnalyticsConfigurationCommand=Wie;var Yie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({cors:[,""]}),l;e.CORSConfiguration!==void 0&&(l=VL(e.CORSConfiguration,n));let a;return e.CORSConfiguration!==void 0&&(a=VL(e.CORSConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketCorsCommand=Yie;var Qie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({encryption:[,""]}),l;e.ServerSideEncryptionConfiguration!==void 0&&(l=cj(e.ServerSideEncryptionConfiguration,n));let a;return e.ServerSideEncryptionConfiguration!==void 0&&(a=cj(e.ServerSideEncryptionConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketEncryptionCommand=Qie;var Jie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c={"content-type":"application/xml"},i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({"intelligent-tiering":[,""],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;e.IntelligentTieringConfiguration!==void 0&&(l=YL(e.IntelligentTieringConfiguration,n));let a;return e.IntelligentTieringConfiguration!==void 0&&(a=YL(e.IntelligentTieringConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketIntelligentTieringConfigurationCommand=Jie;var Zie=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({inventory:[,""],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;e.InventoryConfiguration!==void 0&&(l=QL(e.InventoryConfiguration,n));let a;return e.InventoryConfiguration!==void 0&&(a=QL(e.InventoryConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketInventoryConfigurationCommand=Zie;var eae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({lifecycle:[,""]}),l;e.LifecycleConfiguration!==void 0&&(l=HL(e.LifecycleConfiguration,n));let a;return e.LifecycleConfiguration!==void 0&&(a=HL(e.LifecycleConfiguration,n),a=a.withName("LifecycleConfiguration"),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketLifecycleConfigurationCommand=eae;var tae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({logging:[,""]}),l;e.BucketLoggingStatus!==void 0&&(l=$L(e.BucketLoggingStatus,n));let a;return e.BucketLoggingStatus!==void 0&&(a=$L(e.BucketLoggingStatus,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketLoggingCommand=tae;var nae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({metrics:[,""],id:[,(0,d.expectNonNull)(e.Id,"Id")]}),l;e.MetricsConfiguration!==void 0&&(l=JL(e.MetricsConfiguration,n));let a;return e.MetricsConfiguration!==void 0&&(a=JL(e.MetricsConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketMetricsConfigurationCommand=nae;var rae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-skip-destination-validation":[()=>P(e.SkipDestinationValidation),()=>e.SkipDestinationValidation.toString()]}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({notification:[,""]}),l;e.NotificationConfiguration!==void 0&&(l=ZL(e.NotificationConfiguration,n));let a;return e.NotificationConfiguration!==void 0&&(a=ZL(e.NotificationConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketNotificationConfigurationCommand=rae;var oae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({ownershipControls:[,""]}),l;e.OwnershipControls!==void 0&&(l=rj(e.OwnershipControls,n));let a;return e.OwnershipControls!==void 0&&(a=rj(e.OwnershipControls,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketOwnershipControlsCommand=oae;var sae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"text/plain","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-confirm-remove-self-bucket-access":[()=>P(e.ConfirmRemoveSelfBucketAccess),()=>e.ConfirmRemoveSelfBucketAccess.toString()],"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({policy:[,""]}),l;e.Policy!==void 0&&(l=e.Policy);let a;return e.Policy!==void 0&&(a=e.Policy,l=a),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketPolicyCommand=sae;var iae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-bucket-object-lock-token":e.Token,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({replication:[,""]}),l;e.ReplicationConfiguration!==void 0&&(l=sj(e.ReplicationConfiguration,n));let a;return e.ReplicationConfiguration!==void 0&&(a=sj(e.ReplicationConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketReplicationCommand=iae;var aae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({requestPayment:[,""]}),l;e.RequestPaymentConfiguration!==void 0&&(l=ij(e.RequestPaymentConfiguration,n));let a;return e.RequestPaymentConfiguration!==void 0&&(a=ij(e.RequestPaymentConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketRequestPaymentCommand=aae;var cae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({tagging:[,""]}),l;e.Tagging!==void 0&&(l=sd(e.Tagging,n));let a;return e.Tagging!==void 0&&(a=sd(e.Tagging,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketTaggingCommand=cae;var dae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-mfa":e.MFA,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({versioning:[,""]}),l;e.VersioningConfiguration!==void 0&&(l=dj(e.VersioningConfiguration,n));let a;return e.VersioningConfiguration!==void 0&&(a=dj(e.VersioningConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketVersioningCommand=dae;var lae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({website:[,""]}),l;e.WebsiteConfiguration!==void 0&&(l=lj(e.WebsiteConfiguration,n));let a;return e.WebsiteConfiguration!==void 0&&(a=lj(e.WebsiteConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutBucketWebsiteCommand=lae;var uae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":e.ContentType||"application/octet-stream","x-amz-acl":e.ACL,"cache-control":e.CacheControl,"content-disposition":e.ContentDisposition,"content-encoding":e.ContentEncoding,"content-language":e.ContentLanguage,"content-length":[()=>P(e.ContentLength),()=>e.ContentLength.toString()],"content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-checksum-crc32":e.ChecksumCRC32,"x-amz-checksum-crc32c":e.ChecksumCRC32C,"x-amz-checksum-sha1":e.ChecksumSHA1,"x-amz-checksum-sha256":e.ChecksumSHA256,expires:[()=>P(e.Expires),()=>(0,d.dateToUtcString)(e.Expires).toString()],"x-amz-grant-full-control":e.GrantFullControl,"x-amz-grant-read":e.GrantRead,"x-amz-grant-read-acp":e.GrantReadACP,"x-amz-grant-write-acp":e.GrantWriteACP,"x-amz-server-side-encryption":e.ServerSideEncryption,"x-amz-storage-class":e.StorageClass,"x-amz-website-redirect-location":e.WebsiteRedirectLocation,"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5,"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId,"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext,"x-amz-server-side-encryption-bucket-key-enabled":[()=>P(e.BucketKeyEnabled),()=>e.BucketKeyEnabled.toString()],"x-amz-request-payer":e.RequestPayer,"x-amz-tagging":e.Tagging,"x-amz-object-lock-mode":e.ObjectLockMode,"x-amz-object-lock-retain-until-date":[()=>P(e.ObjectLockRetainUntilDate),()=>(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()],"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((_,y)=>(_[`x-amz-meta-${y.toLowerCase()}`]=e.Metadata[y],_),{})}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"x-id":[,"PutObject"]}),l;e.Body!==void 0&&(l=e.Body);let a;return e.Body!==void 0&&(a=e.Body,l=a),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutObjectCommand=uae;var mae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-acl":e.ACL,"content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-grant-full-control":e.GrantFullControl,"x-amz-grant-read":e.GrantRead,"x-amz-grant-read-acp":e.GrantReadACP,"x-amz-grant-write":e.GrantWrite,"x-amz-grant-write-acp":e.GrantWriteACP,"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({acl:[,""],versionId:[,e.VersionId]}),l;e.AccessControlPolicy!==void 0&&(l=h_(e.AccessControlPolicy,n));let a;return e.AccessControlPolicy!==void 0&&(a=h_(e.AccessControlPolicy,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutObjectAclCommand=mae;var pae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-request-payer":e.RequestPayer,"content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"legal-hold":[,""],versionId:[,e.VersionId]}),l;e.LegalHold!==void 0&&(l=tj(e.LegalHold,n));let a;return e.LegalHold!==void 0&&(a=tj(e.LegalHold,n),a=a.withName("LegalHold"),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutObjectLegalHoldCommand=pae;var fae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-request-payer":e.RequestPayer,"x-amz-bucket-object-lock-token":e.Token,"content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({"object-lock":[,""]}),l;e.ObjectLockConfiguration!==void 0&&(l=ej(e.ObjectLockConfiguration,n));let a;return e.ObjectLockConfiguration!==void 0&&(a=ej(e.ObjectLockConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutObjectLockConfigurationCommand=fae;var _ae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-request-payer":e.RequestPayer,"x-amz-bypass-governance-retention":[()=>P(e.BypassGovernanceRetention),()=>e.BypassGovernanceRetention.toString()],"content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({retention:[,""],versionId:[,e.VersionId]}),l;e.Retention!==void 0&&(l=nj(e.Retention,n));let a;return e.Retention!==void 0&&(a=nj(e.Retention,n),a=a.withName("Retention"),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutObjectRetentionCommand=_ae;var yae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-request-payer":e.RequestPayer}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({tagging:[,""],versionId:[,e.VersionId]}),l;e.Tagging!==void 0&&(l=sd(e.Tagging,n));let a;return e.Tagging!==void 0&&(a=sd(e.Tagging,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutObjectTaggingCommand=yae;var gae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1);let u=(0,d.map)({publicAccessBlock:[,""]}),l;e.PublicAccessBlockConfiguration!==void 0&&(l=oj(e.PublicAccessBlockConfiguration,n));let a;return e.PublicAccessBlockConfiguration!==void 0&&(a=oj(e.PublicAccessBlockConfiguration,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_PutPublicAccessBlockCommand=gae;var hae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-request-payer":e.RequestPayer,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({restore:[,""],"x-id":[,"RestoreObject"],versionId:[,e.VersionId]}),l;e.RestoreRequest!==void 0&&(l=aj(e.RestoreRequest,n));let a;return e.RestoreRequest!==void 0&&(a=aj(e.RestoreRequest,n),l='',a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),l+=a.toString()),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"POST",headers:c,path:i,query:u,body:l})};p.se_RestoreObjectCommand=hae;var Cae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/xml","x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({select:[,""],"select-type":[,"2"],"x-id":[,"SelectObjectContent"]}),l;l='';let a=new f.XmlNode("SelectObjectContentRequest");if(a.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),e.Expression!==void 0){let _=f.XmlNode.of("Expression",e.Expression).withName("Expression");a.addChildNode(_)}if(e.ExpressionType!==void 0){let _=f.XmlNode.of("ExpressionType",e.ExpressionType).withName("ExpressionType");a.addChildNode(_)}if(e.InputSerialization!==void 0){let _=_j(e.InputSerialization,n).withName("InputSerialization");a.addChildNode(_)}if(e.OutputSerialization!==void 0){let _=yj(e.OutputSerialization,n).withName("OutputSerialization");a.addChildNode(_)}if(e.RequestProgress!==void 0){let _=vme(e.RequestProgress,n).withName("RequestProgress");a.addChildNode(_)}if(e.ScanRange!==void 0){let _=Ime(e.ScanRange,n).withName("ScanRange");a.addChildNode(_)}return l+=a.toString(),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"POST",headers:c,path:i,query:u,body:l})};p.se_SelectObjectContentCommand=Cae;var Sae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"content-type":"application/octet-stream","content-length":[()=>P(e.ContentLength),()=>e.ContentLength.toString()],"content-md5":e.ContentMD5,"x-amz-sdk-checksum-algorithm":e.ChecksumAlgorithm,"x-amz-checksum-crc32":e.ChecksumCRC32,"x-amz-checksum-crc32c":e.ChecksumCRC32C,"x-amz-checksum-sha1":e.ChecksumSHA1,"x-amz-checksum-sha256":e.ChecksumSHA256,"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5,"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"x-id":[,"UploadPart"],partNumber:[(0,d.expectNonNull)(e.PartNumber,"PartNumber")!=null,()=>e.PartNumber.toString()],uploadId:[,(0,d.expectNonNull)(e.UploadId,"UploadId")]}),l;e.Body!==void 0&&(l=e.Body);let a;return e.Body!==void 0&&(a=e.Body,l=a),new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_UploadPartCommand=Sae;var Eae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-copy-source":e.CopySource,"x-amz-copy-source-if-match":e.CopySourceIfMatch,"x-amz-copy-source-if-modified-since":[()=>P(e.CopySourceIfModifiedSince),()=>(0,d.dateToUtcString)(e.CopySourceIfModifiedSince).toString()],"x-amz-copy-source-if-none-match":e.CopySourceIfNoneMatch,"x-amz-copy-source-if-unmodified-since":[()=>P(e.CopySourceIfUnmodifiedSince),()=>(0,d.dateToUtcString)(e.CopySourceIfUnmodifiedSince).toString()],"x-amz-copy-source-range":e.CopySourceRange,"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-server-side-encryption-customer-key":e.SSECustomerKey,"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5,"x-amz-copy-source-server-side-encryption-customer-algorithm":e.CopySourceSSECustomerAlgorithm,"x-amz-copy-source-server-side-encryption-customer-key":e.CopySourceSSECustomerKey,"x-amz-copy-source-server-side-encryption-customer-key-md5":e.CopySourceSSECustomerKeyMD5,"x-amz-request-payer":e.RequestPayer,"x-amz-expected-bucket-owner":e.ExpectedBucketOwner,"x-amz-source-expected-bucket-owner":e.ExpectedSourceBucketOwner}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/{Key+}`;i=(0,d.resolvedPath)(i,e,"Bucket",()=>e.Bucket,"{Bucket}",!1),i=(0,d.resolvedPath)(i,e,"Key",()=>e.Key,"{Key+}",!0);let u=(0,d.map)({"x-id":[,"UploadPartCopy"],partNumber:[(0,d.expectNonNull)(e.PartNumber,"PartNumber")!=null,()=>e.PartNumber.toString()],uploadId:[,(0,d.expectNonNull)(e.UploadId,"UploadId")]}),l;return new q.HttpRequest({protocol:r,hostname:t,port:o,method:"PUT",headers:c,path:i,query:u,body:l})};p.se_UploadPartCopyCommand=Eae;var bae=async(e,n)=>{let{hostname:t,protocol:r="https",port:o,path:s}=await n.endpoint(),c=(0,d.map)({},P,{"x-amz-content-sha256":"UNSIGNED-PAYLOAD","content-type":"application/octet-stream","x-amz-request-route":e.RequestRoute,"x-amz-request-token":e.RequestToken,"x-amz-fwd-status":[()=>P(e.StatusCode),()=>e.StatusCode.toString()],"x-amz-fwd-error-code":e.ErrorCode,"x-amz-fwd-error-message":e.ErrorMessage,"x-amz-fwd-header-accept-ranges":e.AcceptRanges,"x-amz-fwd-header-cache-control":e.CacheControl,"x-amz-fwd-header-content-disposition":e.ContentDisposition,"x-amz-fwd-header-content-encoding":e.ContentEncoding,"x-amz-fwd-header-content-language":e.ContentLanguage,"content-length":[()=>P(e.ContentLength),()=>e.ContentLength.toString()],"x-amz-fwd-header-content-range":e.ContentRange,"x-amz-fwd-header-content-type":e.ContentType,"x-amz-fwd-header-x-amz-checksum-crc32":e.ChecksumCRC32,"x-amz-fwd-header-x-amz-checksum-crc32c":e.ChecksumCRC32C,"x-amz-fwd-header-x-amz-checksum-sha1":e.ChecksumSHA1,"x-amz-fwd-header-x-amz-checksum-sha256":e.ChecksumSHA256,"x-amz-fwd-header-x-amz-delete-marker":[()=>P(e.DeleteMarker),()=>e.DeleteMarker.toString()],"x-amz-fwd-header-etag":e.ETag,"x-amz-fwd-header-expires":[()=>P(e.Expires),()=>(0,d.dateToUtcString)(e.Expires).toString()],"x-amz-fwd-header-x-amz-expiration":e.Expiration,"x-amz-fwd-header-last-modified":[()=>P(e.LastModified),()=>(0,d.dateToUtcString)(e.LastModified).toString()],"x-amz-fwd-header-x-amz-missing-meta":[()=>P(e.MissingMeta),()=>e.MissingMeta.toString()],"x-amz-fwd-header-x-amz-object-lock-mode":e.ObjectLockMode,"x-amz-fwd-header-x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus,"x-amz-fwd-header-x-amz-object-lock-retain-until-date":[()=>P(e.ObjectLockRetainUntilDate),()=>(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()],"x-amz-fwd-header-x-amz-mp-parts-count":[()=>P(e.PartsCount),()=>e.PartsCount.toString()],"x-amz-fwd-header-x-amz-replication-status":e.ReplicationStatus,"x-amz-fwd-header-x-amz-request-charged":e.RequestCharged,"x-amz-fwd-header-x-amz-restore":e.Restore,"x-amz-fwd-header-x-amz-server-side-encryption":e.ServerSideEncryption,"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm,"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId,"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5,"x-amz-fwd-header-x-amz-storage-class":e.StorageClass,"x-amz-fwd-header-x-amz-tagging-count":[()=>P(e.TagCount),()=>e.TagCount.toString()],"x-amz-fwd-header-x-amz-version-id":e.VersionId,"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled":[()=>P(e.BucketKeyEnabled),()=>e.BucketKeyEnabled.toString()],...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((y,C)=>(y[`x-amz-meta-${C.toLowerCase()}`]=e.Metadata[C],y),{})}),i=`${s!=null&&s.endsWith("/")?s.slice(0,-1):s||""}/WriteGetObjectResponse`,u=(0,d.map)({"x-id":[,"WriteGetObjectResponse"]}),l;e.Body!==void 0&&(l=e.Body);let a;e.Body!==void 0&&(a=e.Body,l=a);let{hostname:_}=await n.endpoint();if(n.disableHostPrefix!==!0){if(_="{RequestRoute}."+_,e.RequestRoute===void 0)throw new Error("Empty value provided for input host prefix: RequestRoute.");if(_=_.replace("{RequestRoute}",e.RequestRoute),!(0,q.isValidHostname)(_))throw new Error("ValidationError: prefixed hostname must be hostname compatible.")}return new q.HttpRequest({protocol:r,hostname:_,port:o,method:"POST",headers:c,path:i,query:u,body:l})};p.se_WriteGetObjectResponseCommand=bae;var Pae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return vae(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]});return await(0,d.collectBody)(e.body,n),t};p.de_AbortMultipartUploadCommand=Pae;var vae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await Yle(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},xae=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return wae(e,n);let t=(0,d.map)({$metadata:N(e),Expiration:[,e.headers["x-amz-expiration"]],ServerSideEncryption:[,e.headers["x-amz-server-side-encryption"]],VersionId:[,e.headers["x-amz-version-id"]],SSEKMSKeyId:[,e.headers["x-amz-server-side-encryption-aws-kms-key-id"]],BucketKeyEnabled:[()=>e.headers["x-amz-server-side-encryption-bucket-key-enabled"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-server-side-encryption-bucket-key-enabled"])],RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.Bucket!==void 0&&(t.Bucket=(0,d.expectString)(r.Bucket)),r.ChecksumCRC32!==void 0&&(t.ChecksumCRC32=(0,d.expectString)(r.ChecksumCRC32)),r.ChecksumCRC32C!==void 0&&(t.ChecksumCRC32C=(0,d.expectString)(r.ChecksumCRC32C)),r.ChecksumSHA1!==void 0&&(t.ChecksumSHA1=(0,d.expectString)(r.ChecksumSHA1)),r.ChecksumSHA256!==void 0&&(t.ChecksumSHA256=(0,d.expectString)(r.ChecksumSHA256)),r.ETag!==void 0&&(t.ETag=(0,d.expectString)(r.ETag)),r.Key!==void 0&&(t.Key=(0,d.expectString)(r.Key)),r.Location!==void 0&&(t.Location=(0,d.expectString)(r.Location)),t};p.de_CompleteMultipartUploadCommand=xae;var wae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},kae=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Aae(e,n);let t=(0,d.map)({$metadata:N(e),Expiration:[,e.headers["x-amz-expiration"]],CopySourceVersionId:[,e.headers["x-amz-copy-source-version-id"]],VersionId:[,e.headers["x-amz-version-id"]],ServerSideEncryption:[,e.headers["x-amz-server-side-encryption"]],SSECustomerAlgorithm:[,e.headers["x-amz-server-side-encryption-customer-algorithm"]],SSECustomerKeyMD5:[,e.headers["x-amz-server-side-encryption-customer-key-md5"]],SSEKMSKeyId:[,e.headers["x-amz-server-side-encryption-aws-kms-key-id"]],SSEKMSEncryptionContext:[,e.headers["x-amz-server-side-encryption-context"]],BucketKeyEnabled:[()=>e.headers["x-amz-server-side-encryption-bucket-key-enabled"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-server-side-encryption-bucket-key-enabled"])],RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectObject)(await ne(e.body,n));return t.CopyObjectResult=upe(r,n),t};p.de_CopyObjectCommand=kae;var Aae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await Jle(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},Iae=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Rae(e,n);let t=(0,d.map)({$metadata:N(e),Location:[,e.headers.location]});return await(0,d.collectBody)(e.body,n),t};p.de_CreateBucketCommand=Iae;var Rae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await Vle(t,n);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await Xle(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},Nae=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Oae(e,n);let t=(0,d.map)({$metadata:N(e),AbortDate:[()=>e.headers["x-amz-abort-date"]!==void 0,()=>(0,d.expectNonNull)((0,d.parseRfc7231DateTime)(e.headers["x-amz-abort-date"]))],AbortRuleId:[,e.headers["x-amz-abort-rule-id"]],ServerSideEncryption:[,e.headers["x-amz-server-side-encryption"]],SSECustomerAlgorithm:[,e.headers["x-amz-server-side-encryption-customer-algorithm"]],SSECustomerKeyMD5:[,e.headers["x-amz-server-side-encryption-customer-key-md5"]],SSEKMSKeyId:[,e.headers["x-amz-server-side-encryption-aws-kms-key-id"]],SSEKMSEncryptionContext:[,e.headers["x-amz-server-side-encryption-context"]],BucketKeyEnabled:[()=>e.headers["x-amz-server-side-encryption-bucket-key-enabled"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-server-side-encryption-bucket-key-enabled"])],RequestCharged:[,e.headers["x-amz-request-charged"]],ChecksumAlgorithm:[,e.headers["x-amz-checksum-algorithm"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.Bucket!==void 0&&(t.Bucket=(0,d.expectString)(r.Bucket)),r.Key!==void 0&&(t.Key=(0,d.expectString)(r.Key)),r.UploadId!==void 0&&(t.UploadId=(0,d.expectString)(r.UploadId)),t};p.de_CreateMultipartUploadCommand=Nae;var Oae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Tae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return qae(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketCommand=Tae;var qae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Mae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return Bae(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketAnalyticsConfigurationCommand=Mae;var Bae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Dae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return Fae(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketCorsCommand=Dae;var Fae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Lae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return jae(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketEncryptionCommand=Lae;var jae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Uae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return zae(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketIntelligentTieringConfigurationCommand=Uae;var zae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Gae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return Hae(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketInventoryConfigurationCommand=Gae;var Hae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},$ae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return Kae(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketLifecycleCommand=$ae;var Kae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Vae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return Xae(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketMetricsConfigurationCommand=Vae;var Xae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Wae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return Yae(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketOwnershipControlsCommand=Wae;var Yae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Qae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return Jae(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketPolicyCommand=Qae;var Jae=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Zae=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return ece(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketReplicationCommand=Zae;var ece=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},tce=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return nce(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketTaggingCommand=tce;var nce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},rce=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return oce(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteBucketWebsiteCommand=rce;var oce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},sce=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return ice(e,n);let t=(0,d.map)({$metadata:N(e),DeleteMarker:[()=>e.headers["x-amz-delete-marker"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-delete-marker"])],VersionId:[,e.headers["x-amz-version-id"]],RequestCharged:[,e.headers["x-amz-request-charged"]]});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteObjectCommand=sce;var ice=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},ace=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return cce(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.Deleted===""?t.Deleted=[]:r.Deleted!==void 0&&(t.Deleted=gpe((0,d.getArrayIfSingleItem)(r.Deleted),n)),r.Error===""?t.Errors=[]:r.Error!==void 0&&(t.Errors=wpe((0,d.getArrayIfSingleItem)(r.Error),n)),t};p.de_DeleteObjectsCommand=ace;var cce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},dce=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return lce(e,n);let t=(0,d.map)({$metadata:N(e),VersionId:[,e.headers["x-amz-version-id"]]});return await(0,d.collectBody)(e.body,n),t};p.de_DeleteObjectTaggingCommand=dce;var lce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},uce=async(e,n)=>{if(e.statusCode!==204&&e.statusCode>=300)return mce(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_DeletePublicAccessBlockCommand=uce;var mce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},pce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return fce(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.Status!==void 0&&(t.Status=(0,d.expectString)(r.Status)),t};p.de_GetBucketAccelerateConfigurationCommand=pce;var fce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},_ce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return yce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.AccessControlList===""?t.Grants=[]:r.AccessControlList!==void 0&&r.AccessControlList.Grant!==void 0&&(t.Grants=Ej((0,d.getArrayIfSingleItem)(r.AccessControlList.Grant),n)),r.Owner!==void 0&&(t.Owner=Br(r.Owner,n)),t};p.de_GetBucketAclCommand=_ce;var yce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},gce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return hce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.AnalyticsConfiguration=hj(r,n),t};p.de_GetBucketAnalyticsConfigurationCommand=gce;var hce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Cce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Sce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.CORSRule===""?t.CORSRules=[]:r.CORSRule!==void 0&&(t.CORSRules=fpe((0,d.getArrayIfSingleItem)(r.CORSRule),n)),t};p.de_GetBucketCorsCommand=Cce;var Sce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Ece=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return bce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.ServerSideEncryptionConfiguration=jfe(r,n),t};p.de_GetBucketEncryptionCommand=Ece;var bce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Pce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return vce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.IntelligentTieringConfiguration=Pj(r,n),t};p.de_GetBucketIntelligentTieringConfigurationCommand=Pce;var vce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},xce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return wce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.InventoryConfiguration=vj(r,n),t};p.de_GetBucketInventoryConfigurationCommand=xce;var wce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},kce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ace(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.Rule===""?t.Rules=[]:r.Rule!==void 0&&(t.Rules=Qpe((0,d.getArrayIfSingleItem)(r.Rule),n)),t};p.de_GetBucketLifecycleConfigurationCommand=kce;var Ace=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Ice=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Rce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.LocationConstraint!==void 0&&(t.LocationConstraint=(0,d.expectString)(r.LocationConstraint)),t};p.de_GetBucketLocationCommand=Ice;var Rce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Nce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Oce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.LoggingEnabled!==void 0&&(t.LoggingEnabled=Jpe(r.LoggingEnabled,n)),t};p.de_GetBucketLoggingCommand=Nce;var Oce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Tce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return qce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.MetricsConfiguration=xj(r,n),t};p.de_GetBucketMetricsConfigurationCommand=Tce;var qce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Mce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Bce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.EventBridgeConfiguration!==void 0&&(t.EventBridgeConfiguration=kpe(r.EventBridgeConfiguration,n)),r.CloudFunctionConfiguration===""?t.LambdaFunctionConfigurations=[]:r.CloudFunctionConfiguration!==void 0&&(t.LambdaFunctionConfigurations=Kpe((0,d.getArrayIfSingleItem)(r.CloudFunctionConfiguration),n)),r.QueueConfiguration===""?t.QueueConfigurations=[]:r.QueueConfiguration!==void 0&&(t.QueueConfigurations=wfe((0,d.getArrayIfSingleItem)(r.QueueConfiguration),n)),r.TopicConfiguration===""?t.TopicConfigurations=[]:r.TopicConfiguration!==void 0&&(t.TopicConfigurations=t_e((0,d.getArrayIfSingleItem)(r.TopicConfiguration),n)),t};p.de_GetBucketNotificationConfigurationCommand=Mce;var Bce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Dce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Fce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.OwnershipControls=yfe(r,n),t};p.de_GetBucketOwnershipControlsCommand=Dce;var Fce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Lce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return jce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=await Ij(e.body,n);return t.Policy=(0,d.expectString)(r),t};p.de_GetBucketPolicyCommand=Lce;var jce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Uce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return zce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.PolicyStatus=bfe(r,n),t};p.de_GetBucketPolicyStatusCommand=Uce;var zce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Gce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Hce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.ReplicationConfiguration=Rfe(r,n),t};p.de_GetBucketReplicationCommand=Gce;var Hce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},$ce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Kce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.Payer!==void 0&&(t.Payer=(0,d.expectString)(r.Payer)),t};p.de_GetBucketRequestPaymentCommand=$ce;var Kce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Vce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Xce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.TagSet===""?t.TagSet=[]:r.TagSet!==void 0&&r.TagSet.Tag!==void 0&&(t.TagSet=po((0,d.getArrayIfSingleItem)(r.TagSet.Tag),n)),t};p.de_GetBucketTaggingCommand=Vce;var Xce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Wce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Yce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.MfaDelete!==void 0&&(t.MFADelete=(0,d.expectString)(r.MfaDelete)),r.Status!==void 0&&(t.Status=(0,d.expectString)(r.Status)),t};p.de_GetBucketVersioningCommand=Wce;var Yce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Qce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Jce(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.ErrorDocument!==void 0&&(t.ErrorDocument=xpe(r.ErrorDocument,n)),r.IndexDocument!==void 0&&(t.IndexDocument=qpe(r.IndexDocument,n)),r.RedirectAllRequestsTo!==void 0&&(t.RedirectAllRequestsTo=Afe(r.RedirectAllRequestsTo,n)),r.RoutingRules===""?t.RoutingRules=[]:r.RoutingRules!==void 0&&r.RoutingRules.RoutingRule!==void 0&&(t.RoutingRules=Dfe((0,d.getArrayIfSingleItem)(r.RoutingRules.RoutingRule),n)),t};p.de_GetBucketWebsiteCommand=Qce;var Jce=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Zce=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return ede(e,n);let t=(0,d.map)({$metadata:N(e),DeleteMarker:[()=>e.headers["x-amz-delete-marker"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-delete-marker"])],AcceptRanges:[,e.headers["accept-ranges"]],Expiration:[,e.headers["x-amz-expiration"]],Restore:[,e.headers["x-amz-restore"]],LastModified:[()=>e.headers["last-modified"]!==void 0,()=>(0,d.expectNonNull)((0,d.parseRfc7231DateTime)(e.headers["last-modified"]))],ContentLength:[()=>e.headers["content-length"]!==void 0,()=>(0,d.strictParseLong)(e.headers["content-length"])],ETag:[,e.headers.etag],ChecksumCRC32:[,e.headers["x-amz-checksum-crc32"]],ChecksumCRC32C:[,e.headers["x-amz-checksum-crc32c"]],ChecksumSHA1:[,e.headers["x-amz-checksum-sha1"]],ChecksumSHA256:[,e.headers["x-amz-checksum-sha256"]],MissingMeta:[()=>e.headers["x-amz-missing-meta"]!==void 0,()=>(0,d.strictParseInt32)(e.headers["x-amz-missing-meta"])],VersionId:[,e.headers["x-amz-version-id"]],CacheControl:[,e.headers["cache-control"]],ContentDisposition:[,e.headers["content-disposition"]],ContentEncoding:[,e.headers["content-encoding"]],ContentLanguage:[,e.headers["content-language"]],ContentRange:[,e.headers["content-range"]],ContentType:[,e.headers["content-type"]],Expires:[()=>e.headers.expires!==void 0,()=>(0,d.expectNonNull)((0,d.parseRfc7231DateTime)(e.headers.expires))],WebsiteRedirectLocation:[,e.headers["x-amz-website-redirect-location"]],ServerSideEncryption:[,e.headers["x-amz-server-side-encryption"]],SSECustomerAlgorithm:[,e.headers["x-amz-server-side-encryption-customer-algorithm"]],SSECustomerKeyMD5:[,e.headers["x-amz-server-side-encryption-customer-key-md5"]],SSEKMSKeyId:[,e.headers["x-amz-server-side-encryption-aws-kms-key-id"]],BucketKeyEnabled:[()=>e.headers["x-amz-server-side-encryption-bucket-key-enabled"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-server-side-encryption-bucket-key-enabled"])],StorageClass:[,e.headers["x-amz-storage-class"]],RequestCharged:[,e.headers["x-amz-request-charged"]],ReplicationStatus:[,e.headers["x-amz-replication-status"]],PartsCount:[()=>e.headers["x-amz-mp-parts-count"]!==void 0,()=>(0,d.strictParseInt32)(e.headers["x-amz-mp-parts-count"])],TagCount:[()=>e.headers["x-amz-tagging-count"]!==void 0,()=>(0,d.strictParseInt32)(e.headers["x-amz-tagging-count"])],ObjectLockMode:[,e.headers["x-amz-object-lock-mode"]],ObjectLockRetainUntilDate:[()=>e.headers["x-amz-object-lock-retain-until-date"]!==void 0,()=>(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.headers["x-amz-object-lock-retain-until-date"]))],ObjectLockLegalHoldStatus:[,e.headers["x-amz-object-lock-legal-hold"]],Metadata:[,Object.keys(e.headers).filter(o=>o.startsWith("x-amz-meta-")).reduce((o,s)=>(o[s.substring(11)]=e.headers[s],o),{})]}),r=e.body;return n.sdkStreamMixin(r),t.Body=r,t};p.de_GetObjectCommand=Zce;var ede=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await Wle(t,n);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await C_(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},tde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return nde(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.AccessControlList===""?t.Grants=[]:r.AccessControlList!==void 0&&r.AccessControlList.Grant!==void 0&&(t.Grants=Ej((0,d.getArrayIfSingleItem)(r.AccessControlList.Grant),n)),r.Owner!==void 0&&(t.Owner=Br(r.Owner,n)),t};p.de_GetObjectAclCommand=tde;var nde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await C_(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},rde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return ode(e,n);let t=(0,d.map)({$metadata:N(e),DeleteMarker:[()=>e.headers["x-amz-delete-marker"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-delete-marker"])],LastModified:[()=>e.headers["last-modified"]!==void 0,()=>(0,d.expectNonNull)((0,d.parseRfc7231DateTime)(e.headers["last-modified"]))],VersionId:[,e.headers["x-amz-version-id"]],RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.Checksum!==void 0&&(t.Checksum=ape(r.Checksum,n)),r.ETag!==void 0&&(t.ETag=(0,d.expectString)(r.ETag)),r.ObjectParts!==void 0&&(t.ObjectParts=Ope(r.ObjectParts,n)),r.ObjectSize!==void 0&&(t.ObjectSize=(0,d.strictParseLong)(r.ObjectSize)),r.StorageClass!==void 0&&(t.StorageClass=(0,d.expectString)(r.StorageClass)),t};p.de_GetObjectAttributesCommand=rde;var ode=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await C_(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},sde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return ide(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.LegalHold=lfe(r,n),t};p.de_GetObjectLegalHoldCommand=sde;var ide=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},ade=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return cde(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.ObjectLockConfiguration=dfe(r,n),t};p.de_GetObjectLockConfigurationCommand=ade;var cde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},dde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return lde(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.Retention=ufe(r,n),t};p.de_GetObjectRetentionCommand=dde;var lde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},ude=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return mde(e,n);let t=(0,d.map)({$metadata:N(e),VersionId:[,e.headers["x-amz-version-id"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.TagSet===""?t.TagSet=[]:r.TagSet!==void 0&&r.TagSet.Tag!==void 0&&(t.TagSet=po((0,d.getArrayIfSingleItem)(r.TagSet.Tag),n)),t};p.de_GetObjectTaggingCommand=ude;var mde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},pde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return fde(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=e.body;return n.sdkStreamMixin(r),t.Body=r,t};p.de_GetObjectTorrentCommand=pde;var fde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},_de=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return yde(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectObject)(await ne(e.body,n));return t.PublicAccessBlockConfiguration=vfe(r,n),t};p.de_GetPublicAccessBlockCommand=_de;var yde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},gde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return hde(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_HeadBucketCommand=gde;var hde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"NotFound":case"com.amazonaws.s3#NotFound":throw await mj(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},Cde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Sde(e,n);let t=(0,d.map)({$metadata:N(e),DeleteMarker:[()=>e.headers["x-amz-delete-marker"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-delete-marker"])],AcceptRanges:[,e.headers["accept-ranges"]],Expiration:[,e.headers["x-amz-expiration"]],Restore:[,e.headers["x-amz-restore"]],ArchiveStatus:[,e.headers["x-amz-archive-status"]],LastModified:[()=>e.headers["last-modified"]!==void 0,()=>(0,d.expectNonNull)((0,d.parseRfc7231DateTime)(e.headers["last-modified"]))],ContentLength:[()=>e.headers["content-length"]!==void 0,()=>(0,d.strictParseLong)(e.headers["content-length"])],ChecksumCRC32:[,e.headers["x-amz-checksum-crc32"]],ChecksumCRC32C:[,e.headers["x-amz-checksum-crc32c"]],ChecksumSHA1:[,e.headers["x-amz-checksum-sha1"]],ChecksumSHA256:[,e.headers["x-amz-checksum-sha256"]],ETag:[,e.headers.etag],MissingMeta:[()=>e.headers["x-amz-missing-meta"]!==void 0,()=>(0,d.strictParseInt32)(e.headers["x-amz-missing-meta"])],VersionId:[,e.headers["x-amz-version-id"]],CacheControl:[,e.headers["cache-control"]],ContentDisposition:[,e.headers["content-disposition"]],ContentEncoding:[,e.headers["content-encoding"]],ContentLanguage:[,e.headers["content-language"]],ContentType:[,e.headers["content-type"]],Expires:[()=>e.headers.expires!==void 0,()=>(0,d.expectNonNull)((0,d.parseRfc7231DateTime)(e.headers.expires))],WebsiteRedirectLocation:[,e.headers["x-amz-website-redirect-location"]],ServerSideEncryption:[,e.headers["x-amz-server-side-encryption"]],SSECustomerAlgorithm:[,e.headers["x-amz-server-side-encryption-customer-algorithm"]],SSECustomerKeyMD5:[,e.headers["x-amz-server-side-encryption-customer-key-md5"]],SSEKMSKeyId:[,e.headers["x-amz-server-side-encryption-aws-kms-key-id"]],BucketKeyEnabled:[()=>e.headers["x-amz-server-side-encryption-bucket-key-enabled"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-server-side-encryption-bucket-key-enabled"])],StorageClass:[,e.headers["x-amz-storage-class"]],RequestCharged:[,e.headers["x-amz-request-charged"]],ReplicationStatus:[,e.headers["x-amz-replication-status"]],PartsCount:[()=>e.headers["x-amz-mp-parts-count"]!==void 0,()=>(0,d.strictParseInt32)(e.headers["x-amz-mp-parts-count"])],ObjectLockMode:[,e.headers["x-amz-object-lock-mode"]],ObjectLockRetainUntilDate:[()=>e.headers["x-amz-object-lock-retain-until-date"]!==void 0,()=>(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.headers["x-amz-object-lock-retain-until-date"]))],ObjectLockLegalHoldStatus:[,e.headers["x-amz-object-lock-legal-hold"]],Metadata:[,Object.keys(e.headers).filter(r=>r.startsWith("x-amz-meta-")).reduce((r,o)=>(r[o.substring(11)]=e.headers[o],r),{})]});return await(0,d.collectBody)(e.body,n),t};p.de_HeadObjectCommand=Cde;var Sde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"NotFound":case"com.amazonaws.s3#NotFound":throw await mj(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},Ede=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return bde(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.AnalyticsConfiguration===""?t.AnalyticsConfigurationList=[]:r.AnalyticsConfiguration!==void 0&&(t.AnalyticsConfigurationList=tpe((0,d.getArrayIfSingleItem)(r.AnalyticsConfiguration),n)),r.ContinuationToken!==void 0&&(t.ContinuationToken=(0,d.expectString)(r.ContinuationToken)),r.IsTruncated!==void 0&&(t.IsTruncated=(0,d.parseBoolean)(r.IsTruncated)),r.NextContinuationToken!==void 0&&(t.NextContinuationToken=(0,d.expectString)(r.NextContinuationToken)),t};p.de_ListBucketAnalyticsConfigurationsCommand=Ede;var bde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Pde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return vde(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.ContinuationToken!==void 0&&(t.ContinuationToken=(0,d.expectString)(r.ContinuationToken)),r.IntelligentTieringConfiguration===""?t.IntelligentTieringConfigurationList=[]:r.IntelligentTieringConfiguration!==void 0&&(t.IntelligentTieringConfigurationList=Bpe((0,d.getArrayIfSingleItem)(r.IntelligentTieringConfiguration),n)),r.IsTruncated!==void 0&&(t.IsTruncated=(0,d.parseBoolean)(r.IsTruncated)),r.NextContinuationToken!==void 0&&(t.NextContinuationToken=(0,d.expectString)(r.NextContinuationToken)),t};p.de_ListBucketIntelligentTieringConfigurationsCommand=Pde;var vde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},xde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return wde(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.ContinuationToken!==void 0&&(t.ContinuationToken=(0,d.expectString)(r.ContinuationToken)),r.InventoryConfiguration===""?t.InventoryConfigurationList=[]:r.InventoryConfiguration!==void 0&&(t.InventoryConfigurationList=Fpe((0,d.getArrayIfSingleItem)(r.InventoryConfiguration),n)),r.IsTruncated!==void 0&&(t.IsTruncated=(0,d.parseBoolean)(r.IsTruncated)),r.NextContinuationToken!==void 0&&(t.NextContinuationToken=(0,d.expectString)(r.NextContinuationToken)),t};p.de_ListBucketInventoryConfigurationsCommand=xde;var wde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},kde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ade(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.ContinuationToken!==void 0&&(t.ContinuationToken=(0,d.expectString)(r.ContinuationToken)),r.IsTruncated!==void 0&&(t.IsTruncated=(0,d.parseBoolean)(r.IsTruncated)),r.MetricsConfiguration===""?t.MetricsConfigurationList=[]:r.MetricsConfiguration!==void 0&&(t.MetricsConfigurationList=tfe((0,d.getArrayIfSingleItem)(r.MetricsConfiguration),n)),r.NextContinuationToken!==void 0&&(t.NextContinuationToken=(0,d.expectString)(r.NextContinuationToken)),t};p.de_ListBucketMetricsConfigurationsCommand=kde;var Ade=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Ide=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Rde(e,n);let t=(0,d.map)({$metadata:N(e)}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.Buckets===""?t.Buckets=[]:r.Buckets!==void 0&&r.Buckets.Bucket!==void 0&&(t.Buckets=ipe((0,d.getArrayIfSingleItem)(r.Buckets.Bucket),n)),r.Owner!==void 0&&(t.Owner=Br(r.Owner,n)),t};p.de_ListBucketsCommand=Ide;var Rde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Nde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ode(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.Bucket!==void 0&&(t.Bucket=(0,d.expectString)(r.Bucket)),r.CommonPrefixes===""?t.CommonPrefixes=[]:r.CommonPrefixes!==void 0&&(t.CommonPrefixes=S_((0,d.getArrayIfSingleItem)(r.CommonPrefixes),n)),r.Delimiter!==void 0&&(t.Delimiter=(0,d.expectString)(r.Delimiter)),r.EncodingType!==void 0&&(t.EncodingType=(0,d.expectString)(r.EncodingType)),r.IsTruncated!==void 0&&(t.IsTruncated=(0,d.parseBoolean)(r.IsTruncated)),r.KeyMarker!==void 0&&(t.KeyMarker=(0,d.expectString)(r.KeyMarker)),r.MaxUploads!==void 0&&(t.MaxUploads=(0,d.strictParseInt32)(r.MaxUploads)),r.NextKeyMarker!==void 0&&(t.NextKeyMarker=(0,d.expectString)(r.NextKeyMarker)),r.NextUploadIdMarker!==void 0&&(t.NextUploadIdMarker=(0,d.expectString)(r.NextUploadIdMarker)),r.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(r.Prefix)),r.UploadIdMarker!==void 0&&(t.UploadIdMarker=(0,d.expectString)(r.UploadIdMarker)),r.Upload===""?t.Uploads=[]:r.Upload!==void 0&&(t.Uploads=ofe((0,d.getArrayIfSingleItem)(r.Upload),n)),t};p.de_ListMultipartUploadsCommand=Nde;var Ode=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Tde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return qde(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.CommonPrefixes===""?t.CommonPrefixes=[]:r.CommonPrefixes!==void 0&&(t.CommonPrefixes=S_((0,d.getArrayIfSingleItem)(r.CommonPrefixes),n)),r.Contents===""?t.Contents=[]:r.Contents!==void 0&&(t.Contents=wj((0,d.getArrayIfSingleItem)(r.Contents),n)),r.Delimiter!==void 0&&(t.Delimiter=(0,d.expectString)(r.Delimiter)),r.EncodingType!==void 0&&(t.EncodingType=(0,d.expectString)(r.EncodingType)),r.IsTruncated!==void 0&&(t.IsTruncated=(0,d.parseBoolean)(r.IsTruncated)),r.Marker!==void 0&&(t.Marker=(0,d.expectString)(r.Marker)),r.MaxKeys!==void 0&&(t.MaxKeys=(0,d.strictParseInt32)(r.MaxKeys)),r.Name!==void 0&&(t.Name=(0,d.expectString)(r.Name)),r.NextMarker!==void 0&&(t.NextMarker=(0,d.expectString)(r.NextMarker)),r.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(r.Prefix)),t};p.de_ListObjectsCommand=Tde;var qde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await uj(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},Mde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Bde(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.CommonPrefixes===""?t.CommonPrefixes=[]:r.CommonPrefixes!==void 0&&(t.CommonPrefixes=S_((0,d.getArrayIfSingleItem)(r.CommonPrefixes),n)),r.Contents===""?t.Contents=[]:r.Contents!==void 0&&(t.Contents=wj((0,d.getArrayIfSingleItem)(r.Contents),n)),r.ContinuationToken!==void 0&&(t.ContinuationToken=(0,d.expectString)(r.ContinuationToken)),r.Delimiter!==void 0&&(t.Delimiter=(0,d.expectString)(r.Delimiter)),r.EncodingType!==void 0&&(t.EncodingType=(0,d.expectString)(r.EncodingType)),r.IsTruncated!==void 0&&(t.IsTruncated=(0,d.parseBoolean)(r.IsTruncated)),r.KeyCount!==void 0&&(t.KeyCount=(0,d.strictParseInt32)(r.KeyCount)),r.MaxKeys!==void 0&&(t.MaxKeys=(0,d.strictParseInt32)(r.MaxKeys)),r.Name!==void 0&&(t.Name=(0,d.expectString)(r.Name)),r.NextContinuationToken!==void 0&&(t.NextContinuationToken=(0,d.expectString)(r.NextContinuationToken)),r.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(r.Prefix)),r.StartAfter!==void 0&&(t.StartAfter=(0,d.expectString)(r.StartAfter)),t};p.de_ListObjectsV2Command=Mde;var Bde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await uj(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},Dde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Fde(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.CommonPrefixes===""?t.CommonPrefixes=[]:r.CommonPrefixes!==void 0&&(t.CommonPrefixes=S_((0,d.getArrayIfSingleItem)(r.CommonPrefixes),n)),r.DeleteMarker===""?t.DeleteMarkers=[]:r.DeleteMarker!==void 0&&(t.DeleteMarkers=Spe((0,d.getArrayIfSingleItem)(r.DeleteMarker),n)),r.Delimiter!==void 0&&(t.Delimiter=(0,d.expectString)(r.Delimiter)),r.EncodingType!==void 0&&(t.EncodingType=(0,d.expectString)(r.EncodingType)),r.IsTruncated!==void 0&&(t.IsTruncated=(0,d.parseBoolean)(r.IsTruncated)),r.KeyMarker!==void 0&&(t.KeyMarker=(0,d.expectString)(r.KeyMarker)),r.MaxKeys!==void 0&&(t.MaxKeys=(0,d.strictParseInt32)(r.MaxKeys)),r.Name!==void 0&&(t.Name=(0,d.expectString)(r.Name)),r.NextKeyMarker!==void 0&&(t.NextKeyMarker=(0,d.expectString)(r.NextKeyMarker)),r.NextVersionIdMarker!==void 0&&(t.NextVersionIdMarker=(0,d.expectString)(r.NextVersionIdMarker)),r.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(r.Prefix)),r.VersionIdMarker!==void 0&&(t.VersionIdMarker=(0,d.expectString)(r.VersionIdMarker)),r.Version===""?t.Versions=[]:r.Version!==void 0&&(t.Versions=_fe((0,d.getArrayIfSingleItem)(r.Version),n)),t};p.de_ListObjectVersionsCommand=Dde;var Fde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Lde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return jde(e,n);let t=(0,d.map)({$metadata:N(e),AbortDate:[()=>e.headers["x-amz-abort-date"]!==void 0,()=>(0,d.expectNonNull)((0,d.parseRfc7231DateTime)(e.headers["x-amz-abort-date"]))],AbortRuleId:[,e.headers["x-amz-abort-rule-id"]],RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectNonNull)((0,d.expectObject)(await ne(e.body,n)),"body");return r.Bucket!==void 0&&(t.Bucket=(0,d.expectString)(r.Bucket)),r.ChecksumAlgorithm!==void 0&&(t.ChecksumAlgorithm=(0,d.expectString)(r.ChecksumAlgorithm)),r.Initiator!==void 0&&(t.Initiator=bj(r.Initiator,n)),r.IsTruncated!==void 0&&(t.IsTruncated=(0,d.parseBoolean)(r.IsTruncated)),r.Key!==void 0&&(t.Key=(0,d.expectString)(r.Key)),r.MaxParts!==void 0&&(t.MaxParts=(0,d.strictParseInt32)(r.MaxParts)),r.NextPartNumberMarker!==void 0&&(t.NextPartNumberMarker=(0,d.expectString)(r.NextPartNumberMarker)),r.Owner!==void 0&&(t.Owner=Br(r.Owner,n)),r.PartNumberMarker!==void 0&&(t.PartNumberMarker=(0,d.expectString)(r.PartNumberMarker)),r.Part===""?t.Parts=[]:r.Part!==void 0&&(t.Parts=Sfe((0,d.getArrayIfSingleItem)(r.Part),n)),r.StorageClass!==void 0&&(t.StorageClass=(0,d.expectString)(r.StorageClass)),r.UploadId!==void 0&&(t.UploadId=(0,d.expectString)(r.UploadId)),t};p.de_ListPartsCommand=Lde;var jde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Ude=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return zde(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketAccelerateConfigurationCommand=Ude;var zde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Gde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Hde(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketAclCommand=Gde;var Hde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},$de=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Kde(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketAnalyticsConfigurationCommand=$de;var Kde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Vde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Xde(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketCorsCommand=Vde;var Xde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Wde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Yde(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketEncryptionCommand=Wde;var Yde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Qde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Jde(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketIntelligentTieringConfigurationCommand=Qde;var Jde=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Zde=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return ele(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketInventoryConfigurationCommand=Zde;var ele=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},tle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return nle(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketLifecycleConfigurationCommand=tle;var nle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},rle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return ole(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketLoggingCommand=rle;var ole=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},sle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return ile(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketMetricsConfigurationCommand=sle;var ile=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},ale=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return cle(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketNotificationConfigurationCommand=ale;var cle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},dle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return lle(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketOwnershipControlsCommand=dle;var lle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},ule=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return mle(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketPolicyCommand=ule;var mle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},ple=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return fle(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketReplicationCommand=ple;var fle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},_le=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return yle(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketRequestPaymentCommand=_le;var yle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},gle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return hle(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketTaggingCommand=gle;var hle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Cle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Sle(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketVersioningCommand=Cle;var Sle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Ele=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return ble(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutBucketWebsiteCommand=Ele;var ble=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Ple=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return vle(e,n);let t=(0,d.map)({$metadata:N(e),Expiration:[,e.headers["x-amz-expiration"]],ETag:[,e.headers.etag],ChecksumCRC32:[,e.headers["x-amz-checksum-crc32"]],ChecksumCRC32C:[,e.headers["x-amz-checksum-crc32c"]],ChecksumSHA1:[,e.headers["x-amz-checksum-sha1"]],ChecksumSHA256:[,e.headers["x-amz-checksum-sha256"]],ServerSideEncryption:[,e.headers["x-amz-server-side-encryption"]],VersionId:[,e.headers["x-amz-version-id"]],SSECustomerAlgorithm:[,e.headers["x-amz-server-side-encryption-customer-algorithm"]],SSECustomerKeyMD5:[,e.headers["x-amz-server-side-encryption-customer-key-md5"]],SSEKMSKeyId:[,e.headers["x-amz-server-side-encryption-aws-kms-key-id"]],SSEKMSEncryptionContext:[,e.headers["x-amz-server-side-encryption-context"]],BucketKeyEnabled:[()=>e.headers["x-amz-server-side-encryption-bucket-key-enabled"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-server-side-encryption-bucket-key-enabled"])],RequestCharged:[,e.headers["x-amz-request-charged"]]});return await(0,d.collectBody)(e.body,n),t};p.de_PutObjectCommand=Ple;var vle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},xle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return wle(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]});return await(0,d.collectBody)(e.body,n),t};p.de_PutObjectAclCommand=xle;var wle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await C_(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},kle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ale(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]});return await(0,d.collectBody)(e.body,n),t};p.de_PutObjectLegalHoldCommand=kle;var Ale=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Ile=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Rle(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]});return await(0,d.collectBody)(e.body,n),t};p.de_PutObjectLockConfigurationCommand=Ile;var Rle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Nle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ole(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]]});return await(0,d.collectBody)(e.body,n),t};p.de_PutObjectRetentionCommand=Nle;var Ole=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Tle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return qle(e,n);let t=(0,d.map)({$metadata:N(e),VersionId:[,e.headers["x-amz-version-id"]]});return await(0,d.collectBody)(e.body,n),t};p.de_PutObjectTaggingCommand=Tle;var qle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Mle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ble(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_PutPublicAccessBlockCommand=Mle;var Ble=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Dle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Fle(e,n);let t=(0,d.map)({$metadata:N(e),RequestCharged:[,e.headers["x-amz-request-charged"]],RestoreOutputPath:[,e.headers["x-amz-restore-output-path"]]});return await(0,d.collectBody)(e.body,n),t};p.de_RestoreObjectCommand=Dle;var Fle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body);switch(r){case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await Qle(t,n);default:let o=t.body;return B({output:e,parsedBody:o,errorCode:r})}},Lle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return jle(e,n);let t=(0,d.map)({$metadata:N(e)}),r=e.body;return t.Payload=Zle(r,n),t};p.de_SelectObjectContentCommand=Lle;var jle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Ule=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return zle(e,n);let t=(0,d.map)({$metadata:N(e),ServerSideEncryption:[,e.headers["x-amz-server-side-encryption"]],ETag:[,e.headers.etag],ChecksumCRC32:[,e.headers["x-amz-checksum-crc32"]],ChecksumCRC32C:[,e.headers["x-amz-checksum-crc32c"]],ChecksumSHA1:[,e.headers["x-amz-checksum-sha1"]],ChecksumSHA256:[,e.headers["x-amz-checksum-sha256"]],SSECustomerAlgorithm:[,e.headers["x-amz-server-side-encryption-customer-algorithm"]],SSECustomerKeyMD5:[,e.headers["x-amz-server-side-encryption-customer-key-md5"]],SSEKMSKeyId:[,e.headers["x-amz-server-side-encryption-aws-kms-key-id"]],BucketKeyEnabled:[()=>e.headers["x-amz-server-side-encryption-bucket-key-enabled"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-server-side-encryption-bucket-key-enabled"])],RequestCharged:[,e.headers["x-amz-request-charged"]]});return await(0,d.collectBody)(e.body,n),t};p.de_UploadPartCommand=Ule;var zle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},Gle=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Hle(e,n);let t=(0,d.map)({$metadata:N(e),CopySourceVersionId:[,e.headers["x-amz-copy-source-version-id"]],ServerSideEncryption:[,e.headers["x-amz-server-side-encryption"]],SSECustomerAlgorithm:[,e.headers["x-amz-server-side-encryption-customer-algorithm"]],SSECustomerKeyMD5:[,e.headers["x-amz-server-side-encryption-customer-key-md5"]],SSEKMSKeyId:[,e.headers["x-amz-server-side-encryption-aws-kms-key-id"]],BucketKeyEnabled:[()=>e.headers["x-amz-server-side-encryption-bucket-key-enabled"]!==void 0,()=>(0,d.parseBoolean)(e.headers["x-amz-server-side-encryption-bucket-key-enabled"])],RequestCharged:[,e.headers["x-amz-request-charged"]]}),r=(0,d.expectObject)(await ne(e.body,n));return t.CopyPartResult=mpe(r,n),t};p.de_UploadPartCopyCommand=Gle;var Hle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},$le=async(e,n)=>{if(e.statusCode!==200&&e.statusCode>=300)return Kle(e,n);let t=(0,d.map)({$metadata:N(e)});return await(0,d.collectBody)(e.body,n),t};p.de_WriteGetObjectResponseCommand=$le;var Kle=async(e,n)=>{let t={...e,body:await D(e.body,n)},r=F(e,t.body),o=t.body;return B({output:e,parsedBody:o,errorCode:r})},B=(0,d.withBaseException)(Dse.S3ServiceException),Vle=async(e,n)=>{let t=(0,d.map)({}),r=e.body,o=new Tt.BucketAlreadyExists({$metadata:N(e),...t});return(0,d.decorateServiceException)(o,e.body)},Xle=async(e,n)=>{let t=(0,d.map)({}),r=e.body,o=new Tt.BucketAlreadyOwnedByYou({$metadata:N(e),...t});return(0,d.decorateServiceException)(o,e.body)},Wle=async(e,n)=>{let t=(0,d.map)({}),r=e.body;r.AccessTier!==void 0&&(t.AccessTier=(0,d.expectString)(r.AccessTier)),r.StorageClass!==void 0&&(t.StorageClass=(0,d.expectString)(r.StorageClass));let o=new Tt.InvalidObjectState({$metadata:N(e),...t});return(0,d.decorateServiceException)(o,e.body)},uj=async(e,n)=>{let t=(0,d.map)({}),r=e.body,o=new Tt.NoSuchBucket({$metadata:N(e),...t});return(0,d.decorateServiceException)(o,e.body)},C_=async(e,n)=>{let t=(0,d.map)({}),r=e.body,o=new Tt.NoSuchKey({$metadata:N(e),...t});return(0,d.decorateServiceException)(o,e.body)},Yle=async(e,n)=>{let t=(0,d.map)({}),r=e.body,o=new Tt.NoSuchUpload({$metadata:N(e),...t});return(0,d.decorateServiceException)(o,e.body)},mj=async(e,n)=>{let t=(0,d.map)({}),r=e.body,o=new Tt.NotFound({$metadata:N(e),...t});return(0,d.decorateServiceException)(o,e.body)},Qle=async(e,n)=>{let t=(0,d.map)({}),r=e.body,o=new Bse.ObjectAlreadyInActiveTierError({$metadata:N(e),...t});return(0,d.decorateServiceException)(o,e.body)},Jle=async(e,n)=>{let t=(0,d.map)({}),r=e.body,o=new Tt.ObjectNotInActiveTierError({$metadata:N(e),...t});return(0,d.decorateServiceException)(o,e.body)},Zle=(e,n)=>n.eventStreamMarshaller.deserialize(e,async t=>t.Records!=null?{Records:await rue(t.Records,n)}:t.Stats!=null?{Stats:await oue(t.Stats,n)}:t.Progress!=null?{Progress:await nue(t.Progress,n)}:t.Cont!=null?{Cont:await eue(t.Cont,n)}:t.End!=null?{End:await tue(t.End,n)}:{$unknown:e}),eue=async(e,n)=>{let t={},r=await ne(e.body,n);return Object.assign(t,lpe(r,n)),t},tue=async(e,n)=>{let t={},r=await ne(e.body,n);return Object.assign(t,Ppe(r,n)),t},nue=async(e,n)=>{let t={},r=await ne(e.body,n);return t.Details=Pfe(r,n),t},rue=async(e,n)=>{let t={};return t.Payload=e.body,t},oue=async(e,n)=>{let t={},r=await ne(e.body,n);return t.Details=Vfe(r,n),t},sue=(e,n)=>{let t=new f.XmlNode("AbortIncompleteMultipartUpload");if(e.DaysAfterInitiation!=null){let r=f.XmlNode.of("DaysAfterInitiation",String(e.DaysAfterInitiation)).withName("DaysAfterInitiation");t.addChildNode(r)}return t},zL=(e,n)=>{let t=new f.XmlNode("AccelerateConfiguration");if(e.Status!=null){let r=f.XmlNode.of("BucketAccelerateStatus",e.Status).withName("Status");t.addChildNode(r)}return t},h_=(e,n)=>{let t=new f.XmlNode("AccessControlPolicy");if(e.Grants!=null){let r=fj(e.Grants,n),o=new f.XmlNode("AccessControlList");r.map(s=>{o.addChildNode(s)}),t.addChildNode(o)}if(e.Owner!=null){let r=lme(e.Owner,n).withName("Owner");t.addChildNode(r)}return t},iue=(e,n)=>{let t=new f.XmlNode("AccessControlTranslation");if(e.Owner!=null){let r=f.XmlNode.of("OwnerOverride",e.Owner).withName("Owner");t.addChildNode(r)}return t},aue=(e,n)=>e.filter(t=>t!=null).map(t=>f.XmlNode.of("AllowedHeader",t).withName("member")),cue=(e,n)=>e.filter(t=>t!=null).map(t=>f.XmlNode.of("AllowedMethod",t).withName("member")),due=(e,n)=>e.filter(t=>t!=null).map(t=>f.XmlNode.of("AllowedOrigin",t).withName("member")),lue=(e,n)=>{let t=new f.XmlNode("AnalyticsAndOperator");if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}return e.Tags!=null&&Ds(e.Tags,n).map(o=>{o=o.withName("Tag"),t.addChildNode(o)}),t},GL=(e,n)=>{let t=new f.XmlNode("AnalyticsConfiguration");if(e.Id!=null){let r=f.XmlNode.of("AnalyticsId",e.Id).withName("Id");t.addChildNode(r)}if(e.Filter!=null){let r=mue(e.Filter,n).withName("Filter");t.addChildNode(r)}if(e.StorageClassAnalysis!=null){let r=Fme(e.StorageClassAnalysis,n).withName("StorageClassAnalysis");t.addChildNode(r)}return t},uue=(e,n)=>{let t=new f.XmlNode("AnalyticsExportDestination");if(e.S3BucketDestination!=null){let r=pue(e.S3BucketDestination,n).withName("S3BucketDestination");t.addChildNode(r)}return t},mue=(e,n)=>{let t=new f.XmlNode("AnalyticsFilter");return Tt.AnalyticsFilter.visit(e,{Prefix:r=>{let o=f.XmlNode.of("Prefix",r).withName("Prefix");t.addChildNode(o)},Tag:r=>{let o=Bs(r,n).withName("Tag");t.addChildNode(o)},And:r=>{let o=lue(r,n).withName("And");t.addChildNode(o)},_:(r,o)=>{if(!(o instanceof f.XmlNode||o instanceof f.XmlText))throw new Error("Unable to serialize unknown union members in XML.");t.addChildNode(new f.XmlNode(r).addChildNode(o))}}),t},pue=(e,n)=>{let t=new f.XmlNode("AnalyticsS3BucketDestination");if(e.Format!=null){let r=f.XmlNode.of("AnalyticsS3ExportFileFormat",e.Format).withName("Format");t.addChildNode(r)}if(e.BucketAccountId!=null){let r=f.XmlNode.of("AccountId",e.BucketAccountId).withName("BucketAccountId");t.addChildNode(r)}if(e.Bucket!=null){let r=f.XmlNode.of("BucketName",e.Bucket).withName("Bucket");t.addChildNode(r)}if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}return t},HL=(e,n)=>{let t=new f.XmlNode("BucketLifecycleConfiguration");return e.Rules!=null&&Que(e.Rules,n).map(o=>{o=o.withName("Rule"),t.addChildNode(o)}),t},$L=(e,n)=>{let t=new f.XmlNode("BucketLoggingStatus");if(e.LoggingEnabled!=null){let r=Jue(e.LoggingEnabled,n).withName("LoggingEnabled");t.addChildNode(r)}return t},KL=(e,n)=>{let t=new f.XmlNode("CompletedMultipartUpload");return e.Parts!=null&&_ue(e.Parts,n).map(o=>{o=o.withName("Part"),t.addChildNode(o)}),t},fue=(e,n)=>{let t=new f.XmlNode("CompletedPart");if(e.ETag!=null){let r=f.XmlNode.of("ETag",e.ETag).withName("ETag");t.addChildNode(r)}if(e.ChecksumCRC32!=null){let r=f.XmlNode.of("ChecksumCRC32",e.ChecksumCRC32).withName("ChecksumCRC32");t.addChildNode(r)}if(e.ChecksumCRC32C!=null){let r=f.XmlNode.of("ChecksumCRC32C",e.ChecksumCRC32C).withName("ChecksumCRC32C");t.addChildNode(r)}if(e.ChecksumSHA1!=null){let r=f.XmlNode.of("ChecksumSHA1",e.ChecksumSHA1).withName("ChecksumSHA1");t.addChildNode(r)}if(e.ChecksumSHA256!=null){let r=f.XmlNode.of("ChecksumSHA256",e.ChecksumSHA256).withName("ChecksumSHA256");t.addChildNode(r)}if(e.PartNumber!=null){let r=f.XmlNode.of("PartNumber",String(e.PartNumber)).withName("PartNumber");t.addChildNode(r)}return t},_ue=(e,n)=>e.filter(t=>t!=null).map(t=>fue(t,n).withName("member")),yue=(e,n)=>{let t=new f.XmlNode("Condition");if(e.HttpErrorCodeReturnedEquals!=null){let r=f.XmlNode.of("HttpErrorCodeReturnedEquals",e.HttpErrorCodeReturnedEquals).withName("HttpErrorCodeReturnedEquals");t.addChildNode(r)}if(e.KeyPrefixEquals!=null){let r=f.XmlNode.of("KeyPrefixEquals",e.KeyPrefixEquals).withName("KeyPrefixEquals");t.addChildNode(r)}return t},VL=(e,n)=>{let t=new f.XmlNode("CORSConfiguration");return e.CORSRules!=null&&hue(e.CORSRules,n).map(o=>{o=o.withName("CORSRule"),t.addChildNode(o)}),t},gue=(e,n)=>{let t=new f.XmlNode("CORSRule");if(e.ID!=null){let r=f.XmlNode.of("ID",e.ID).withName("ID");t.addChildNode(r)}if(e.AllowedHeaders!=null&&aue(e.AllowedHeaders,n).map(o=>{o=o.withName("AllowedHeader"),t.addChildNode(o)}),e.AllowedMethods!=null&&cue(e.AllowedMethods,n).map(o=>{o=o.withName("AllowedMethod"),t.addChildNode(o)}),e.AllowedOrigins!=null&&due(e.AllowedOrigins,n).map(o=>{o=o.withName("AllowedOrigin"),t.addChildNode(o)}),e.ExposeHeaders!=null&&Iue(e.ExposeHeaders,n).map(o=>{o=o.withName("ExposeHeader"),t.addChildNode(o)}),e.MaxAgeSeconds!=null){let r=f.XmlNode.of("MaxAgeSeconds",String(e.MaxAgeSeconds)).withName("MaxAgeSeconds");t.addChildNode(r)}return t},hue=(e,n)=>e.filter(t=>t!=null).map(t=>gue(t,n).withName("member")),XL=(e,n)=>{let t=new f.XmlNode("CreateBucketConfiguration");if(e.LocationConstraint!=null){let r=f.XmlNode.of("BucketLocationConstraint",e.LocationConstraint).withName("LocationConstraint");t.addChildNode(r)}return t},Cue=(e,n)=>{let t=new f.XmlNode("CSVInput");if(e.FileHeaderInfo!=null){let r=f.XmlNode.of("FileHeaderInfo",e.FileHeaderInfo).withName("FileHeaderInfo");t.addChildNode(r)}if(e.Comments!=null){let r=f.XmlNode.of("Comments",e.Comments).withName("Comments");t.addChildNode(r)}if(e.QuoteEscapeCharacter!=null){let r=f.XmlNode.of("QuoteEscapeCharacter",e.QuoteEscapeCharacter).withName("QuoteEscapeCharacter");t.addChildNode(r)}if(e.RecordDelimiter!=null){let r=f.XmlNode.of("RecordDelimiter",e.RecordDelimiter).withName("RecordDelimiter");t.addChildNode(r)}if(e.FieldDelimiter!=null){let r=f.XmlNode.of("FieldDelimiter",e.FieldDelimiter).withName("FieldDelimiter");t.addChildNode(r)}if(e.QuoteCharacter!=null){let r=f.XmlNode.of("QuoteCharacter",e.QuoteCharacter).withName("QuoteCharacter");t.addChildNode(r)}if(e.AllowQuotedRecordDelimiter!=null){let r=f.XmlNode.of("AllowQuotedRecordDelimiter",String(e.AllowQuotedRecordDelimiter)).withName("AllowQuotedRecordDelimiter");t.addChildNode(r)}return t},Sue=(e,n)=>{let t=new f.XmlNode("CSVOutput");if(e.QuoteFields!=null){let r=f.XmlNode.of("QuoteFields",e.QuoteFields).withName("QuoteFields");t.addChildNode(r)}if(e.QuoteEscapeCharacter!=null){let r=f.XmlNode.of("QuoteEscapeCharacter",e.QuoteEscapeCharacter).withName("QuoteEscapeCharacter");t.addChildNode(r)}if(e.RecordDelimiter!=null){let r=f.XmlNode.of("RecordDelimiter",e.RecordDelimiter).withName("RecordDelimiter");t.addChildNode(r)}if(e.FieldDelimiter!=null){let r=f.XmlNode.of("FieldDelimiter",e.FieldDelimiter).withName("FieldDelimiter");t.addChildNode(r)}if(e.QuoteCharacter!=null){let r=f.XmlNode.of("QuoteCharacter",e.QuoteCharacter).withName("QuoteCharacter");t.addChildNode(r)}return t},Eue=(e,n)=>{let t=new f.XmlNode("DefaultRetention");if(e.Mode!=null){let r=f.XmlNode.of("ObjectLockRetentionMode",e.Mode).withName("Mode");t.addChildNode(r)}if(e.Days!=null){let r=f.XmlNode.of("Days",String(e.Days)).withName("Days");t.addChildNode(r)}if(e.Years!=null){let r=f.XmlNode.of("Years",String(e.Years)).withName("Years");t.addChildNode(r)}return t},WL=(e,n)=>{let t=new f.XmlNode("Delete");if(e.Objects!=null&&ame(e.Objects,n).map(o=>{o=o.withName("Object"),t.addChildNode(o)}),e.Quiet!=null){let r=f.XmlNode.of("Quiet",String(e.Quiet)).withName("Quiet");t.addChildNode(r)}return t},bue=(e,n)=>{let t=new f.XmlNode("DeleteMarkerReplication");if(e.Status!=null){let r=f.XmlNode.of("DeleteMarkerReplicationStatus",e.Status).withName("Status");t.addChildNode(r)}return t},Pue=(e,n)=>{let t=new f.XmlNode("Destination");if(e.Bucket!=null){let r=f.XmlNode.of("BucketName",e.Bucket).withName("Bucket");t.addChildNode(r)}if(e.Account!=null){let r=f.XmlNode.of("AccountId",e.Account).withName("Account");t.addChildNode(r)}if(e.StorageClass!=null){let r=f.XmlNode.of("StorageClass",e.StorageClass).withName("StorageClass");t.addChildNode(r)}if(e.AccessControlTranslation!=null){let r=iue(e.AccessControlTranslation,n).withName("AccessControlTranslation");t.addChildNode(r)}if(e.EncryptionConfiguration!=null){let r=xue(e.EncryptionConfiguration,n).withName("EncryptionConfiguration");t.addChildNode(r)}if(e.ReplicationTime!=null){let r=Pme(e.ReplicationTime,n).withName("ReplicationTime");t.addChildNode(r)}if(e.Metrics!=null){let r=eme(e.Metrics,n).withName("Metrics");t.addChildNode(r)}return t},vue=(e,n)=>{let t=new f.XmlNode("Encryption");if(e.EncryptionType!=null){let r=f.XmlNode.of("ServerSideEncryption",e.EncryptionType).withName("EncryptionType");t.addChildNode(r)}if(e.KMSKeyId!=null){let r=f.XmlNode.of("SSEKMSKeyId",e.KMSKeyId).withName("KMSKeyId");t.addChildNode(r)}if(e.KMSContext!=null){let r=f.XmlNode.of("KMSContext",e.KMSContext).withName("KMSContext");t.addChildNode(r)}return t},xue=(e,n)=>{let t=new f.XmlNode("EncryptionConfiguration");if(e.ReplicaKmsKeyID!=null){let r=f.XmlNode.of("ReplicaKmsKeyID",e.ReplicaKmsKeyID).withName("ReplicaKmsKeyID");t.addChildNode(r)}return t},wue=(e,n)=>{let t=new f.XmlNode("ErrorDocument");if(e.Key!=null){let r=f.XmlNode.of("ObjectKey",e.Key).withName("Key");t.addChildNode(r)}return t},kue=(e,n)=>new f.XmlNode("EventBridgeConfiguration"),wE=(e,n)=>e.filter(t=>t!=null).map(t=>f.XmlNode.of("Event",t).withName("member")),Aue=(e,n)=>{let t=new f.XmlNode("ExistingObjectReplication");if(e.Status!=null){let r=f.XmlNode.of("ExistingObjectReplicationStatus",e.Status).withName("Status");t.addChildNode(r)}return t},Iue=(e,n)=>e.filter(t=>t!=null).map(t=>f.XmlNode.of("ExposeHeader",t).withName("member")),Rue=(e,n)=>{let t=new f.XmlNode("FilterRule");if(e.Name!=null){let r=f.XmlNode.of("FilterRuleName",e.Name).withName("Name");t.addChildNode(r)}if(e.Value!=null){let r=f.XmlNode.of("FilterRuleValue",e.Value).withName("Value");t.addChildNode(r)}return t},Nue=(e,n)=>e.filter(t=>t!=null).map(t=>Rue(t,n).withName("member")),Oue=(e,n)=>{let t=new f.XmlNode("GlacierJobParameters");if(e.Tier!=null){let r=f.XmlNode.of("Tier",e.Tier).withName("Tier");t.addChildNode(r)}return t},Tue=(e,n)=>{let t=new f.XmlNode("Grant");if(e.Grantee!=null){let r=pj(e.Grantee,n).withName("Grantee");r.addAttribute("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),t.addChildNode(r)}if(e.Permission!=null){let r=f.XmlNode.of("Permission",e.Permission).withName("Permission");t.addChildNode(r)}return t},pj=(e,n)=>{let t=new f.XmlNode("Grantee");if(e.DisplayName!=null){let r=f.XmlNode.of("DisplayName",e.DisplayName).withName("DisplayName");t.addChildNode(r)}if(e.EmailAddress!=null){let r=f.XmlNode.of("EmailAddress",e.EmailAddress).withName("EmailAddress");t.addChildNode(r)}if(e.ID!=null){let r=f.XmlNode.of("ID",e.ID).withName("ID");t.addChildNode(r)}if(e.URI!=null){let r=f.XmlNode.of("URI",e.URI).withName("URI");t.addChildNode(r)}return e.Type!=null&&t.addAttribute("xsi:type",e.Type),t},fj=(e,n)=>e.filter(t=>t!=null).map(t=>Tue(t,n).withName("Grant")),que=(e,n)=>{let t=new f.XmlNode("IndexDocument");if(e.Suffix!=null){let r=f.XmlNode.of("Suffix",e.Suffix).withName("Suffix");t.addChildNode(r)}return t},_j=(e,n)=>{let t=new f.XmlNode("InputSerialization");if(e.CSV!=null){let r=Cue(e.CSV,n).withName("CSV");t.addChildNode(r)}if(e.CompressionType!=null){let r=f.XmlNode.of("CompressionType",e.CompressionType).withName("CompressionType");t.addChildNode(r)}if(e.JSON!=null){let r=Gue(e.JSON,n).withName("JSON");t.addChildNode(r)}if(e.Parquet!=null){let r=pme(e.Parquet,n).withName("Parquet");t.addChildNode(r)}return t},Mue=(e,n)=>{let t=new f.XmlNode("IntelligentTieringAndOperator");if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}return e.Tags!=null&&Ds(e.Tags,n).map(o=>{o=o.withName("Tag"),t.addChildNode(o)}),t},YL=(e,n)=>{let t=new f.XmlNode("IntelligentTieringConfiguration");if(e.Id!=null){let r=f.XmlNode.of("IntelligentTieringId",e.Id).withName("Id");t.addChildNode(r)}if(e.Filter!=null){let r=Bue(e.Filter,n).withName("Filter");t.addChildNode(r)}if(e.Status!=null){let r=f.XmlNode.of("IntelligentTieringStatus",e.Status).withName("Status");t.addChildNode(r)}return e.Tierings!=null&&Gme(e.Tierings,n).map(o=>{o=o.withName("Tiering"),t.addChildNode(o)}),t},Bue=(e,n)=>{let t=new f.XmlNode("IntelligentTieringFilter");if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}if(e.Tag!=null){let r=Bs(e.Tag,n).withName("Tag");t.addChildNode(r)}if(e.And!=null){let r=Mue(e.And,n).withName("And");t.addChildNode(r)}return t},QL=(e,n)=>{let t=new f.XmlNode("InventoryConfiguration");if(e.Destination!=null){let r=Due(e.Destination,n).withName("Destination");t.addChildNode(r)}if(e.IsEnabled!=null){let r=f.XmlNode.of("IsEnabled",String(e.IsEnabled)).withName("IsEnabled");t.addChildNode(r)}if(e.Filter!=null){let r=Lue(e.Filter,n).withName("Filter");t.addChildNode(r)}if(e.Id!=null){let r=f.XmlNode.of("InventoryId",e.Id).withName("Id");t.addChildNode(r)}if(e.IncludedObjectVersions!=null){let r=f.XmlNode.of("InventoryIncludedObjectVersions",e.IncludedObjectVersions).withName("IncludedObjectVersions");t.addChildNode(r)}if(e.OptionalFields!=null){let r=jue(e.OptionalFields,n),o=new f.XmlNode("OptionalFields");r.map(s=>{o.addChildNode(s)}),t.addChildNode(o)}if(e.Schedule!=null){let r=zue(e.Schedule,n).withName("Schedule");t.addChildNode(r)}return t},Due=(e,n)=>{let t=new f.XmlNode("InventoryDestination");if(e.S3BucketDestination!=null){let r=Uue(e.S3BucketDestination,n).withName("S3BucketDestination");t.addChildNode(r)}return t},Fue=(e,n)=>{let t=new f.XmlNode("InventoryEncryption");if(e.SSES3!=null){let r=Dme(e.SSES3,n).withName("SSE-S3");t.addChildNode(r)}if(e.SSEKMS!=null){let r=Mme(e.SSEKMS,n).withName("SSE-KMS");t.addChildNode(r)}return t},Lue=(e,n)=>{let t=new f.XmlNode("InventoryFilter");if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}return t},jue=(e,n)=>e.filter(t=>t!=null).map(t=>f.XmlNode.of("InventoryOptionalField",t).withName("Field")),Uue=(e,n)=>{let t=new f.XmlNode("InventoryS3BucketDestination");if(e.AccountId!=null){let r=f.XmlNode.of("AccountId",e.AccountId).withName("AccountId");t.addChildNode(r)}if(e.Bucket!=null){let r=f.XmlNode.of("BucketName",e.Bucket).withName("Bucket");t.addChildNode(r)}if(e.Format!=null){let r=f.XmlNode.of("InventoryFormat",e.Format).withName("Format");t.addChildNode(r)}if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}if(e.Encryption!=null){let r=Fue(e.Encryption,n).withName("Encryption");t.addChildNode(r)}return t},zue=(e,n)=>{let t=new f.XmlNode("InventorySchedule");if(e.Frequency!=null){let r=f.XmlNode.of("InventoryFrequency",e.Frequency).withName("Frequency");t.addChildNode(r)}return t},Gue=(e,n)=>{let t=new f.XmlNode("JSONInput");if(e.Type!=null){let r=f.XmlNode.of("JSONType",e.Type).withName("Type");t.addChildNode(r)}return t},Hue=(e,n)=>{let t=new f.XmlNode("JSONOutput");if(e.RecordDelimiter!=null){let r=f.XmlNode.of("RecordDelimiter",e.RecordDelimiter).withName("RecordDelimiter");t.addChildNode(r)}return t},$ue=(e,n)=>{let t=new f.XmlNode("LambdaFunctionConfiguration");if(e.Id!=null){let r=f.XmlNode.of("NotificationId",e.Id).withName("Id");t.addChildNode(r)}if(e.LambdaFunctionArn!=null){let r=f.XmlNode.of("LambdaFunctionArn",e.LambdaFunctionArn).withName("CloudFunction");t.addChildNode(r)}if(e.Events!=null&&wE(e.Events,n).map(o=>{o=o.withName("Event"),t.addChildNode(o)}),e.Filter!=null){let r=kE(e.Filter,n).withName("Filter");t.addChildNode(r)}return t},Kue=(e,n)=>e.filter(t=>t!=null).map(t=>$ue(t,n).withName("member")),Vue=(e,n)=>{let t=new f.XmlNode("LifecycleExpiration");if(e.Date!=null){let r=f.XmlNode.of("Date",(e.Date.toISOString().split(".")[0]+"Z").toString()).withName("Date");t.addChildNode(r)}if(e.Days!=null){let r=f.XmlNode.of("Days",String(e.Days)).withName("Days");t.addChildNode(r)}if(e.ExpiredObjectDeleteMarker!=null){let r=f.XmlNode.of("ExpiredObjectDeleteMarker",String(e.ExpiredObjectDeleteMarker)).withName("ExpiredObjectDeleteMarker");t.addChildNode(r)}return t},Xue=(e,n)=>{let t=new f.XmlNode("LifecycleRule");if(e.Expiration!=null){let r=Vue(e.Expiration,n).withName("Expiration");t.addChildNode(r)}if(e.ID!=null){let r=f.XmlNode.of("ID",e.ID).withName("ID");t.addChildNode(r)}if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}if(e.Filter!=null){let r=Yue(e.Filter,n).withName("Filter");t.addChildNode(r)}if(e.Status!=null){let r=f.XmlNode.of("ExpirationStatus",e.Status).withName("Status");t.addChildNode(r)}if(e.Transitions!=null&&Vme(e.Transitions,n).map(o=>{o=o.withName("Transition"),t.addChildNode(o)}),e.NoncurrentVersionTransitions!=null&&sme(e.NoncurrentVersionTransitions,n).map(o=>{o=o.withName("NoncurrentVersionTransition"),t.addChildNode(o)}),e.NoncurrentVersionExpiration!=null){let r=rme(e.NoncurrentVersionExpiration,n).withName("NoncurrentVersionExpiration");t.addChildNode(r)}if(e.AbortIncompleteMultipartUpload!=null){let r=sue(e.AbortIncompleteMultipartUpload,n).withName("AbortIncompleteMultipartUpload");t.addChildNode(r)}return t},Wue=(e,n)=>{let t=new f.XmlNode("LifecycleRuleAndOperator");if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}if(e.Tags!=null&&Ds(e.Tags,n).map(o=>{o=o.withName("Tag"),t.addChildNode(o)}),e.ObjectSizeGreaterThan!=null){let r=f.XmlNode.of("ObjectSizeGreaterThanBytes",String(e.ObjectSizeGreaterThan)).withName("ObjectSizeGreaterThan");t.addChildNode(r)}if(e.ObjectSizeLessThan!=null){let r=f.XmlNode.of("ObjectSizeLessThanBytes",String(e.ObjectSizeLessThan)).withName("ObjectSizeLessThan");t.addChildNode(r)}return t},Yue=(e,n)=>{let t=new f.XmlNode("LifecycleRuleFilter");return Tt.LifecycleRuleFilter.visit(e,{Prefix:r=>{let o=f.XmlNode.of("Prefix",r).withName("Prefix");t.addChildNode(o)},Tag:r=>{let o=Bs(r,n).withName("Tag");t.addChildNode(o)},ObjectSizeGreaterThan:r=>{let o=f.XmlNode.of("ObjectSizeGreaterThanBytes",String(r)).withName("ObjectSizeGreaterThan");t.addChildNode(o)},ObjectSizeLessThan:r=>{let o=f.XmlNode.of("ObjectSizeLessThanBytes",String(r)).withName("ObjectSizeLessThan");t.addChildNode(o)},And:r=>{let o=Wue(r,n).withName("And");t.addChildNode(o)},_:(r,o)=>{if(!(o instanceof f.XmlNode||o instanceof f.XmlText))throw new Error("Unable to serialize unknown union members in XML.");t.addChildNode(new f.XmlNode(r).addChildNode(o))}}),t},Que=(e,n)=>e.filter(t=>t!=null).map(t=>Xue(t,n).withName("member")),Jue=(e,n)=>{let t=new f.XmlNode("LoggingEnabled");if(e.TargetBucket!=null){let r=f.XmlNode.of("TargetBucket",e.TargetBucket).withName("TargetBucket");t.addChildNode(r)}if(e.TargetGrants!=null){let r=Ume(e.TargetGrants,n),o=new f.XmlNode("TargetGrants");r.map(s=>{o.addChildNode(s)}),t.addChildNode(o)}if(e.TargetPrefix!=null){let r=f.XmlNode.of("TargetPrefix",e.TargetPrefix).withName("TargetPrefix");t.addChildNode(r)}return t},Zue=(e,n)=>{let t=new f.XmlNode("MetadataEntry");if(e.Name!=null){let r=f.XmlNode.of("MetadataKey",e.Name).withName("Name");t.addChildNode(r)}if(e.Value!=null){let r=f.XmlNode.of("MetadataValue",e.Value).withName("Value");t.addChildNode(r)}return t},eme=(e,n)=>{let t=new f.XmlNode("Metrics");if(e.Status!=null){let r=f.XmlNode.of("MetricsStatus",e.Status).withName("Status");t.addChildNode(r)}if(e.EventThreshold!=null){let r=gj(e.EventThreshold,n).withName("EventThreshold");t.addChildNode(r)}return t},tme=(e,n)=>{let t=new f.XmlNode("MetricsAndOperator");if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}if(e.Tags!=null&&Ds(e.Tags,n).map(o=>{o=o.withName("Tag"),t.addChildNode(o)}),e.AccessPointArn!=null){let r=f.XmlNode.of("AccessPointArn",e.AccessPointArn).withName("AccessPointArn");t.addChildNode(r)}return t},JL=(e,n)=>{let t=new f.XmlNode("MetricsConfiguration");if(e.Id!=null){let r=f.XmlNode.of("MetricsId",e.Id).withName("Id");t.addChildNode(r)}if(e.Filter!=null){let r=nme(e.Filter,n).withName("Filter");t.addChildNode(r)}return t},nme=(e,n)=>{let t=new f.XmlNode("MetricsFilter");return Tt.MetricsFilter.visit(e,{Prefix:r=>{let o=f.XmlNode.of("Prefix",r).withName("Prefix");t.addChildNode(o)},Tag:r=>{let o=Bs(r,n).withName("Tag");t.addChildNode(o)},AccessPointArn:r=>{let o=f.XmlNode.of("AccessPointArn",r).withName("AccessPointArn");t.addChildNode(o)},And:r=>{let o=tme(r,n).withName("And");t.addChildNode(o)},_:(r,o)=>{if(!(o instanceof f.XmlNode||o instanceof f.XmlText))throw new Error("Unable to serialize unknown union members in XML.");t.addChildNode(new f.XmlNode(r).addChildNode(o))}}),t},rme=(e,n)=>{let t=new f.XmlNode("NoncurrentVersionExpiration");if(e.NoncurrentDays!=null){let r=f.XmlNode.of("Days",String(e.NoncurrentDays)).withName("NoncurrentDays");t.addChildNode(r)}if(e.NewerNoncurrentVersions!=null){let r=f.XmlNode.of("VersionCount",String(e.NewerNoncurrentVersions)).withName("NewerNoncurrentVersions");t.addChildNode(r)}return t},ome=(e,n)=>{let t=new f.XmlNode("NoncurrentVersionTransition");if(e.NoncurrentDays!=null){let r=f.XmlNode.of("Days",String(e.NoncurrentDays)).withName("NoncurrentDays");t.addChildNode(r)}if(e.StorageClass!=null){let r=f.XmlNode.of("TransitionStorageClass",e.StorageClass).withName("StorageClass");t.addChildNode(r)}if(e.NewerNoncurrentVersions!=null){let r=f.XmlNode.of("VersionCount",String(e.NewerNoncurrentVersions)).withName("NewerNoncurrentVersions");t.addChildNode(r)}return t},sme=(e,n)=>e.filter(t=>t!=null).map(t=>ome(t,n).withName("member")),ZL=(e,n)=>{let t=new f.XmlNode("NotificationConfiguration");if(e.TopicConfigurations!=null&&$me(e.TopicConfigurations,n).map(o=>{o=o.withName("TopicConfiguration"),t.addChildNode(o)}),e.QueueConfigurations!=null&&_me(e.QueueConfigurations,n).map(o=>{o=o.withName("QueueConfiguration"),t.addChildNode(o)}),e.LambdaFunctionConfigurations!=null&&Kue(e.LambdaFunctionConfigurations,n).map(o=>{o=o.withName("CloudFunctionConfiguration"),t.addChildNode(o)}),e.EventBridgeConfiguration!=null){let r=kue(e.EventBridgeConfiguration,n).withName("EventBridgeConfiguration");t.addChildNode(r)}return t},kE=(e,n)=>{let t=new f.XmlNode("NotificationConfigurationFilter");if(e.Key!=null){let r=kme(e.Key,n).withName("S3Key");t.addChildNode(r)}return t},ime=(e,n)=>{let t=new f.XmlNode("ObjectIdentifier");if(e.Key!=null){let r=f.XmlNode.of("ObjectKey",e.Key).withName("Key");t.addChildNode(r)}if(e.VersionId!=null){let r=f.XmlNode.of("ObjectVersionId",e.VersionId).withName("VersionId");t.addChildNode(r)}return t},ame=(e,n)=>e.filter(t=>t!=null).map(t=>ime(t,n).withName("member")),ej=(e,n)=>{let t=new f.XmlNode("ObjectLockConfiguration");if(e.ObjectLockEnabled!=null){let r=f.XmlNode.of("ObjectLockEnabled",e.ObjectLockEnabled).withName("ObjectLockEnabled");t.addChildNode(r)}if(e.Rule!=null){let r=cme(e.Rule,n).withName("Rule");t.addChildNode(r)}return t},tj=(e,n)=>{let t=new f.XmlNode("ObjectLockLegalHold");if(e.Status!=null){let r=f.XmlNode.of("ObjectLockLegalHoldStatus",e.Status).withName("Status");t.addChildNode(r)}return t},nj=(e,n)=>{let t=new f.XmlNode("ObjectLockRetention");if(e.Mode!=null){let r=f.XmlNode.of("ObjectLockRetentionMode",e.Mode).withName("Mode");t.addChildNode(r)}if(e.RetainUntilDate!=null){let r=f.XmlNode.of("Date",(e.RetainUntilDate.toISOString().split(".")[0]+"Z").toString()).withName("RetainUntilDate");t.addChildNode(r)}return t},cme=(e,n)=>{let t=new f.XmlNode("ObjectLockRule");if(e.DefaultRetention!=null){let r=Eue(e.DefaultRetention,n).withName("DefaultRetention");t.addChildNode(r)}return t},dme=(e,n)=>{let t=new f.XmlNode("OutputLocation");if(e.S3!=null){let r=Ame(e.S3,n).withName("S3");t.addChildNode(r)}return t},yj=(e,n)=>{let t=new f.XmlNode("OutputSerialization");if(e.CSV!=null){let r=Sue(e.CSV,n).withName("CSV");t.addChildNode(r)}if(e.JSON!=null){let r=Hue(e.JSON,n).withName("JSON");t.addChildNode(r)}return t},lme=(e,n)=>{let t=new f.XmlNode("Owner");if(e.DisplayName!=null){let r=f.XmlNode.of("DisplayName",e.DisplayName).withName("DisplayName");t.addChildNode(r)}if(e.ID!=null){let r=f.XmlNode.of("ID",e.ID).withName("ID");t.addChildNode(r)}return t},rj=(e,n)=>{let t=new f.XmlNode("OwnershipControls");return e.Rules!=null&&mme(e.Rules,n).map(o=>{o=o.withName("Rule"),t.addChildNode(o)}),t},ume=(e,n)=>{let t=new f.XmlNode("OwnershipControlsRule");if(e.ObjectOwnership!=null){let r=f.XmlNode.of("ObjectOwnership",e.ObjectOwnership).withName("ObjectOwnership");t.addChildNode(r)}return t},mme=(e,n)=>e.filter(t=>t!=null).map(t=>ume(t,n).withName("member")),pme=(e,n)=>new f.XmlNode("ParquetInput"),oj=(e,n)=>{let t=new f.XmlNode("PublicAccessBlockConfiguration");if(e.BlockPublicAcls!=null){let r=f.XmlNode.of("Setting",String(e.BlockPublicAcls)).withName("BlockPublicAcls");t.addChildNode(r)}if(e.IgnorePublicAcls!=null){let r=f.XmlNode.of("Setting",String(e.IgnorePublicAcls)).withName("IgnorePublicAcls");t.addChildNode(r)}if(e.BlockPublicPolicy!=null){let r=f.XmlNode.of("Setting",String(e.BlockPublicPolicy)).withName("BlockPublicPolicy");t.addChildNode(r)}if(e.RestrictPublicBuckets!=null){let r=f.XmlNode.of("Setting",String(e.RestrictPublicBuckets)).withName("RestrictPublicBuckets");t.addChildNode(r)}return t},fme=(e,n)=>{let t=new f.XmlNode("QueueConfiguration");if(e.Id!=null){let r=f.XmlNode.of("NotificationId",e.Id).withName("Id");t.addChildNode(r)}if(e.QueueArn!=null){let r=f.XmlNode.of("QueueArn",e.QueueArn).withName("Queue");t.addChildNode(r)}if(e.Events!=null&&wE(e.Events,n).map(o=>{o=o.withName("Event"),t.addChildNode(o)}),e.Filter!=null){let r=kE(e.Filter,n).withName("Filter");t.addChildNode(r)}return t},_me=(e,n)=>e.filter(t=>t!=null).map(t=>fme(t,n).withName("member")),yme=(e,n)=>{let t=new f.XmlNode("Redirect");if(e.HostName!=null){let r=f.XmlNode.of("HostName",e.HostName).withName("HostName");t.addChildNode(r)}if(e.HttpRedirectCode!=null){let r=f.XmlNode.of("HttpRedirectCode",e.HttpRedirectCode).withName("HttpRedirectCode");t.addChildNode(r)}if(e.Protocol!=null){let r=f.XmlNode.of("Protocol",e.Protocol).withName("Protocol");t.addChildNode(r)}if(e.ReplaceKeyPrefixWith!=null){let r=f.XmlNode.of("ReplaceKeyPrefixWith",e.ReplaceKeyPrefixWith).withName("ReplaceKeyPrefixWith");t.addChildNode(r)}if(e.ReplaceKeyWith!=null){let r=f.XmlNode.of("ReplaceKeyWith",e.ReplaceKeyWith).withName("ReplaceKeyWith");t.addChildNode(r)}return t},gme=(e,n)=>{let t=new f.XmlNode("RedirectAllRequestsTo");if(e.HostName!=null){let r=f.XmlNode.of("HostName",e.HostName).withName("HostName");t.addChildNode(r)}if(e.Protocol!=null){let r=f.XmlNode.of("Protocol",e.Protocol).withName("Protocol");t.addChildNode(r)}return t},hme=(e,n)=>{let t=new f.XmlNode("ReplicaModifications");if(e.Status!=null){let r=f.XmlNode.of("ReplicaModificationsStatus",e.Status).withName("Status");t.addChildNode(r)}return t},sj=(e,n)=>{let t=new f.XmlNode("ReplicationConfiguration");if(e.Role!=null){let r=f.XmlNode.of("Role",e.Role).withName("Role");t.addChildNode(r)}return e.Rules!=null&&bme(e.Rules,n).map(o=>{o=o.withName("Rule"),t.addChildNode(o)}),t},Cme=(e,n)=>{let t=new f.XmlNode("ReplicationRule");if(e.ID!=null){let r=f.XmlNode.of("ID",e.ID).withName("ID");t.addChildNode(r)}if(e.Priority!=null){let r=f.XmlNode.of("Priority",String(e.Priority)).withName("Priority");t.addChildNode(r)}if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}if(e.Filter!=null){let r=Eme(e.Filter,n).withName("Filter");t.addChildNode(r)}if(e.Status!=null){let r=f.XmlNode.of("ReplicationRuleStatus",e.Status).withName("Status");t.addChildNode(r)}if(e.SourceSelectionCriteria!=null){let r=qme(e.SourceSelectionCriteria,n).withName("SourceSelectionCriteria");t.addChildNode(r)}if(e.ExistingObjectReplication!=null){let r=Aue(e.ExistingObjectReplication,n).withName("ExistingObjectReplication");t.addChildNode(r)}if(e.Destination!=null){let r=Pue(e.Destination,n).withName("Destination");t.addChildNode(r)}if(e.DeleteMarkerReplication!=null){let r=bue(e.DeleteMarkerReplication,n).withName("DeleteMarkerReplication");t.addChildNode(r)}return t},Sme=(e,n)=>{let t=new f.XmlNode("ReplicationRuleAndOperator");if(e.Prefix!=null){let r=f.XmlNode.of("Prefix",e.Prefix).withName("Prefix");t.addChildNode(r)}return e.Tags!=null&&Ds(e.Tags,n).map(o=>{o=o.withName("Tag"),t.addChildNode(o)}),t},Eme=(e,n)=>{let t=new f.XmlNode("ReplicationRuleFilter");return Tt.ReplicationRuleFilter.visit(e,{Prefix:r=>{let o=f.XmlNode.of("Prefix",r).withName("Prefix");t.addChildNode(o)},Tag:r=>{let o=Bs(r,n).withName("Tag");t.addChildNode(o)},And:r=>{let o=Sme(r,n).withName("And");t.addChildNode(o)},_:(r,o)=>{if(!(o instanceof f.XmlNode||o instanceof f.XmlText))throw new Error("Unable to serialize unknown union members in XML.");t.addChildNode(new f.XmlNode(r).addChildNode(o))}}),t},bme=(e,n)=>e.filter(t=>t!=null).map(t=>Cme(t,n).withName("member")),Pme=(e,n)=>{let t=new f.XmlNode("ReplicationTime");if(e.Status!=null){let r=f.XmlNode.of("ReplicationTimeStatus",e.Status).withName("Status");t.addChildNode(r)}if(e.Time!=null){let r=gj(e.Time,n).withName("Time");t.addChildNode(r)}return t},gj=(e,n)=>{let t=new f.XmlNode("ReplicationTimeValue");if(e.Minutes!=null){let r=f.XmlNode.of("Minutes",String(e.Minutes)).withName("Minutes");t.addChildNode(r)}return t},ij=(e,n)=>{let t=new f.XmlNode("RequestPaymentConfiguration");if(e.Payer!=null){let r=f.XmlNode.of("Payer",e.Payer).withName("Payer");t.addChildNode(r)}return t},vme=(e,n)=>{let t=new f.XmlNode("RequestProgress");if(e.Enabled!=null){let r=f.XmlNode.of("EnableRequestProgress",String(e.Enabled)).withName("Enabled");t.addChildNode(r)}return t},aj=(e,n)=>{let t=new f.XmlNode("RestoreRequest");if(e.Days!=null){let r=f.XmlNode.of("Days",String(e.Days)).withName("Days");t.addChildNode(r)}if(e.GlacierJobParameters!=null){let r=Oue(e.GlacierJobParameters,n).withName("GlacierJobParameters");t.addChildNode(r)}if(e.Type!=null){let r=f.XmlNode.of("RestoreRequestType",e.Type).withName("Type");t.addChildNode(r)}if(e.Tier!=null){let r=f.XmlNode.of("Tier",e.Tier).withName("Tier");t.addChildNode(r)}if(e.Description!=null){let r=f.XmlNode.of("Description",e.Description).withName("Description");t.addChildNode(r)}if(e.SelectParameters!=null){let r=Rme(e.SelectParameters,n).withName("SelectParameters");t.addChildNode(r)}if(e.OutputLocation!=null){let r=dme(e.OutputLocation,n).withName("OutputLocation");t.addChildNode(r)}return t},xme=(e,n)=>{let t=new f.XmlNode("RoutingRule");if(e.Condition!=null){let r=yue(e.Condition,n).withName("Condition");t.addChildNode(r)}if(e.Redirect!=null){let r=yme(e.Redirect,n).withName("Redirect");t.addChildNode(r)}return t},wme=(e,n)=>e.filter(t=>t!=null).map(t=>xme(t,n).withName("RoutingRule")),kme=(e,n)=>{let t=new f.XmlNode("S3KeyFilter");return e.FilterRules!=null&&Nue(e.FilterRules,n).map(o=>{o=o.withName("FilterRule"),t.addChildNode(o)}),t},Ame=(e,n)=>{let t=new f.XmlNode("S3Location");if(e.BucketName!=null){let r=f.XmlNode.of("BucketName",e.BucketName).withName("BucketName");t.addChildNode(r)}if(e.Prefix!=null){let r=f.XmlNode.of("LocationPrefix",e.Prefix).withName("Prefix");t.addChildNode(r)}if(e.Encryption!=null){let r=vue(e.Encryption,n).withName("Encryption");t.addChildNode(r)}if(e.CannedACL!=null){let r=f.XmlNode.of("ObjectCannedACL",e.CannedACL).withName("CannedACL");t.addChildNode(r)}if(e.AccessControlList!=null){let r=fj(e.AccessControlList,n),o=new f.XmlNode("AccessControlList");r.map(s=>{o.addChildNode(s)}),t.addChildNode(o)}if(e.Tagging!=null){let r=sd(e.Tagging,n).withName("Tagging");t.addChildNode(r)}if(e.UserMetadata!=null){let r=Xme(e.UserMetadata,n),o=new f.XmlNode("UserMetadata");r.map(s=>{o.addChildNode(s)}),t.addChildNode(o)}if(e.StorageClass!=null){let r=f.XmlNode.of("StorageClass",e.StorageClass).withName("StorageClass");t.addChildNode(r)}return t},Ime=(e,n)=>{let t=new f.XmlNode("ScanRange");if(e.Start!=null){let r=f.XmlNode.of("Start",String(e.Start)).withName("Start");t.addChildNode(r)}if(e.End!=null){let r=f.XmlNode.of("End",String(e.End)).withName("End");t.addChildNode(r)}return t},Rme=(e,n)=>{let t=new f.XmlNode("SelectParameters");if(e.InputSerialization!=null){let r=_j(e.InputSerialization,n).withName("InputSerialization");t.addChildNode(r)}if(e.ExpressionType!=null){let r=f.XmlNode.of("ExpressionType",e.ExpressionType).withName("ExpressionType");t.addChildNode(r)}if(e.Expression!=null){let r=f.XmlNode.of("Expression",e.Expression).withName("Expression");t.addChildNode(r)}if(e.OutputSerialization!=null){let r=yj(e.OutputSerialization,n).withName("OutputSerialization");t.addChildNode(r)}return t},Nme=(e,n)=>{let t=new f.XmlNode("ServerSideEncryptionByDefault");if(e.SSEAlgorithm!=null){let r=f.XmlNode.of("ServerSideEncryption",e.SSEAlgorithm).withName("SSEAlgorithm");t.addChildNode(r)}if(e.KMSMasterKeyID!=null){let r=f.XmlNode.of("SSEKMSKeyId",e.KMSMasterKeyID).withName("KMSMasterKeyID");t.addChildNode(r)}return t},cj=(e,n)=>{let t=new f.XmlNode("ServerSideEncryptionConfiguration");return e.Rules!=null&&Tme(e.Rules,n).map(o=>{o=o.withName("Rule"),t.addChildNode(o)}),t},Ome=(e,n)=>{let t=new f.XmlNode("ServerSideEncryptionRule");if(e.ApplyServerSideEncryptionByDefault!=null){let r=Nme(e.ApplyServerSideEncryptionByDefault,n).withName("ApplyServerSideEncryptionByDefault");t.addChildNode(r)}if(e.BucketKeyEnabled!=null){let r=f.XmlNode.of("BucketKeyEnabled",String(e.BucketKeyEnabled)).withName("BucketKeyEnabled");t.addChildNode(r)}return t},Tme=(e,n)=>e.filter(t=>t!=null).map(t=>Ome(t,n).withName("member")),qme=(e,n)=>{let t=new f.XmlNode("SourceSelectionCriteria");if(e.SseKmsEncryptedObjects!=null){let r=Bme(e.SseKmsEncryptedObjects,n).withName("SseKmsEncryptedObjects");t.addChildNode(r)}if(e.ReplicaModifications!=null){let r=hme(e.ReplicaModifications,n).withName("ReplicaModifications");t.addChildNode(r)}return t},Mme=(e,n)=>{let t=new f.XmlNode("SSE-KMS");if(e.KeyId!=null){let r=f.XmlNode.of("SSEKMSKeyId",e.KeyId).withName("KeyId");t.addChildNode(r)}return t},Bme=(e,n)=>{let t=new f.XmlNode("SseKmsEncryptedObjects");if(e.Status!=null){let r=f.XmlNode.of("SseKmsEncryptedObjectsStatus",e.Status).withName("Status");t.addChildNode(r)}return t},Dme=(e,n)=>new f.XmlNode("SSE-S3"),Fme=(e,n)=>{let t=new f.XmlNode("StorageClassAnalysis");if(e.DataExport!=null){let r=Lme(e.DataExport,n).withName("DataExport");t.addChildNode(r)}return t},Lme=(e,n)=>{let t=new f.XmlNode("StorageClassAnalysisDataExport");if(e.OutputSchemaVersion!=null){let r=f.XmlNode.of("StorageClassAnalysisSchemaVersion",e.OutputSchemaVersion).withName("OutputSchemaVersion");t.addChildNode(r)}if(e.Destination!=null){let r=uue(e.Destination,n).withName("Destination");t.addChildNode(r)}return t},Bs=(e,n)=>{let t=new f.XmlNode("Tag");if(e.Key!=null){let r=f.XmlNode.of("ObjectKey",e.Key).withName("Key");t.addChildNode(r)}if(e.Value!=null){let r=f.XmlNode.of("Value",e.Value).withName("Value");t.addChildNode(r)}return t},sd=(e,n)=>{let t=new f.XmlNode("Tagging");if(e.TagSet!=null){let r=Ds(e.TagSet,n),o=new f.XmlNode("TagSet");r.map(s=>{o.addChildNode(s)}),t.addChildNode(o)}return t},Ds=(e,n)=>e.filter(t=>t!=null).map(t=>Bs(t,n).withName("Tag")),jme=(e,n)=>{let t=new f.XmlNode("TargetGrant");if(e.Grantee!=null){let r=pj(e.Grantee,n).withName("Grantee");r.addAttribute("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),t.addChildNode(r)}if(e.Permission!=null){let r=f.XmlNode.of("BucketLogsPermission",e.Permission).withName("Permission");t.addChildNode(r)}return t},Ume=(e,n)=>e.filter(t=>t!=null).map(t=>jme(t,n).withName("Grant")),zme=(e,n)=>{let t=new f.XmlNode("Tiering");if(e.Days!=null){let r=f.XmlNode.of("IntelligentTieringDays",String(e.Days)).withName("Days");t.addChildNode(r)}if(e.AccessTier!=null){let r=f.XmlNode.of("IntelligentTieringAccessTier",e.AccessTier).withName("AccessTier");t.addChildNode(r)}return t},Gme=(e,n)=>e.filter(t=>t!=null).map(t=>zme(t,n).withName("member")),Hme=(e,n)=>{let t=new f.XmlNode("TopicConfiguration");if(e.Id!=null){let r=f.XmlNode.of("NotificationId",e.Id).withName("Id");t.addChildNode(r)}if(e.TopicArn!=null){let r=f.XmlNode.of("TopicArn",e.TopicArn).withName("Topic");t.addChildNode(r)}if(e.Events!=null&&wE(e.Events,n).map(o=>{o=o.withName("Event"),t.addChildNode(o)}),e.Filter!=null){let r=kE(e.Filter,n).withName("Filter");t.addChildNode(r)}return t},$me=(e,n)=>e.filter(t=>t!=null).map(t=>Hme(t,n).withName("member")),Kme=(e,n)=>{let t=new f.XmlNode("Transition");if(e.Date!=null){let r=f.XmlNode.of("Date",(e.Date.toISOString().split(".")[0]+"Z").toString()).withName("Date");t.addChildNode(r)}if(e.Days!=null){let r=f.XmlNode.of("Days",String(e.Days)).withName("Days");t.addChildNode(r)}if(e.StorageClass!=null){let r=f.XmlNode.of("TransitionStorageClass",e.StorageClass).withName("StorageClass");t.addChildNode(r)}return t},Vme=(e,n)=>e.filter(t=>t!=null).map(t=>Kme(t,n).withName("member")),Xme=(e,n)=>e.filter(t=>t!=null).map(t=>Zue(t,n).withName("MetadataEntry")),dj=(e,n)=>{let t=new f.XmlNode("VersioningConfiguration");if(e.MFADelete!=null){let r=f.XmlNode.of("MFADelete",e.MFADelete).withName("MfaDelete");t.addChildNode(r)}if(e.Status!=null){let r=f.XmlNode.of("BucketVersioningStatus",e.Status).withName("Status");t.addChildNode(r)}return t},lj=(e,n)=>{let t=new f.XmlNode("WebsiteConfiguration");if(e.ErrorDocument!=null){let r=wue(e.ErrorDocument,n).withName("ErrorDocument");t.addChildNode(r)}if(e.IndexDocument!=null){let r=que(e.IndexDocument,n).withName("IndexDocument");t.addChildNode(r)}if(e.RedirectAllRequestsTo!=null){let r=gme(e.RedirectAllRequestsTo,n).withName("RedirectAllRequestsTo");t.addChildNode(r)}if(e.RoutingRules!=null){let r=wme(e.RoutingRules,n),o=new f.XmlNode("RoutingRules");r.map(s=>{o.addChildNode(s)}),t.addChildNode(o)}return t},Wme=(e,n)=>{let t={};return e.DaysAfterInitiation!==void 0&&(t.DaysAfterInitiation=(0,d.strictParseInt32)(e.DaysAfterInitiation)),t},Yme=(e,n)=>{let t={};return e.Owner!==void 0&&(t.Owner=(0,d.expectString)(e.Owner)),t},Qme=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>(0,d.expectString)(t)),Jme=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>(0,d.expectString)(t)),Zme=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>(0,d.expectString)(t)),epe=(e,n)=>{let t={};return e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),e.Tag===""?t.Tags=[]:e.Tag!==void 0&&(t.Tags=po((0,d.getArrayIfSingleItem)(e.Tag),n)),t},hj=(e,n)=>{let t={};return e.Id!==void 0&&(t.Id=(0,d.expectString)(e.Id)),e.Filter===""||e.Filter!==void 0&&(t.Filter=rpe((0,d.expectUnion)(e.Filter),n)),e.StorageClassAnalysis!==void 0&&(t.StorageClassAnalysis=Xfe(e.StorageClassAnalysis,n)),t},tpe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>hj(t,n)),npe=(e,n)=>{let t={};return e.S3BucketDestination!==void 0&&(t.S3BucketDestination=ope(e.S3BucketDestination,n)),t},rpe=(e,n)=>e.Prefix!==void 0?{Prefix:(0,d.expectString)(e.Prefix)}:e.Tag!==void 0?{Tag:Fs(e.Tag,n)}:e.And!==void 0?{And:epe(e.And,n)}:{$unknown:Object.entries(e)[0]},ope=(e,n)=>{let t={};return e.Format!==void 0&&(t.Format=(0,d.expectString)(e.Format)),e.BucketAccountId!==void 0&&(t.BucketAccountId=(0,d.expectString)(e.BucketAccountId)),e.Bucket!==void 0&&(t.Bucket=(0,d.expectString)(e.Bucket)),e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),t},spe=(e,n)=>{let t={};return e.Name!==void 0&&(t.Name=(0,d.expectString)(e.Name)),e.CreationDate!==void 0&&(t.CreationDate=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.CreationDate))),t},ipe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>spe(t,n)),ape=(e,n)=>{let t={};return e.ChecksumCRC32!==void 0&&(t.ChecksumCRC32=(0,d.expectString)(e.ChecksumCRC32)),e.ChecksumCRC32C!==void 0&&(t.ChecksumCRC32C=(0,d.expectString)(e.ChecksumCRC32C)),e.ChecksumSHA1!==void 0&&(t.ChecksumSHA1=(0,d.expectString)(e.ChecksumSHA1)),e.ChecksumSHA256!==void 0&&(t.ChecksumSHA256=(0,d.expectString)(e.ChecksumSHA256)),t},Cj=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>(0,d.expectString)(t)),cpe=(e,n)=>{let t={};return e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),t},S_=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>cpe(t,n)),dpe=(e,n)=>{let t={};return e.HttpErrorCodeReturnedEquals!==void 0&&(t.HttpErrorCodeReturnedEquals=(0,d.expectString)(e.HttpErrorCodeReturnedEquals)),e.KeyPrefixEquals!==void 0&&(t.KeyPrefixEquals=(0,d.expectString)(e.KeyPrefixEquals)),t},lpe=(e,n)=>({}),upe=(e,n)=>{let t={};return e.ETag!==void 0&&(t.ETag=(0,d.expectString)(e.ETag)),e.LastModified!==void 0&&(t.LastModified=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.LastModified))),e.ChecksumCRC32!==void 0&&(t.ChecksumCRC32=(0,d.expectString)(e.ChecksumCRC32)),e.ChecksumCRC32C!==void 0&&(t.ChecksumCRC32C=(0,d.expectString)(e.ChecksumCRC32C)),e.ChecksumSHA1!==void 0&&(t.ChecksumSHA1=(0,d.expectString)(e.ChecksumSHA1)),e.ChecksumSHA256!==void 0&&(t.ChecksumSHA256=(0,d.expectString)(e.ChecksumSHA256)),t},mpe=(e,n)=>{let t={};return e.ETag!==void 0&&(t.ETag=(0,d.expectString)(e.ETag)),e.LastModified!==void 0&&(t.LastModified=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.LastModified))),e.ChecksumCRC32!==void 0&&(t.ChecksumCRC32=(0,d.expectString)(e.ChecksumCRC32)),e.ChecksumCRC32C!==void 0&&(t.ChecksumCRC32C=(0,d.expectString)(e.ChecksumCRC32C)),e.ChecksumSHA1!==void 0&&(t.ChecksumSHA1=(0,d.expectString)(e.ChecksumSHA1)),e.ChecksumSHA256!==void 0&&(t.ChecksumSHA256=(0,d.expectString)(e.ChecksumSHA256)),t},ppe=(e,n)=>{let t={};return e.ID!==void 0&&(t.ID=(0,d.expectString)(e.ID)),e.AllowedHeader===""?t.AllowedHeaders=[]:e.AllowedHeader!==void 0&&(t.AllowedHeaders=Qme((0,d.getArrayIfSingleItem)(e.AllowedHeader),n)),e.AllowedMethod===""?t.AllowedMethods=[]:e.AllowedMethod!==void 0&&(t.AllowedMethods=Jme((0,d.getArrayIfSingleItem)(e.AllowedMethod),n)),e.AllowedOrigin===""?t.AllowedOrigins=[]:e.AllowedOrigin!==void 0&&(t.AllowedOrigins=Zme((0,d.getArrayIfSingleItem)(e.AllowedOrigin),n)),e.ExposeHeader===""?t.ExposeHeaders=[]:e.ExposeHeader!==void 0&&(t.ExposeHeaders=Ipe((0,d.getArrayIfSingleItem)(e.ExposeHeader),n)),e.MaxAgeSeconds!==void 0&&(t.MaxAgeSeconds=(0,d.strictParseInt32)(e.MaxAgeSeconds)),t},fpe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>ppe(t,n)),_pe=(e,n)=>{let t={};return e.Mode!==void 0&&(t.Mode=(0,d.expectString)(e.Mode)),e.Days!==void 0&&(t.Days=(0,d.strictParseInt32)(e.Days)),e.Years!==void 0&&(t.Years=(0,d.strictParseInt32)(e.Years)),t},ype=(e,n)=>{let t={};return e.Key!==void 0&&(t.Key=(0,d.expectString)(e.Key)),e.VersionId!==void 0&&(t.VersionId=(0,d.expectString)(e.VersionId)),e.DeleteMarker!==void 0&&(t.DeleteMarker=(0,d.parseBoolean)(e.DeleteMarker)),e.DeleteMarkerVersionId!==void 0&&(t.DeleteMarkerVersionId=(0,d.expectString)(e.DeleteMarkerVersionId)),t},gpe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>ype(t,n)),hpe=(e,n)=>{let t={};return e.Owner!==void 0&&(t.Owner=Br(e.Owner,n)),e.Key!==void 0&&(t.Key=(0,d.expectString)(e.Key)),e.VersionId!==void 0&&(t.VersionId=(0,d.expectString)(e.VersionId)),e.IsLatest!==void 0&&(t.IsLatest=(0,d.parseBoolean)(e.IsLatest)),e.LastModified!==void 0&&(t.LastModified=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.LastModified))),t},Cpe=(e,n)=>{let t={};return e.Status!==void 0&&(t.Status=(0,d.expectString)(e.Status)),t},Spe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>hpe(t,n)),Epe=(e,n)=>{let t={};return e.Bucket!==void 0&&(t.Bucket=(0,d.expectString)(e.Bucket)),e.Account!==void 0&&(t.Account=(0,d.expectString)(e.Account)),e.StorageClass!==void 0&&(t.StorageClass=(0,d.expectString)(e.StorageClass)),e.AccessControlTranslation!==void 0&&(t.AccessControlTranslation=Yme(e.AccessControlTranslation,n)),e.EncryptionConfiguration!==void 0&&(t.EncryptionConfiguration=bpe(e.EncryptionConfiguration,n)),e.ReplicationTime!==void 0&&(t.ReplicationTime=Mfe(e.ReplicationTime,n)),e.Metrics!==void 0&&(t.Metrics=Zpe(e.Metrics,n)),t},bpe=(e,n)=>{let t={};return e.ReplicaKmsKeyID!==void 0&&(t.ReplicaKmsKeyID=(0,d.expectString)(e.ReplicaKmsKeyID)),t},Ppe=(e,n)=>({}),vpe=(e,n)=>{let t={};return e.Key!==void 0&&(t.Key=(0,d.expectString)(e.Key)),e.VersionId!==void 0&&(t.VersionId=(0,d.expectString)(e.VersionId)),e.Code!==void 0&&(t.Code=(0,d.expectString)(e.Code)),e.Message!==void 0&&(t.Message=(0,d.expectString)(e.Message)),t},xpe=(e,n)=>{let t={};return e.Key!==void 0&&(t.Key=(0,d.expectString)(e.Key)),t},wpe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>vpe(t,n)),kpe=(e,n)=>({}),AE=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>(0,d.expectString)(t)),Ape=(e,n)=>{let t={};return e.Status!==void 0&&(t.Status=(0,d.expectString)(e.Status)),t},Ipe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>(0,d.expectString)(t)),Rpe=(e,n)=>{let t={};return e.Name!==void 0&&(t.Name=(0,d.expectString)(e.Name)),e.Value!==void 0&&(t.Value=(0,d.expectString)(e.Value)),t},Npe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Rpe(t,n)),Ope=(e,n)=>{let t={};return e.PartsCount!==void 0&&(t.TotalPartsCount=(0,d.strictParseInt32)(e.PartsCount)),e.PartNumberMarker!==void 0&&(t.PartNumberMarker=(0,d.expectString)(e.PartNumberMarker)),e.NextPartNumberMarker!==void 0&&(t.NextPartNumberMarker=(0,d.expectString)(e.NextPartNumberMarker)),e.MaxParts!==void 0&&(t.MaxParts=(0,d.strictParseInt32)(e.MaxParts)),e.IsTruncated!==void 0&&(t.IsTruncated=(0,d.parseBoolean)(e.IsTruncated)),e.Part===""?t.Parts=[]:e.Part!==void 0&&(t.Parts=Efe((0,d.getArrayIfSingleItem)(e.Part),n)),t},Tpe=(e,n)=>{let t={};return e.Grantee!==void 0&&(t.Grantee=Sj(e.Grantee,n)),e.Permission!==void 0&&(t.Permission=(0,d.expectString)(e.Permission)),t},Sj=(e,n)=>{let t={};return e.DisplayName!==void 0&&(t.DisplayName=(0,d.expectString)(e.DisplayName)),e.EmailAddress!==void 0&&(t.EmailAddress=(0,d.expectString)(e.EmailAddress)),e.ID!==void 0&&(t.ID=(0,d.expectString)(e.ID)),e.URI!==void 0&&(t.URI=(0,d.expectString)(e.URI)),e["xsi:type"]!==void 0&&(t.Type=(0,d.expectString)(e["xsi:type"])),t},Ej=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Tpe(t,n)),qpe=(e,n)=>{let t={};return e.Suffix!==void 0&&(t.Suffix=(0,d.expectString)(e.Suffix)),t},bj=(e,n)=>{let t={};return e.ID!==void 0&&(t.ID=(0,d.expectString)(e.ID)),e.DisplayName!==void 0&&(t.DisplayName=(0,d.expectString)(e.DisplayName)),t},Mpe=(e,n)=>{let t={};return e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),e.Tag===""?t.Tags=[]:e.Tag!==void 0&&(t.Tags=po((0,d.getArrayIfSingleItem)(e.Tag),n)),t},Pj=(e,n)=>{let t={};return e.Id!==void 0&&(t.Id=(0,d.expectString)(e.Id)),e.Filter!==void 0&&(t.Filter=Dpe(e.Filter,n)),e.Status!==void 0&&(t.Status=(0,d.expectString)(e.Status)),e.Tiering===""?t.Tierings=[]:e.Tiering!==void 0&&(t.Tierings=Zfe((0,d.getArrayIfSingleItem)(e.Tiering),n)),t},Bpe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Pj(t,n)),Dpe=(e,n)=>{let t={};return e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),e.Tag!==void 0&&(t.Tag=Fs(e.Tag,n)),e.And!==void 0&&(t.And=Mpe(e.And,n)),t},vj=(e,n)=>{let t={};return e.Destination!==void 0&&(t.Destination=Lpe(e.Destination,n)),e.IsEnabled!==void 0&&(t.IsEnabled=(0,d.parseBoolean)(e.IsEnabled)),e.Filter!==void 0&&(t.Filter=Upe(e.Filter,n)),e.Id!==void 0&&(t.Id=(0,d.expectString)(e.Id)),e.IncludedObjectVersions!==void 0&&(t.IncludedObjectVersions=(0,d.expectString)(e.IncludedObjectVersions)),e.OptionalFields===""?t.OptionalFields=[]:e.OptionalFields!==void 0&&e.OptionalFields.Field!==void 0&&(t.OptionalFields=zpe((0,d.getArrayIfSingleItem)(e.OptionalFields.Field),n)),e.Schedule!==void 0&&(t.Schedule=Hpe(e.Schedule,n)),t},Fpe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>vj(t,n)),Lpe=(e,n)=>{let t={};return e.S3BucketDestination!==void 0&&(t.S3BucketDestination=Gpe(e.S3BucketDestination,n)),t},jpe=(e,n)=>{let t={};return e["SSE-S3"]!==void 0&&(t.SSES3=Kfe(e["SSE-S3"],n)),e["SSE-KMS"]!==void 0&&(t.SSEKMS=Hfe(e["SSE-KMS"],n)),t},Upe=(e,n)=>{let t={};return e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),t},zpe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>(0,d.expectString)(t)),Gpe=(e,n)=>{let t={};return e.AccountId!==void 0&&(t.AccountId=(0,d.expectString)(e.AccountId)),e.Bucket!==void 0&&(t.Bucket=(0,d.expectString)(e.Bucket)),e.Format!==void 0&&(t.Format=(0,d.expectString)(e.Format)),e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),e.Encryption!==void 0&&(t.Encryption=jpe(e.Encryption,n)),t},Hpe=(e,n)=>{let t={};return e.Frequency!==void 0&&(t.Frequency=(0,d.expectString)(e.Frequency)),t},$pe=(e,n)=>{let t={};return e.Id!==void 0&&(t.Id=(0,d.expectString)(e.Id)),e.CloudFunction!==void 0&&(t.LambdaFunctionArn=(0,d.expectString)(e.CloudFunction)),e.Event===""?t.Events=[]:e.Event!==void 0&&(t.Events=AE((0,d.getArrayIfSingleItem)(e.Event),n)),e.Filter!==void 0&&(t.Filter=IE(e.Filter,n)),t},Kpe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>$pe(t,n)),Vpe=(e,n)=>{let t={};return e.Date!==void 0&&(t.Date=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.Date))),e.Days!==void 0&&(t.Days=(0,d.strictParseInt32)(e.Days)),e.ExpiredObjectDeleteMarker!==void 0&&(t.ExpiredObjectDeleteMarker=(0,d.parseBoolean)(e.ExpiredObjectDeleteMarker)),t},Xpe=(e,n)=>{let t={};return e.Expiration!==void 0&&(t.Expiration=Vpe(e.Expiration,n)),e.ID!==void 0&&(t.ID=(0,d.expectString)(e.ID)),e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),e.Filter===""||e.Filter!==void 0&&(t.Filter=Ype((0,d.expectUnion)(e.Filter),n)),e.Status!==void 0&&(t.Status=(0,d.expectString)(e.Status)),e.Transition===""?t.Transitions=[]:e.Transition!==void 0&&(t.Transitions=r_e((0,d.getArrayIfSingleItem)(e.Transition),n)),e.NoncurrentVersionTransition===""?t.NoncurrentVersionTransitions=[]:e.NoncurrentVersionTransition!==void 0&&(t.NoncurrentVersionTransitions=afe((0,d.getArrayIfSingleItem)(e.NoncurrentVersionTransition),n)),e.NoncurrentVersionExpiration!==void 0&&(t.NoncurrentVersionExpiration=sfe(e.NoncurrentVersionExpiration,n)),e.AbortIncompleteMultipartUpload!==void 0&&(t.AbortIncompleteMultipartUpload=Wme(e.AbortIncompleteMultipartUpload,n)),t},Wpe=(e,n)=>{let t={};return e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),e.Tag===""?t.Tags=[]:e.Tag!==void 0&&(t.Tags=po((0,d.getArrayIfSingleItem)(e.Tag),n)),e.ObjectSizeGreaterThan!==void 0&&(t.ObjectSizeGreaterThan=(0,d.strictParseLong)(e.ObjectSizeGreaterThan)),e.ObjectSizeLessThan!==void 0&&(t.ObjectSizeLessThan=(0,d.strictParseLong)(e.ObjectSizeLessThan)),t},Ype=(e,n)=>e.Prefix!==void 0?{Prefix:(0,d.expectString)(e.Prefix)}:e.Tag!==void 0?{Tag:Fs(e.Tag,n)}:e.ObjectSizeGreaterThan!==void 0?{ObjectSizeGreaterThan:(0,d.strictParseLong)(e.ObjectSizeGreaterThan)}:e.ObjectSizeLessThan!==void 0?{ObjectSizeLessThan:(0,d.strictParseLong)(e.ObjectSizeLessThan)}:e.And!==void 0?{And:Wpe(e.And,n)}:{$unknown:Object.entries(e)[0]},Qpe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Xpe(t,n)),Jpe=(e,n)=>{let t={};return e.TargetBucket!==void 0&&(t.TargetBucket=(0,d.expectString)(e.TargetBucket)),e.TargetGrants===""?t.TargetGrants=[]:e.TargetGrants!==void 0&&e.TargetGrants.Grant!==void 0&&(t.TargetGrants=Qfe((0,d.getArrayIfSingleItem)(e.TargetGrants.Grant),n)),e.TargetPrefix!==void 0&&(t.TargetPrefix=(0,d.expectString)(e.TargetPrefix)),t},Zpe=(e,n)=>{let t={};return e.Status!==void 0&&(t.Status=(0,d.expectString)(e.Status)),e.EventThreshold!==void 0&&(t.EventThreshold=kj(e.EventThreshold,n)),t},efe=(e,n)=>{let t={};return e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),e.Tag===""?t.Tags=[]:e.Tag!==void 0&&(t.Tags=po((0,d.getArrayIfSingleItem)(e.Tag),n)),e.AccessPointArn!==void 0&&(t.AccessPointArn=(0,d.expectString)(e.AccessPointArn)),t},xj=(e,n)=>{let t={};return e.Id!==void 0&&(t.Id=(0,d.expectString)(e.Id)),e.Filter===""||e.Filter!==void 0&&(t.Filter=nfe((0,d.expectUnion)(e.Filter),n)),t},tfe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>xj(t,n)),nfe=(e,n)=>e.Prefix!==void 0?{Prefix:(0,d.expectString)(e.Prefix)}:e.Tag!==void 0?{Tag:Fs(e.Tag,n)}:e.AccessPointArn!==void 0?{AccessPointArn:(0,d.expectString)(e.AccessPointArn)}:e.And!==void 0?{And:efe(e.And,n)}:{$unknown:Object.entries(e)[0]},rfe=(e,n)=>{let t={};return e.UploadId!==void 0&&(t.UploadId=(0,d.expectString)(e.UploadId)),e.Key!==void 0&&(t.Key=(0,d.expectString)(e.Key)),e.Initiated!==void 0&&(t.Initiated=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.Initiated))),e.StorageClass!==void 0&&(t.StorageClass=(0,d.expectString)(e.StorageClass)),e.Owner!==void 0&&(t.Owner=Br(e.Owner,n)),e.Initiator!==void 0&&(t.Initiator=bj(e.Initiator,n)),e.ChecksumAlgorithm!==void 0&&(t.ChecksumAlgorithm=(0,d.expectString)(e.ChecksumAlgorithm)),t},ofe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>rfe(t,n)),sfe=(e,n)=>{let t={};return e.NoncurrentDays!==void 0&&(t.NoncurrentDays=(0,d.strictParseInt32)(e.NoncurrentDays)),e.NewerNoncurrentVersions!==void 0&&(t.NewerNoncurrentVersions=(0,d.strictParseInt32)(e.NewerNoncurrentVersions)),t},ife=(e,n)=>{let t={};return e.NoncurrentDays!==void 0&&(t.NoncurrentDays=(0,d.strictParseInt32)(e.NoncurrentDays)),e.StorageClass!==void 0&&(t.StorageClass=(0,d.expectString)(e.StorageClass)),e.NewerNoncurrentVersions!==void 0&&(t.NewerNoncurrentVersions=(0,d.strictParseInt32)(e.NewerNoncurrentVersions)),t},afe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>ife(t,n)),IE=(e,n)=>{let t={};return e.S3Key!==void 0&&(t.Key=Ffe(e.S3Key,n)),t},cfe=(e,n)=>{let t={};return e.Key!==void 0&&(t.Key=(0,d.expectString)(e.Key)),e.LastModified!==void 0&&(t.LastModified=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.LastModified))),e.ETag!==void 0&&(t.ETag=(0,d.expectString)(e.ETag)),e.ChecksumAlgorithm===""?t.ChecksumAlgorithm=[]:e.ChecksumAlgorithm!==void 0&&(t.ChecksumAlgorithm=Cj((0,d.getArrayIfSingleItem)(e.ChecksumAlgorithm),n)),e.Size!==void 0&&(t.Size=(0,d.strictParseLong)(e.Size)),e.StorageClass!==void 0&&(t.StorageClass=(0,d.expectString)(e.StorageClass)),e.Owner!==void 0&&(t.Owner=Br(e.Owner,n)),e.RestoreStatus!==void 0&&(t.RestoreStatus=Aj(e.RestoreStatus,n)),t},wj=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>cfe(t,n)),dfe=(e,n)=>{let t={};return e.ObjectLockEnabled!==void 0&&(t.ObjectLockEnabled=(0,d.expectString)(e.ObjectLockEnabled)),e.Rule!==void 0&&(t.Rule=mfe(e.Rule,n)),t},lfe=(e,n)=>{let t={};return e.Status!==void 0&&(t.Status=(0,d.expectString)(e.Status)),t},ufe=(e,n)=>{let t={};return e.Mode!==void 0&&(t.Mode=(0,d.expectString)(e.Mode)),e.RetainUntilDate!==void 0&&(t.RetainUntilDate=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.RetainUntilDate))),t},mfe=(e,n)=>{let t={};return e.DefaultRetention!==void 0&&(t.DefaultRetention=_pe(e.DefaultRetention,n)),t},pfe=(e,n)=>{let t={};return e.PartNumber!==void 0&&(t.PartNumber=(0,d.strictParseInt32)(e.PartNumber)),e.Size!==void 0&&(t.Size=(0,d.strictParseLong)(e.Size)),e.ChecksumCRC32!==void 0&&(t.ChecksumCRC32=(0,d.expectString)(e.ChecksumCRC32)),e.ChecksumCRC32C!==void 0&&(t.ChecksumCRC32C=(0,d.expectString)(e.ChecksumCRC32C)),e.ChecksumSHA1!==void 0&&(t.ChecksumSHA1=(0,d.expectString)(e.ChecksumSHA1)),e.ChecksumSHA256!==void 0&&(t.ChecksumSHA256=(0,d.expectString)(e.ChecksumSHA256)),t},ffe=(e,n)=>{let t={};return e.ETag!==void 0&&(t.ETag=(0,d.expectString)(e.ETag)),e.ChecksumAlgorithm===""?t.ChecksumAlgorithm=[]:e.ChecksumAlgorithm!==void 0&&(t.ChecksumAlgorithm=Cj((0,d.getArrayIfSingleItem)(e.ChecksumAlgorithm),n)),e.Size!==void 0&&(t.Size=(0,d.strictParseLong)(e.Size)),e.StorageClass!==void 0&&(t.StorageClass=(0,d.expectString)(e.StorageClass)),e.Key!==void 0&&(t.Key=(0,d.expectString)(e.Key)),e.VersionId!==void 0&&(t.VersionId=(0,d.expectString)(e.VersionId)),e.IsLatest!==void 0&&(t.IsLatest=(0,d.parseBoolean)(e.IsLatest)),e.LastModified!==void 0&&(t.LastModified=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.LastModified))),e.Owner!==void 0&&(t.Owner=Br(e.Owner,n)),e.RestoreStatus!==void 0&&(t.RestoreStatus=Aj(e.RestoreStatus,n)),t},_fe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>ffe(t,n)),Br=(e,n)=>{let t={};return e.DisplayName!==void 0&&(t.DisplayName=(0,d.expectString)(e.DisplayName)),e.ID!==void 0&&(t.ID=(0,d.expectString)(e.ID)),t},yfe=(e,n)=>{let t={};return e.Rule===""?t.Rules=[]:e.Rule!==void 0&&(t.Rules=hfe((0,d.getArrayIfSingleItem)(e.Rule),n)),t},gfe=(e,n)=>{let t={};return e.ObjectOwnership!==void 0&&(t.ObjectOwnership=(0,d.expectString)(e.ObjectOwnership)),t},hfe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>gfe(t,n)),Cfe=(e,n)=>{let t={};return e.PartNumber!==void 0&&(t.PartNumber=(0,d.strictParseInt32)(e.PartNumber)),e.LastModified!==void 0&&(t.LastModified=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.LastModified))),e.ETag!==void 0&&(t.ETag=(0,d.expectString)(e.ETag)),e.Size!==void 0&&(t.Size=(0,d.strictParseLong)(e.Size)),e.ChecksumCRC32!==void 0&&(t.ChecksumCRC32=(0,d.expectString)(e.ChecksumCRC32)),e.ChecksumCRC32C!==void 0&&(t.ChecksumCRC32C=(0,d.expectString)(e.ChecksumCRC32C)),e.ChecksumSHA1!==void 0&&(t.ChecksumSHA1=(0,d.expectString)(e.ChecksumSHA1)),e.ChecksumSHA256!==void 0&&(t.ChecksumSHA256=(0,d.expectString)(e.ChecksumSHA256)),t},Sfe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Cfe(t,n)),Efe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>pfe(t,n)),bfe=(e,n)=>{let t={};return e.IsPublic!==void 0&&(t.IsPublic=(0,d.parseBoolean)(e.IsPublic)),t},Pfe=(e,n)=>{let t={};return e.BytesScanned!==void 0&&(t.BytesScanned=(0,d.strictParseLong)(e.BytesScanned)),e.BytesProcessed!==void 0&&(t.BytesProcessed=(0,d.strictParseLong)(e.BytesProcessed)),e.BytesReturned!==void 0&&(t.BytesReturned=(0,d.strictParseLong)(e.BytesReturned)),t},vfe=(e,n)=>{let t={};return e.BlockPublicAcls!==void 0&&(t.BlockPublicAcls=(0,d.parseBoolean)(e.BlockPublicAcls)),e.IgnorePublicAcls!==void 0&&(t.IgnorePublicAcls=(0,d.parseBoolean)(e.IgnorePublicAcls)),e.BlockPublicPolicy!==void 0&&(t.BlockPublicPolicy=(0,d.parseBoolean)(e.BlockPublicPolicy)),e.RestrictPublicBuckets!==void 0&&(t.RestrictPublicBuckets=(0,d.parseBoolean)(e.RestrictPublicBuckets)),t},xfe=(e,n)=>{let t={};return e.Id!==void 0&&(t.Id=(0,d.expectString)(e.Id)),e.Queue!==void 0&&(t.QueueArn=(0,d.expectString)(e.Queue)),e.Event===""?t.Events=[]:e.Event!==void 0&&(t.Events=AE((0,d.getArrayIfSingleItem)(e.Event),n)),e.Filter!==void 0&&(t.Filter=IE(e.Filter,n)),t},wfe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>xfe(t,n)),kfe=(e,n)=>{let t={};return e.HostName!==void 0&&(t.HostName=(0,d.expectString)(e.HostName)),e.HttpRedirectCode!==void 0&&(t.HttpRedirectCode=(0,d.expectString)(e.HttpRedirectCode)),e.Protocol!==void 0&&(t.Protocol=(0,d.expectString)(e.Protocol)),e.ReplaceKeyPrefixWith!==void 0&&(t.ReplaceKeyPrefixWith=(0,d.expectString)(e.ReplaceKeyPrefixWith)),e.ReplaceKeyWith!==void 0&&(t.ReplaceKeyWith=(0,d.expectString)(e.ReplaceKeyWith)),t},Afe=(e,n)=>{let t={};return e.HostName!==void 0&&(t.HostName=(0,d.expectString)(e.HostName)),e.Protocol!==void 0&&(t.Protocol=(0,d.expectString)(e.Protocol)),t},Ife=(e,n)=>{let t={};return e.Status!==void 0&&(t.Status=(0,d.expectString)(e.Status)),t},Rfe=(e,n)=>{let t={};return e.Role!==void 0&&(t.Role=(0,d.expectString)(e.Role)),e.Rule===""?t.Rules=[]:e.Rule!==void 0&&(t.Rules=qfe((0,d.getArrayIfSingleItem)(e.Rule),n)),t},Nfe=(e,n)=>{let t={};return e.ID!==void 0&&(t.ID=(0,d.expectString)(e.ID)),e.Priority!==void 0&&(t.Priority=(0,d.strictParseInt32)(e.Priority)),e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),e.Filter===""||e.Filter!==void 0&&(t.Filter=Tfe((0,d.expectUnion)(e.Filter),n)),e.Status!==void 0&&(t.Status=(0,d.expectString)(e.Status)),e.SourceSelectionCriteria!==void 0&&(t.SourceSelectionCriteria=Gfe(e.SourceSelectionCriteria,n)),e.ExistingObjectReplication!==void 0&&(t.ExistingObjectReplication=Ape(e.ExistingObjectReplication,n)),e.Destination!==void 0&&(t.Destination=Epe(e.Destination,n)),e.DeleteMarkerReplication!==void 0&&(t.DeleteMarkerReplication=Cpe(e.DeleteMarkerReplication,n)),t},Ofe=(e,n)=>{let t={};return e.Prefix!==void 0&&(t.Prefix=(0,d.expectString)(e.Prefix)),e.Tag===""?t.Tags=[]:e.Tag!==void 0&&(t.Tags=po((0,d.getArrayIfSingleItem)(e.Tag),n)),t},Tfe=(e,n)=>e.Prefix!==void 0?{Prefix:(0,d.expectString)(e.Prefix)}:e.Tag!==void 0?{Tag:Fs(e.Tag,n)}:e.And!==void 0?{And:Ofe(e.And,n)}:{$unknown:Object.entries(e)[0]},qfe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Nfe(t,n)),Mfe=(e,n)=>{let t={};return e.Status!==void 0&&(t.Status=(0,d.expectString)(e.Status)),e.Time!==void 0&&(t.Time=kj(e.Time,n)),t},kj=(e,n)=>{let t={};return e.Minutes!==void 0&&(t.Minutes=(0,d.strictParseInt32)(e.Minutes)),t},Aj=(e,n)=>{let t={};return e.IsRestoreInProgress!==void 0&&(t.IsRestoreInProgress=(0,d.parseBoolean)(e.IsRestoreInProgress)),e.RestoreExpiryDate!==void 0&&(t.RestoreExpiryDate=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.RestoreExpiryDate))),t},Bfe=(e,n)=>{let t={};return e.Condition!==void 0&&(t.Condition=dpe(e.Condition,n)),e.Redirect!==void 0&&(t.Redirect=kfe(e.Redirect,n)),t},Dfe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Bfe(t,n)),Ffe=(e,n)=>{let t={};return e.FilterRule===""?t.FilterRules=[]:e.FilterRule!==void 0&&(t.FilterRules=Npe((0,d.getArrayIfSingleItem)(e.FilterRule),n)),t},Lfe=(e,n)=>{let t={};return e.SSEAlgorithm!==void 0&&(t.SSEAlgorithm=(0,d.expectString)(e.SSEAlgorithm)),e.KMSMasterKeyID!==void 0&&(t.KMSMasterKeyID=(0,d.expectString)(e.KMSMasterKeyID)),t},jfe=(e,n)=>{let t={};return e.Rule===""?t.Rules=[]:e.Rule!==void 0&&(t.Rules=zfe((0,d.getArrayIfSingleItem)(e.Rule),n)),t},Ufe=(e,n)=>{let t={};return e.ApplyServerSideEncryptionByDefault!==void 0&&(t.ApplyServerSideEncryptionByDefault=Lfe(e.ApplyServerSideEncryptionByDefault,n)),e.BucketKeyEnabled!==void 0&&(t.BucketKeyEnabled=(0,d.parseBoolean)(e.BucketKeyEnabled)),t},zfe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Ufe(t,n)),Gfe=(e,n)=>{let t={};return e.SseKmsEncryptedObjects!==void 0&&(t.SseKmsEncryptedObjects=$fe(e.SseKmsEncryptedObjects,n)),e.ReplicaModifications!==void 0&&(t.ReplicaModifications=Ife(e.ReplicaModifications,n)),t},Hfe=(e,n)=>{let t={};return e.KeyId!==void 0&&(t.KeyId=(0,d.expectString)(e.KeyId)),t},$fe=(e,n)=>{let t={};return e.Status!==void 0&&(t.Status=(0,d.expectString)(e.Status)),t},Kfe=(e,n)=>({}),Vfe=(e,n)=>{let t={};return e.BytesScanned!==void 0&&(t.BytesScanned=(0,d.strictParseLong)(e.BytesScanned)),e.BytesProcessed!==void 0&&(t.BytesProcessed=(0,d.strictParseLong)(e.BytesProcessed)),e.BytesReturned!==void 0&&(t.BytesReturned=(0,d.strictParseLong)(e.BytesReturned)),t},Xfe=(e,n)=>{let t={};return e.DataExport!==void 0&&(t.DataExport=Wfe(e.DataExport,n)),t},Wfe=(e,n)=>{let t={};return e.OutputSchemaVersion!==void 0&&(t.OutputSchemaVersion=(0,d.expectString)(e.OutputSchemaVersion)),e.Destination!==void 0&&(t.Destination=npe(e.Destination,n)),t},Fs=(e,n)=>{let t={};return e.Key!==void 0&&(t.Key=(0,d.expectString)(e.Key)),e.Value!==void 0&&(t.Value=(0,d.expectString)(e.Value)),t},po=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Fs(t,n)),Yfe=(e,n)=>{let t={};return e.Grantee!==void 0&&(t.Grantee=Sj(e.Grantee,n)),e.Permission!==void 0&&(t.Permission=(0,d.expectString)(e.Permission)),t},Qfe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Yfe(t,n)),Jfe=(e,n)=>{let t={};return e.Days!==void 0&&(t.Days=(0,d.strictParseInt32)(e.Days)),e.AccessTier!==void 0&&(t.AccessTier=(0,d.expectString)(e.AccessTier)),t},Zfe=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>Jfe(t,n)),e_e=(e,n)=>{let t={};return e.Id!==void 0&&(t.Id=(0,d.expectString)(e.Id)),e.Topic!==void 0&&(t.TopicArn=(0,d.expectString)(e.Topic)),e.Event===""?t.Events=[]:e.Event!==void 0&&(t.Events=AE((0,d.getArrayIfSingleItem)(e.Event),n)),e.Filter!==void 0&&(t.Filter=IE(e.Filter,n)),t},t_e=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>e_e(t,n)),n_e=(e,n)=>{let t={};return e.Date!==void 0&&(t.Date=(0,d.expectNonNull)((0,d.parseRfc3339DateTimeWithOffset)(e.Date))),e.Days!==void 0&&(t.Days=(0,d.strictParseInt32)(e.Days)),e.StorageClass!==void 0&&(t.StorageClass=(0,d.expectString)(e.StorageClass)),t},r_e=(e,n)=>(e||[]).filter(t=>t!=null).map(t=>n_e(t,n)),N=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Ij=(e,n)=>(0,d.collectBody)(e,n).then(t=>n.utf8Encoder(t)),P=e=>e!=null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),ne=(e,n)=>Ij(e,n).then(t=>{if(t.length){let r=new Mse.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(u,l)=>l.trim()===""&&l.includes(` `)?"":void 0});r.addEntity("#xD","\r"),r.addEntity("#10",` diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/.yarn-integrity b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/.yarn-integrity similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/.yarn-integrity rename to packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/.yarn-integrity diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/delay/index.d.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/delay/index.d.ts similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/delay/index.d.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/delay/index.d.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/delay/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/delay/index.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/delay/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/delay/index.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/delay/license b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/delay/license similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/delay/license rename to packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/delay/license diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/delay/package.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/delay/package.json similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/delay/package.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/delay/package.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/delay/readme.md b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/delay/readme.md similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/node_modules/delay/readme.md rename to packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/node_modules/delay/readme.md diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/package.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/package.json similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/package.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/package.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/yarn.lock b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/yarn.lock similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e/yarn.lock rename to packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664/yarn.lock diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk-integ-lambda-nodejs-latest.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk-integ-lambda-nodejs-latest.assets.json index 8e08dba880374..cc6b4932898e0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk-integ-lambda-nodejs-latest.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk-integ-lambda-nodejs-latest.assets.json @@ -1,20 +1,20 @@ { - "version": "35.0.0", + "version": "36.0.0", "files": { - "3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e": { + "eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664": { "source": { - "path": "asset.3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e", + "path": "asset.eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e.zip", + "objectKey": "eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "3b9e1ec67f265577a80ab68b3d19fe304325b8341b2966fb372a3d52c5f57d4b": { + "43c4132da001603d4d9f708351bdb29917baaab8ab1d52e265f4041655b035b3": { "source": { "path": "cdk-integ-lambda-nodejs-latest.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3b9e1ec67f265577a80ab68b3d19fe304325b8341b2966fb372a3d52c5f57d4b.json", + "objectKey": "43c4132da001603d4d9f708351bdb29917baaab8ab1d52e265f4041655b035b3.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-nodejs/test/integ.latest.js.snapshot/cdk-integ-lambda-nodejs-latest.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk-integ-lambda-nodejs-latest.template.json index 67d3b66910130..fae0e303b954d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk-integ-lambda-nodejs-latest.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk-integ-lambda-nodejs-latest.template.json @@ -38,7 +38,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e.zip" + "S3Key": "eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664.zip" }, "Environment": { "Variables": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk.out index c5cb2e5de6344..1f0068d32659a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/integ.json index f9d4e408da6ce..ff7e45632041e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "36.0.0", "testCases": { "LambdaNodeJsLatestInteg/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/manifest.json index bb9f0ef94f6fb..d39c25d29df23 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "36.0.0", "artifacts": { "cdk-integ-lambda-nodejs-latest.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,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}/3b9e1ec67f265577a80ab68b3d19fe304325b8341b2966fb372a3d52c5f57d4b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/43c4132da001603d4d9f708351bdb29917baaab8ab1d52e265f4041655b035b3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -84,7 +84,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}/994f8c7abe2b3f6c8d3781397e390db9d07e0616825c3e71bccb9375e210fa3a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8deae8f4c1da113072818007e731a323c8dd62c3021d881a84352b2bf0901604.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/tree.json index d4daa859a8a8c..23a5bf8e37e8e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.latest.js.snapshot/tree.json @@ -105,7 +105,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "3c88aacdb6b48767fb52367e6dc0fe01602cfdc730dee4c4e3bebe0cec85ff9e.zip" + "s3Key": "eed45a32a57f32bc36031539054db0b27239d161061c528482bb55be51068664.zip" }, "environment": { "variables": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.assets.json new file mode 100644 index 0000000000000..0f6109b205d86 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/cdk-integ-opensearch-ip-address-type.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/cdk-integ-opensearch-ip-address-type.assets.json new file mode 100644 index 0000000000000..4523e146791fe --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/cdk-integ-opensearch-ip-address-type.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "a02f068bda7a4c283f49c26481ad324b0f7a0e54d84de7a1e843d408c8864707": { + "source": { + "path": "cdk-integ-opensearch-ip-address-type.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "a02f068bda7a4c283f49c26481ad324b0f7a0e54d84de7a1e843d408c8864707.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/cdk-integ-opensearch-ip-address-type.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/cdk-integ-opensearch-ip-address-type.template.json new file mode 100644 index 0000000000000..a2b5c8b01431f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/cdk-integ-opensearch-ip-address-type.template.json @@ -0,0 +1,102 @@ +{ + "Resources": { + "IPv41075180A": { + "Type": "AWS::OpenSearchService::Domain", + "Properties": { + "ClusterConfig": { + "DedicatedMasterEnabled": false, + "InstanceCount": 1, + "InstanceType": "r5.large.search", + "MultiAZWithStandbyEnabled": false, + "ZoneAwarenessEnabled": false + }, + "DomainEndpointOptions": { + "EnforceHTTPS": false, + "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" + }, + "EBSOptions": { + "EBSEnabled": true, + "VolumeSize": 10, + "VolumeType": "gp2" + }, + "EncryptionAtRestOptions": { + "Enabled": false + }, + "EngineVersion": "Elasticsearch_7.1", + "IPAddressType": "ipv4", + "LogPublishingOptions": {}, + "NodeToNodeEncryptionOptions": { + "Enabled": false + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DualStackC64A8AC0": { + "Type": "AWS::OpenSearchService::Domain", + "Properties": { + "ClusterConfig": { + "DedicatedMasterEnabled": false, + "InstanceCount": 1, + "InstanceType": "r5.large.search", + "MultiAZWithStandbyEnabled": false, + "ZoneAwarenessEnabled": false + }, + "DomainEndpointOptions": { + "EnforceHTTPS": false, + "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" + }, + "EBSOptions": { + "EBSEnabled": true, + "VolumeSize": 10, + "VolumeType": "gp2" + }, + "EncryptionAtRestOptions": { + "Enabled": false + }, + "EngineVersion": "Elasticsearch_7.1", + "IPAddressType": "dualstack", + "LogPublishingOptions": {}, + "NodeToNodeEncryptionOptions": { + "Enabled": false + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/integ.json new file mode 100644 index 0000000000000..b7328ad7852a4 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/integ.json @@ -0,0 +1,13 @@ +{ + "version": "36.0.0", + "testCases": { + "OpenSearchIpAddressTypeInteg/DefaultTest": { + "stacks": [ + "cdk-integ-opensearch-ip-address-type" + ], + "diffAssets": true, + "assertionStack": "OpenSearchIpAddressTypeInteg/DefaultTest/DeployAssert", + "assertionStackName": "OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/manifest.json new file mode 100644 index 0000000000000..e8c7ad5c4ab2b --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/manifest.json @@ -0,0 +1,119 @@ +{ + "version": "36.0.0", + "artifacts": { + "cdk-integ-opensearch-ip-address-type.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "cdk-integ-opensearch-ip-address-type.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "cdk-integ-opensearch-ip-address-type": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "cdk-integ-opensearch-ip-address-type.template.json", + "terminationProtection": false, + "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}/a02f068bda7a4c283f49c26481ad324b0f7a0e54d84de7a1e843d408c8864707.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "cdk-integ-opensearch-ip-address-type.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": [ + "cdk-integ-opensearch-ip-address-type.assets" + ], + "metadata": { + "/cdk-integ-opensearch-ip-address-type/IPv4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "IPv41075180A" + } + ], + "/cdk-integ-opensearch-ip-address-type/DualStack/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DualStackC64A8AC0" + } + ], + "/cdk-integ-opensearch-ip-address-type/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/cdk-integ-opensearch-ip-address-type/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "cdk-integ-opensearch-ip-address-type" + }, + "OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.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": [ + "OpenSearchIpAddressTypeIntegDefaultTestDeployAssertE117ADBF.assets" + ], + "metadata": { + "/OpenSearchIpAddressTypeInteg/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/OpenSearchIpAddressTypeInteg/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "OpenSearchIpAddressTypeInteg/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/tree.json new file mode 100644 index 0000000000000..d63d22e85d867 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.js.snapshot/tree.json @@ -0,0 +1,197 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "cdk-integ-opensearch-ip-address-type": { + "id": "cdk-integ-opensearch-ip-address-type", + "path": "cdk-integ-opensearch-ip-address-type", + "children": { + "IPv4": { + "id": "IPv4", + "path": "cdk-integ-opensearch-ip-address-type/IPv4", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-integ-opensearch-ip-address-type/IPv4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::OpenSearchService::Domain", + "aws:cdk:cloudformation:props": { + "clusterConfig": { + "dedicatedMasterEnabled": false, + "instanceCount": 1, + "instanceType": "r5.large.search", + "multiAzWithStandbyEnabled": false, + "zoneAwarenessEnabled": false + }, + "domainEndpointOptions": { + "enforceHttps": false, + "tlsSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" + }, + "ebsOptions": { + "ebsEnabled": true, + "volumeSize": 10, + "volumeType": "gp2" + }, + "encryptionAtRestOptions": { + "enabled": false + }, + "engineVersion": "Elasticsearch_7.1", + "ipAddressType": "ipv4", + "logPublishingOptions": {}, + "nodeToNodeEncryptionOptions": { + "enabled": false + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DualStack": { + "id": "DualStack", + "path": "cdk-integ-opensearch-ip-address-type/DualStack", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-integ-opensearch-ip-address-type/DualStack/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::OpenSearchService::Domain", + "aws:cdk:cloudformation:props": { + "clusterConfig": { + "dedicatedMasterEnabled": false, + "instanceCount": 1, + "instanceType": "r5.large.search", + "multiAzWithStandbyEnabled": false, + "zoneAwarenessEnabled": false + }, + "domainEndpointOptions": { + "enforceHttps": false, + "tlsSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" + }, + "ebsOptions": { + "ebsEnabled": true, + "volumeSize": 10, + "volumeType": "gp2" + }, + "encryptionAtRestOptions": { + "enabled": false + }, + "engineVersion": "Elasticsearch_7.1", + "ipAddressType": "dualstack", + "logPublishingOptions": {}, + "nodeToNodeEncryptionOptions": { + "enabled": false + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "cdk-integ-opensearch-ip-address-type/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "cdk-integ-opensearch-ip-address-type/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "OpenSearchIpAddressTypeInteg": { + "id": "OpenSearchIpAddressTypeInteg", + "path": "OpenSearchIpAddressTypeInteg", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "OpenSearchIpAddressTypeInteg/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "OpenSearchIpAddressTypeInteg/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "OpenSearchIpAddressTypeInteg/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "OpenSearchIpAddressTypeInteg/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "OpenSearchIpAddressTypeInteg/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.ts new file mode 100644 index 0000000000000..aad2005691675 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.ip-address-type.ts @@ -0,0 +1,37 @@ +import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import * as opensearch from 'aws-cdk-lib/aws-opensearchservice'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +class TestStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + new opensearch.Domain(this, 'IPv4', { + version: opensearch.EngineVersion.ELASTICSEARCH_7_1, + removalPolicy: RemovalPolicy.DESTROY, + ipAddressType: opensearch.IpAddressType.IPV4, + capacity: { + multiAzWithStandbyEnabled: false, + }, + }); + + new opensearch.Domain(this, 'DualStack', { + version: opensearch.EngineVersion.ELASTICSEARCH_7_1, + removalPolicy: RemovalPolicy.DESTROY, + ipAddressType: opensearch.IpAddressType.DUAL_STACK, + capacity: { + multiAzWithStandbyEnabled: false, + }, + }); + } +} + +const app = new App(); +const stack = new TestStack(app, 'cdk-integ-opensearch-ip-address-type'); + +new IntegTest(app, 'OpenSearchIpAddressTypeInteg', { + testCases: [stack], + diffAssets: true, +}); +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/aws-cdk-rds-proxy.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/aws-cdk-rds-proxy.assets.json index b64d373ba0733..be93d83fbc681 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/aws-cdk-rds-proxy.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/aws-cdk-rds-proxy.assets.json @@ -1,7 +1,7 @@ { - "version": "31.0.0", + "version": "35.0.0", "files": { - "fbfbdae93c15032979fecbc2362ee6c1bf3b952eb363424fb60a8f6c15d6a0d0": { + "938b3109faa6eac41e1d4a7b5d76197a74908e45302636596d841968426d6321": { "source": { "path": "aws-cdk-rds-proxy.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fbfbdae93c15032979fecbc2362ee6c1bf3b952eb363424fb60a8f6c15d6a0d0.json", + "objectKey": "938b3109faa6eac41e1d4a7b5d76197a74908e45302636596d841968426d6321.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.proxy.js.snapshot/aws-cdk-rds-proxy.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/aws-cdk-rds-proxy.template.json index cb67056386bd0..21aa37f0796d9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/aws-cdk-rds-proxy.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/aws-cdk-rds-proxy.template.json @@ -18,9 +18,6 @@ "vpcPublicSubnet1Subnet2E65531E": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -44,21 +41,24 @@ "Key": "Name", "Value": "aws-cdk-rds-proxy/vpc/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "vpcA2121C38" + } } }, "vpcPublicSubnet1RouteTable48A2DF9B": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, "Tags": [ { "Key": "Name", "Value": "aws-cdk-rds-proxy/vpc/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "vpcA2121C38" + } } }, "vpcPublicSubnet1RouteTableAssociation5D3F4579": { @@ -75,12 +75,12 @@ "vpcPublicSubnet1DefaultRoute10708846": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "vpcIGWE57CBDCA" + }, + "RouteTableId": { + "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" } }, "DependsOn": [ @@ -102,15 +102,15 @@ "vpcPublicSubnet1NATGateway9C16659E": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, "AllocationId": { "Fn::GetAtt": [ "vpcPublicSubnet1EIPDA49DCBE", "AllocationId" ] }, + "SubnetId": { + "Ref": "vpcPublicSubnet1Subnet2E65531E" + }, "Tags": [ { "Key": "Name", @@ -126,9 +126,6 @@ "vpcPublicSubnet2Subnet009B674F": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -152,21 +149,24 @@ "Key": "Name", "Value": "aws-cdk-rds-proxy/vpc/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "vpcA2121C38" + } } }, "vpcPublicSubnet2RouteTableEB40D4CB": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, "Tags": [ { "Key": "Name", "Value": "aws-cdk-rds-proxy/vpc/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "vpcA2121C38" + } } }, "vpcPublicSubnet2RouteTableAssociation21F81B59": { @@ -183,12 +183,12 @@ "vpcPublicSubnet2DefaultRouteA1EC0F60": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "vpcIGWE57CBDCA" + }, + "RouteTableId": { + "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" } }, "DependsOn": [ @@ -210,15 +210,15 @@ "vpcPublicSubnet2NATGateway9B8AE11A": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, "AllocationId": { "Fn::GetAtt": [ "vpcPublicSubnet2EIP9B3743B1", "AllocationId" ] }, + "SubnetId": { + "Ref": "vpcPublicSubnet2Subnet009B674F" + }, "Tags": [ { "Key": "Name", @@ -234,9 +234,6 @@ "vpcPrivateSubnet1Subnet934893E8": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -260,21 +257,24 @@ "Key": "Name", "Value": "aws-cdk-rds-proxy/vpc/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "vpcA2121C38" + } } }, "vpcPrivateSubnet1RouteTableB41A48CC": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, "Tags": [ { "Key": "Name", "Value": "aws-cdk-rds-proxy/vpc/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "vpcA2121C38" + } } }, "vpcPrivateSubnet1RouteTableAssociation67945127": { @@ -291,21 +291,18 @@ "vpcPrivateSubnet1DefaultRoute1AA8E2E5": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "vpcPublicSubnet1NATGateway9C16659E" + }, + "RouteTableId": { + "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" } } }, "vpcPrivateSubnet2Subnet7031C2BA": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -329,21 +326,24 @@ "Key": "Name", "Value": "aws-cdk-rds-proxy/vpc/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "vpcA2121C38" + } } }, "vpcPrivateSubnet2RouteTable7280F23E": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, "Tags": [ { "Key": "Name", "Value": "aws-cdk-rds-proxy/vpc/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "vpcA2121C38" + } } }, "vpcPrivateSubnet2RouteTableAssociation007E94D3": { @@ -360,12 +360,12 @@ "vpcPrivateSubnet2DefaultRouteB0E07F99": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "vpcPublicSubnet2NATGateway9B8AE11A" + }, + "RouteTableId": { + "Ref": "vpcPrivateSubnet2RouteTable7280F23E" } } }, @@ -383,11 +383,11 @@ "vpcVPCGW7984C166": { "Type": "AWS::EC2::VPCGatewayAttachment", "Properties": { - "VpcId": { - "Ref": "vpcA2121C38" - }, "InternetGatewayId": { "Ref": "vpcIGWE57CBDCA" + }, + "VpcId": { + "Ref": "vpcA2121C38" } } }, @@ -424,7 +424,6 @@ "dbInstanceSecurityGroupfromawscdkrdsproxydbProxyProxySecurityGroupA345AFE5IndirectPortE3621D4F": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { - "IpProtocol": "tcp", "Description": "Allow connections to the database Instance from the Proxy", "FromPort": { "Fn::GetAtt": [ @@ -438,6 +437,7 @@ "GroupId" ] }, + "IpProtocol": "tcp", "SourceSecurityGroupId": { "Fn::GetAtt": [ "dbProxyProxySecurityGroup16E727A7", @@ -499,7 +499,7 @@ }, "Engine": "postgres", "EngineVersion": "15.2", - "MasterUsername": { + "MasterUserPassword": { "Fn::Join": [ "", [ @@ -507,11 +507,11 @@ { "Ref": "dbInstanceSecret032D3661" }, - ":SecretString:username::}}" + ":SecretString:password::}}" ] ] }, - "MasterUserPassword": { + "MasterUsername": { "Fn::Join": [ "", [ @@ -519,7 +519,7 @@ { "Ref": "dbInstanceSecret032D3661" }, - ":SecretString:password::}}" + ":SecretString:username::}}" ] ] }, @@ -601,6 +601,7 @@ "Auth": [ { "AuthScheme": "SECRETS", + "ClientPasswordAuthType": "POSTGRES_SCRAM_SHA_256", "IAMAuth": "DISABLED", "SecretArn": { "Ref": "dbInstanceSecretAttachment88CFBDAE" @@ -609,21 +610,13 @@ ], "DBProxyName": "awscdkrdsproxydbProxy0E60A1B7", "EngineFamily": "POSTGRESQL", + "RequireTLS": true, "RoleArn": { "Fn::GetAtt": [ "dbProxyIAMRole662F3AB8", "Arn" ] }, - "VpcSubnetIds": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - ], - "RequireTLS": true, "VpcSecurityGroupIds": [ { "Fn::GetAtt": [ @@ -631,16 +624,20 @@ "GroupId" ] } + ], + "VpcSubnetIds": [ + { + "Ref": "vpcPrivateSubnet1Subnet934893E8" + }, + { + "Ref": "vpcPrivateSubnet2Subnet7031C2BA" + } ] } }, "dbProxyProxyTargetGroup8DA26A77": { "Type": "AWS::RDS::DBProxyTargetGroup", "Properties": { - "DBProxyName": { - "Ref": "dbProxy3B89EAF2" - }, - "TargetGroupName": "default", "ConnectionPoolConfigurationInfo": { "ConnectionBorrowTimeout": 30, "MaxConnectionsPercent": 50 @@ -649,7 +646,11 @@ { "Ref": "dbInstance4076B1EC" } - ] + ], + "DBProxyName": { + "Ref": "dbProxy3B89EAF2" + }, + "TargetGroupName": "default" } }, "dbClusterSubnets03B9B0E1": { @@ -682,10 +683,40 @@ } } }, - "dbClusterSecurityGroupfromawscdkrdsproxyProxyProxySecurityGroup9F179E6FIndirectPortED421002": { + "dbClusterSecurityGroupfromawscdkrdsproxydbClusterProxyProxySecurityGroupFBC47B09IndirectPort152B2D99": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { + "Description": "Allow connections to the database Cluster from the Proxy", + "FromPort": { + "Fn::GetAtt": [ + "dbClusterE86E47AE", + "Endpoint.Port" + ] + }, + "GroupId": { + "Fn::GetAtt": [ + "dbClusterSecurityGroupCAA1A91F", + "GroupId" + ] + }, "IpProtocol": "tcp", + "SourceSecurityGroupId": { + "Fn::GetAtt": [ + "dbClusterProxyProxySecurityGroup170F327D", + "GroupId" + ] + }, + "ToPort": { + "Fn::GetAtt": [ + "dbClusterE86E47AE", + "Endpoint.Port" + ] + } + } + }, + "dbClusterSecurityGroupfromawscdkrdsproxydbClusterProxy2ProxySecurityGroup5B77853FIndirectPort61009070": { + "Type": "AWS::EC2::SecurityGroupIngress", + "Properties": { "Description": "Allow connections to the database Cluster from the Proxy", "FromPort": { "Fn::GetAtt": [ @@ -699,9 +730,10 @@ "GroupId" ] }, + "IpProtocol": "tcp", "SourceSecurityGroupId": { "Fn::GetAtt": [ - "ProxyProxySecurityGroupC42FC3CE", + "dbClusterProxy2ProxySecurityGroupB44507AE", "GroupId" ] }, @@ -759,7 +791,7 @@ }, "Engine": "aurora-postgresql", "EngineVersion": "14.5", - "MasterUsername": { + "MasterUserPassword": { "Fn::Join": [ "", [ @@ -767,11 +799,11 @@ { "Ref": "dbClusterSecretCEA6D7B6" }, - ":SecretString:username::}}" + ":SecretString:password::}}" ] ] }, - "MasterUserPassword": { + "MasterUsername": { "Fn::Join": [ "", [ @@ -779,7 +811,7 @@ { "Ref": "dbClusterSecretCEA6D7B6" }, - ":SecretString:password::}}" + ":SecretString:username::}}" ] ] }, @@ -838,7 +870,7 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "ProxyIAMRole2FE8AB0F": { + "dbClusterProxyIAMRole693E39F5": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -855,7 +887,7 @@ } } }, - "ProxyIAMRoleDefaultPolicy59EB0117": { + "dbClusterProxyIAMRoleDefaultPolicyEEE23224": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -873,15 +905,15 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ProxyIAMRoleDefaultPolicy59EB0117", + "PolicyName": "dbClusterProxyIAMRoleDefaultPolicyEEE23224", "Roles": [ { - "Ref": "ProxyIAMRole2FE8AB0F" + "Ref": "dbClusterProxyIAMRole693E39F5" } ] } }, - "ProxyProxySecurityGroupC42FC3CE": { + "dbClusterProxyProxySecurityGroup170F327D": { "Type": "AWS::EC2::SecurityGroup", "Properties": { "GroupDescription": "SecurityGroup for Database Proxy", @@ -897,7 +929,7 @@ } } }, - "ProxyCB0DFB71": { + "dbClusterProxyAB5F8181": { "Type": "AWS::RDS::DBProxy", "Properties": { "Auth": [ @@ -909,14 +941,23 @@ } } ], - "DBProxyName": "cluster-db-proxy", + "DBProxyName": "awscdkrdsproxydbClusterProxyE88930B6", "EngineFamily": "POSTGRESQL", + "RequireTLS": true, "RoleArn": { "Fn::GetAtt": [ - "ProxyIAMRole2FE8AB0F", + "dbClusterProxyIAMRole693E39F5", "Arn" ] }, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "dbClusterProxyProxySecurityGroup170F327D", + "GroupId" + ] + } + ], "VpcSubnetIds": [ { "Ref": "vpcPrivateSubnet1Subnet934893E8" @@ -924,41 +965,145 @@ { "Ref": "vpcPrivateSubnet2Subnet7031C2BA" } + ] + } + }, + "dbClusterProxyProxyTargetGroupB7010C0D": { + "Type": "AWS::RDS::DBProxyTargetGroup", + "Properties": { + "ConnectionPoolConfigurationInfo": {}, + "DBClusterIdentifiers": [ + { + "Ref": "dbClusterE86E47AE" + } ], + "DBProxyName": { + "Ref": "dbClusterProxyAB5F8181" + }, + "TargetGroupName": "default" + }, + "DependsOn": [ + "dbClusterInstance1BCE092AC", + "dbClusterInstance20BA1ECD9", + "dbClusterE86E47AE" + ] + }, + "dbClusterProxy2IAMRole190D217C": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "rds.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "dbClusterProxy2IAMRoleDefaultPolicyFD9414D8": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "secretsmanager:DescribeSecret", + "secretsmanager:GetSecretValue" + ], + "Effect": "Allow", + "Resource": { + "Ref": "dbClusterSecretAttachmentAB67A752" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "dbClusterProxy2IAMRoleDefaultPolicyFD9414D8", + "Roles": [ + { + "Ref": "dbClusterProxy2IAMRole190D217C" + } + ] + } + }, + "dbClusterProxy2ProxySecurityGroupB44507AE": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "SecurityGroup for Database Proxy", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "vpcA2121C38" + } + } + }, + "dbClusterProxy28BBD43D5": { + "Type": "AWS::RDS::DBProxy", + "Properties": { + "Auth": [ + { + "AuthScheme": "SECRETS", + "IAMAuth": "DISABLED", + "SecretArn": { + "Ref": "dbClusterSecretAttachmentAB67A752" + } + } + ], + "DBProxyName": "awscdkrdsproxydbClusterProxy27493E9A7", + "EngineFamily": "POSTGRESQL", "RequireTLS": true, + "RoleArn": { + "Fn::GetAtt": [ + "dbClusterProxy2IAMRole190D217C", + "Arn" + ] + }, "VpcSecurityGroupIds": [ { "Fn::GetAtt": [ - "ProxyProxySecurityGroupC42FC3CE", + "dbClusterProxy2ProxySecurityGroupB44507AE", "GroupId" ] } + ], + "VpcSubnetIds": [ + { + "Ref": "vpcPrivateSubnet1Subnet934893E8" + }, + { + "Ref": "vpcPrivateSubnet2Subnet7031C2BA" + } ] } }, - "ProxyProxyTargetGroupB462B5C5": { + "dbClusterProxy2ProxyTargetGroup8BD48F57": { "Type": "AWS::RDS::DBProxyTargetGroup", "Properties": { - "DBProxyName": { - "Ref": "ProxyCB0DFB71" - }, - "TargetGroupName": "default", "ConnectionPoolConfigurationInfo": {}, "DBClusterIdentifiers": [ { "Ref": "dbClusterE86E47AE" } - ] + ], + "DBProxyName": { + "Ref": "dbClusterProxy28BBD43D5" + }, + "TargetGroupName": "default" }, "DependsOn": [ "dbClusterInstance1BCE092AC", "dbClusterInstance20BA1ECD9", - "dbClusterE86E47AE", - "dbClusterSecretAttachmentAB67A752", - "dbClusterSecretCEA6D7B6", - "dbClusterSecurityGroupfromawscdkrdsproxyProxyProxySecurityGroup9F179E6FIndirectPortED421002", - "dbClusterSecurityGroupCAA1A91F", - "dbClusterSubnets03B9B0E1" + "dbClusterE86E47AE" ] } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/cdk.out index 7925065efbcc4..c5cb2e5de6344 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"31.0.0"} \ No newline at end of file +{"version":"35.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/databaseproxyintegtestDefaultTestDeployAssert1DC3D9D5.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/databaseproxyintegtestDefaultTestDeployAssert1DC3D9D5.assets.json index 9f8c7fc42363c..c1fc7e45b88a1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/databaseproxyintegtestDefaultTestDeployAssert1DC3D9D5.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/databaseproxyintegtestDefaultTestDeployAssert1DC3D9D5.assets.json @@ -1,5 +1,5 @@ { - "version": "31.0.0", + "version": "35.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/integ.json index 0f50e706e7b16..45dc395b13d22 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "31.0.0", + "version": "35.0.0", "testCases": { "database-proxy-integ-test/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/manifest.json index 579edfb39a58d..579b5da69d673 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "31.0.0", + "version": "35.0.0", "artifacts": { "aws-cdk-rds-proxy.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-cdk-rds-proxy.template.json", + "terminationProtection": false, "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}/fbfbdae93c15032979fecbc2362ee6c1bf3b952eb363424fb60a8f6c15d6a0d0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/938b3109faa6eac41e1d4a7b5d76197a74908e45302636596d841968426d6321.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -249,10 +250,16 @@ "data": "dbClusterSecurityGroupCAA1A91F" } ], - "/aws-cdk-rds-proxy/dbCluster/SecurityGroup/from awscdkrdsproxyProxyProxySecurityGroup9F179E6F:{IndirectPort}": [ + "/aws-cdk-rds-proxy/dbCluster/SecurityGroup/from awscdkrdsproxydbClusterProxyProxySecurityGroupFBC47B09:{IndirectPort}": [ { "type": "aws:cdk:logicalId", - "data": "dbClusterSecurityGroupfromawscdkrdsproxyProxyProxySecurityGroup9F179E6FIndirectPortED421002" + "data": "dbClusterSecurityGroupfromawscdkrdsproxydbClusterProxyProxySecurityGroupFBC47B09IndirectPort152B2D99" + } + ], + "/aws-cdk-rds-proxy/dbCluster/SecurityGroup/from awscdkrdsproxydbClusterProxy2ProxySecurityGroup5B77853F:{IndirectPort}": [ + { + "type": "aws:cdk:logicalId", + "data": "dbClusterSecurityGroupfromawscdkrdsproxydbClusterProxy2ProxySecurityGroup5B77853FIndirectPort61009070" } ], "/aws-cdk-rds-proxy/dbCluster/Secret/Resource": [ @@ -285,34 +292,64 @@ "data": "dbClusterInstance20BA1ECD9" } ], - "/aws-cdk-rds-proxy/Proxy/IAMRole/Resource": [ + "/aws-cdk-rds-proxy/dbCluster/Proxy/IAMRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "dbClusterProxyIAMRole693E39F5" + } + ], + "/aws-cdk-rds-proxy/dbCluster/Proxy/IAMRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "dbClusterProxyIAMRoleDefaultPolicyEEE23224" + } + ], + "/aws-cdk-rds-proxy/dbCluster/Proxy/ProxySecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "dbClusterProxyProxySecurityGroup170F327D" + } + ], + "/aws-cdk-rds-proxy/dbCluster/Proxy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "dbClusterProxyAB5F8181" + } + ], + "/aws-cdk-rds-proxy/dbCluster/Proxy/ProxyTargetGroup": [ + { + "type": "aws:cdk:logicalId", + "data": "dbClusterProxyProxyTargetGroupB7010C0D" + } + ], + "/aws-cdk-rds-proxy/dbCluster/Proxy2/IAMRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ProxyIAMRole2FE8AB0F" + "data": "dbClusterProxy2IAMRole190D217C" } ], - "/aws-cdk-rds-proxy/Proxy/IAMRole/DefaultPolicy/Resource": [ + "/aws-cdk-rds-proxy/dbCluster/Proxy2/IAMRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ProxyIAMRoleDefaultPolicy59EB0117" + "data": "dbClusterProxy2IAMRoleDefaultPolicyFD9414D8" } ], - "/aws-cdk-rds-proxy/Proxy/ProxySecurityGroup/Resource": [ + "/aws-cdk-rds-proxy/dbCluster/Proxy2/ProxySecurityGroup/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ProxyProxySecurityGroupC42FC3CE" + "data": "dbClusterProxy2ProxySecurityGroupB44507AE" } ], - "/aws-cdk-rds-proxy/Proxy/Resource": [ + "/aws-cdk-rds-proxy/dbCluster/Proxy2/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ProxyCB0DFB71" + "data": "dbClusterProxy28BBD43D5" } ], - "/aws-cdk-rds-proxy/Proxy/ProxyTargetGroup": [ + "/aws-cdk-rds-proxy/dbCluster/Proxy2/ProxyTargetGroup": [ { "type": "aws:cdk:logicalId", - "data": "ProxyProxyTargetGroupB462B5C5" + "data": "dbClusterProxy2ProxyTargetGroup8BD48F57" } ], "/aws-cdk-rds-proxy/BootstrapVersion": [ @@ -343,6 +380,7 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "databaseproxyintegtestDefaultTestDeployAssert1DC3D9D5.template.json", + "terminationProtection": false, "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}", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/tree.json index 82421eb7d52aa..d9e55b3be753c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.js.snapshot/tree.json @@ -31,7 +31,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnVPC", + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", "version": "0.0.0" } }, @@ -45,9 +45,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "vpcA2121C38" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -71,11 +68,14 @@ "key": "Name", "value": "aws-cdk-rds-proxy/vpc/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "vpcA2121C38" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", "version": "0.0.0" } }, @@ -83,7 +83,7 @@ "id": "Acl", "path": "aws-cdk-rds-proxy/vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -93,19 +93,19 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "vpcA2121C38" - }, "tags": [ { "key": "Name", "value": "aws-cdk-rds-proxy/vpc/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "vpcA2121C38" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", "version": "0.0.0" } }, @@ -124,7 +124,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", "version": "0.0.0" } }, @@ -134,17 +134,17 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "vpcIGWE57CBDCA" + }, + "routeTableId": { + "Ref": "vpcPublicSubnet1RouteTable48A2DF9B" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", "version": "0.0.0" } }, @@ -164,7 +164,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", "version": "0.0.0" } }, @@ -174,15 +174,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "vpcPublicSubnet1Subnet2E65531E" - }, "allocationId": { "Fn::GetAtt": [ "vpcPublicSubnet1EIPDA49DCBE", "AllocationId" ] }, + "subnetId": { + "Ref": "vpcPublicSubnet1Subnet2E65531E" + }, "tags": [ { "key": "Name", @@ -192,13 +192,13 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", "version": "0.0.0" } }, @@ -212,9 +212,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "vpcA2121C38" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -238,11 +235,14 @@ "key": "Name", "value": "aws-cdk-rds-proxy/vpc/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "vpcA2121C38" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", "version": "0.0.0" } }, @@ -250,7 +250,7 @@ "id": "Acl", "path": "aws-cdk-rds-proxy/vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -260,19 +260,19 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "vpcA2121C38" - }, "tags": [ { "key": "Name", "value": "aws-cdk-rds-proxy/vpc/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "vpcA2121C38" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", "version": "0.0.0" } }, @@ -291,7 +291,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", "version": "0.0.0" } }, @@ -301,17 +301,17 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "vpcIGWE57CBDCA" + }, + "routeTableId": { + "Ref": "vpcPublicSubnet2RouteTableEB40D4CB" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", "version": "0.0.0" } }, @@ -331,7 +331,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", "version": "0.0.0" } }, @@ -341,15 +341,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "vpcPublicSubnet2Subnet009B674F" - }, "allocationId": { "Fn::GetAtt": [ "vpcPublicSubnet2EIP9B3743B1", "AllocationId" ] }, + "subnetId": { + "Ref": "vpcPublicSubnet2Subnet009B674F" + }, "tags": [ { "key": "Name", @@ -359,13 +359,13 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", "version": "0.0.0" } }, @@ -379,9 +379,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "vpcA2121C38" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -405,11 +402,14 @@ "key": "Name", "value": "aws-cdk-rds-proxy/vpc/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "vpcA2121C38" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", "version": "0.0.0" } }, @@ -417,7 +417,7 @@ "id": "Acl", "path": "aws-cdk-rds-proxy/vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -427,19 +427,19 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "vpcA2121C38" - }, "tags": [ { "key": "Name", "value": "aws-cdk-rds-proxy/vpc/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "vpcA2121C38" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", "version": "0.0.0" } }, @@ -458,7 +458,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", "version": "0.0.0" } }, @@ -468,23 +468,23 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "vpcPublicSubnet1NATGateway9C16659E" + }, + "routeTableId": { + "Ref": "vpcPrivateSubnet1RouteTableB41A48CC" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", "version": "0.0.0" } }, @@ -498,9 +498,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "vpcA2121C38" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -524,11 +521,14 @@ "key": "Name", "value": "aws-cdk-rds-proxy/vpc/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "vpcA2121C38" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", "version": "0.0.0" } }, @@ -536,7 +536,7 @@ "id": "Acl", "path": "aws-cdk-rds-proxy/vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -546,19 +546,19 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "vpcA2121C38" - }, "tags": [ { "key": "Name", "value": "aws-cdk-rds-proxy/vpc/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "vpcA2121C38" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", "version": "0.0.0" } }, @@ -577,7 +577,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", "version": "0.0.0" } }, @@ -587,23 +587,23 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "vpcPrivateSubnet2RouteTable7280F23E" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "vpcPublicSubnet2NATGateway9B8AE11A" + }, + "routeTableId": { + "Ref": "vpcPrivateSubnet2RouteTable7280F23E" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", "version": "0.0.0" } }, @@ -622,7 +622,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnInternetGateway", + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", "version": "0.0.0" } }, @@ -632,22 +632,22 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "vpcA2121C38" - }, "internetGatewayId": { "Ref": "vpcIGWE57CBDCA" + }, + "vpcId": { + "Ref": "vpcA2121C38" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnVPCGatewayAttachment", + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.Vpc", + "fqn": "aws-cdk-lib.aws_ec2.Vpc", "version": "0.0.0" } }, @@ -677,13 +677,13 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.CfnDBSubnetGroup", + "fqn": "aws-cdk-lib.aws_rds.CfnDBSubnetGroup", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.SubnetGroup", + "fqn": "aws-cdk-lib.aws_rds.SubnetGroup", "version": "0.0.0" } }, @@ -711,7 +711,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", "version": "0.0.0" } }, @@ -721,7 +721,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupIngress", "aws:cdk:cloudformation:props": { - "ipProtocol": "tcp", "description": "Allow connections to the database Instance from the Proxy", "fromPort": { "Fn::GetAtt": [ @@ -735,6 +734,7 @@ "GroupId" ] }, + "ipProtocol": "tcp", "sourceSecurityGroupId": { "Fn::GetAtt": [ "dbProxyProxySecurityGroup16E727A7", @@ -750,13 +750,13 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroupIngress", + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", "version": "0.0.0" } }, @@ -790,7 +790,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret", + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", "version": "0.0.0" } }, @@ -814,19 +814,19 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-secretsmanager.CfnSecretTargetAttachment", + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecretTargetAttachment", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-secretsmanager.SecretTargetAttachment", + "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.DatabaseSecret", + "fqn": "aws-cdk-lib.aws_rds.DatabaseSecret", "version": "0.0.0" } }, @@ -880,13 +880,13 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.CfnDBInstance", + "fqn": "aws-cdk-lib.aws_rds.CfnDBInstance", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.DatabaseInstance", + "fqn": "aws-cdk-lib.aws_rds.DatabaseInstance", "version": "0.0.0" } }, @@ -902,7 +902,7 @@ "id": "ImportIAMRole", "path": "aws-cdk-rds-proxy/dbProxy/IAMRole/ImportIAMRole", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -927,7 +927,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", + "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } }, @@ -965,19 +965,19 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnPolicy", + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Policy", + "fqn": "aws-cdk-lib.aws_iam.Policy", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", + "fqn": "aws-cdk-lib.aws_iam.Role", "version": "0.0.0" } }, @@ -1005,13 +1005,13 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", "version": "0.0.0" } }, @@ -1032,21 +1032,13 @@ ], "dbProxyName": "awscdkrdsproxydbProxy0E60A1B7", "engineFamily": "POSTGRESQL", + "requireTls": true, "roleArn": { "Fn::GetAtt": [ "dbProxyIAMRole662F3AB8", "Arn" ] }, - "vpcSubnetIds": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - ], - "requireTls": true, "vpcSecurityGroupIds": [ { "Fn::GetAtt": [ @@ -1054,11 +1046,19 @@ "GroupId" ] } + ], + "vpcSubnetIds": [ + { + "Ref": "vpcPrivateSubnet1Subnet934893E8" + }, + { + "Ref": "vpcPrivateSubnet2Subnet7031C2BA" + } ] } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.CfnDBProxy", + "fqn": "aws-cdk-lib.aws_rds.CfnDBProxy", "version": "0.0.0" } }, @@ -1068,10 +1068,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::RDS::DBProxyTargetGroup", "aws:cdk:cloudformation:props": { - "dbProxyName": { - "Ref": "dbProxy3B89EAF2" - }, - "targetGroupName": "default", "connectionPoolConfigurationInfo": { "connectionBorrowTimeout": 30, "maxConnectionsPercent": 50 @@ -1080,17 +1076,21 @@ { "Ref": "dbInstance4076B1EC" } - ] + ], + "dbProxyName": { + "Ref": "dbProxy3B89EAF2" + }, + "targetGroupName": "default" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.CfnDBProxyTargetGroup", + "fqn": "aws-cdk-lib.aws_rds.CfnDBProxyTargetGroup", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.DatabaseProxy", + "fqn": "aws-cdk-lib.aws_rds.DatabaseProxy", "version": "0.0.0" } }, @@ -1120,13 +1120,13 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.CfnDBSubnetGroup", + "fqn": "aws-cdk-lib.aws_rds.CfnDBSubnetGroup", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.SubnetGroup", + "fqn": "aws-cdk-lib.aws_rds.SubnetGroup", "version": "0.0.0" } }, @@ -1154,17 +1154,55 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", "version": "0.0.0" } }, - "from awscdkrdsproxyProxyProxySecurityGroup9F179E6F:{IndirectPort}": { - "id": "from awscdkrdsproxyProxyProxySecurityGroup9F179E6F:{IndirectPort}", - "path": "aws-cdk-rds-proxy/dbCluster/SecurityGroup/from awscdkrdsproxyProxyProxySecurityGroup9F179E6F:{IndirectPort}", + "from awscdkrdsproxydbClusterProxyProxySecurityGroupFBC47B09:{IndirectPort}": { + "id": "from awscdkrdsproxydbClusterProxyProxySecurityGroupFBC47B09:{IndirectPort}", + "path": "aws-cdk-rds-proxy/dbCluster/SecurityGroup/from awscdkrdsproxydbClusterProxyProxySecurityGroupFBC47B09:{IndirectPort}", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupIngress", "aws:cdk:cloudformation:props": { + "description": "Allow connections to the database Cluster from the Proxy", + "fromPort": { + "Fn::GetAtt": [ + "dbClusterE86E47AE", + "Endpoint.Port" + ] + }, + "groupId": { + "Fn::GetAtt": [ + "dbClusterSecurityGroupCAA1A91F", + "GroupId" + ] + }, "ipProtocol": "tcp", + "sourceSecurityGroupId": { + "Fn::GetAtt": [ + "dbClusterProxyProxySecurityGroup170F327D", + "GroupId" + ] + }, + "toPort": { + "Fn::GetAtt": [ + "dbClusterE86E47AE", + "Endpoint.Port" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", + "version": "0.0.0" + } + }, + "from awscdkrdsproxydbClusterProxy2ProxySecurityGroup5B77853F:{IndirectPort}": { + "id": "from awscdkrdsproxydbClusterProxy2ProxySecurityGroup5B77853F:{IndirectPort}", + "path": "aws-cdk-rds-proxy/dbCluster/SecurityGroup/from awscdkrdsproxydbClusterProxy2ProxySecurityGroup5B77853F:{IndirectPort}", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupIngress", + "aws:cdk:cloudformation:props": { "description": "Allow connections to the database Cluster from the Proxy", "fromPort": { "Fn::GetAtt": [ @@ -1178,9 +1216,10 @@ "GroupId" ] }, + "ipProtocol": "tcp", "sourceSecurityGroupId": { "Fn::GetAtt": [ - "ProxyProxySecurityGroupC42FC3CE", + "dbClusterProxy2ProxySecurityGroupB44507AE", "GroupId" ] }, @@ -1193,13 +1232,13 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroupIngress", + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", "version": "0.0.0" } }, @@ -1207,7 +1246,7 @@ "id": "AuroraPostgreSqlDatabaseClusterEngineDefaultParameterGroup", "path": "aws-cdk-rds-proxy/dbCluster/AuroraPostgreSqlDatabaseClusterEngineDefaultParameterGroup", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -1241,7 +1280,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret", + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", "version": "0.0.0" } }, @@ -1265,19 +1304,19 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-secretsmanager.CfnSecretTargetAttachment", + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecretTargetAttachment", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-secretsmanager.SecretTargetAttachment", + "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.DatabaseSecret", + "fqn": "aws-cdk-lib.aws_rds.DatabaseSecret", "version": "0.0.0" } }, @@ -1330,7 +1369,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.CfnDBCluster", + "fqn": "aws-cdk-lib.aws_rds.CfnDBCluster", "version": "0.0.0" } }, @@ -1351,7 +1390,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.CfnDBInstance", + "fqn": "aws-cdk-lib.aws_rds.CfnDBInstance", "version": "0.0.0" } }, @@ -1372,214 +1411,415 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.CfnDBInstance", + "fqn": "aws-cdk-lib.aws_rds.CfnDBInstance", "version": "0.0.0" } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-rds.DatabaseCluster", - "version": "0.0.0" - } - }, - "Proxy": { - "id": "Proxy", - "path": "aws-cdk-rds-proxy/Proxy", - "children": { - "IAMRole": { - "id": "IAMRole", - "path": "aws-cdk-rds-proxy/Proxy/IAMRole", + }, + "Proxy": { + "id": "Proxy", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy", "children": { - "ImportIAMRole": { - "id": "ImportIAMRole", - "path": "aws-cdk-rds-proxy/Proxy/IAMRole/ImportIAMRole", + "IAMRole": { + "id": "IAMRole", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy/IAMRole", + "children": { + "ImportIAMRole": { + "id": "ImportIAMRole", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy/IAMRole/ImportIAMRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy/IAMRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "rds.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy/IAMRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy/IAMRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "secretsmanager:DescribeSecret", + "secretsmanager:GetSecretValue" + ], + "Effect": "Allow", + "Resource": { + "Ref": "dbClusterSecretAttachmentAB67A752" + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "dbClusterProxyIAMRoleDefaultPolicyEEE23224", + "roles": [ + { + "Ref": "dbClusterProxyIAMRole693E39F5" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { - "fqn": "@aws-cdk/core.Resource", + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "ProxySecurityGroup": { + "id": "ProxySecurityGroup", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy/ProxySecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy/ProxySecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "SecurityGroup for Database Proxy", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "vpcA2121C38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", "version": "0.0.0" } }, "Resource": { "id": "Resource", - "path": "aws-cdk-rds-proxy/Proxy/IAMRole/Resource", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy/Resource", "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:type": "AWS::RDS::DBProxy", "aws:cdk:cloudformation:props": { - "assumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "rds.amazonaws.com" - } + "auth": [ + { + "authScheme": "SECRETS", + "iamAuth": "DISABLED", + "secretArn": { + "Ref": "dbClusterSecretAttachmentAB67A752" } - ], - "Version": "2012-10-17" - } + } + ], + "dbProxyName": "awscdkrdsproxydbClusterProxyE88930B6", + "engineFamily": "POSTGRESQL", + "requireTls": true, + "roleArn": { + "Fn::GetAtt": [ + "dbClusterProxyIAMRole693E39F5", + "Arn" + ] + }, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "dbClusterProxyProxySecurityGroup170F327D", + "GroupId" + ] + } + ], + "vpcSubnetIds": [ + { + "Ref": "vpcPrivateSubnet1Subnet934893E8" + }, + { + "Ref": "vpcPrivateSubnet2Subnet7031C2BA" + } + ] } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", + "fqn": "aws-cdk-lib.aws_rds.CfnDBProxy", "version": "0.0.0" } }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-rds-proxy/Proxy/IAMRole/DefaultPolicy", + "ProxyTargetGroup": { + "id": "ProxyTargetGroup", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy/ProxyTargetGroup", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBProxyTargetGroup", + "aws:cdk:cloudformation:props": { + "connectionPoolConfigurationInfo": {}, + "dbClusterIdentifiers": [ + { + "Ref": "dbClusterE86E47AE" + } + ], + "dbProxyName": { + "Ref": "dbClusterProxyAB5F8181" + }, + "targetGroupName": "default" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.CfnDBProxyTargetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.DatabaseProxy", + "version": "0.0.0" + } + }, + "Proxy2": { + "id": "Proxy2", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy2", + "children": { + "IAMRole": { + "id": "IAMRole", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy2/IAMRole", "children": { + "ImportIAMRole": { + "id": "ImportIAMRole", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy2/IAMRole/ImportIAMRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", - "path": "aws-cdk-rds-proxy/Proxy/IAMRole/DefaultPolicy/Resource", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy2/IAMRole/Resource", "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { - "policyDocument": { + "assumeRolePolicyDocument": { "Statement": [ { - "Action": [ - "secretsmanager:DescribeSecret", - "secretsmanager:GetSecretValue" - ], + "Action": "sts:AssumeRole", "Effect": "Allow", - "Resource": { - "Ref": "dbClusterSecretAttachmentAB67A752" + "Principal": { + "Service": "rds.amazonaws.com" } } ], "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy2/IAMRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy2/IAMRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "secretsmanager:DescribeSecret", + "secretsmanager:GetSecretValue" + ], + "Effect": "Allow", + "Resource": { + "Ref": "dbClusterSecretAttachmentAB67A752" + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "dbClusterProxy2IAMRoleDefaultPolicyFD9414D8", + "roles": [ + { + "Ref": "dbClusterProxy2IAMRole190D217C" + } + ] + } }, - "policyName": "ProxyIAMRoleDefaultPolicy59EB0117", - "roles": [ + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "ProxySecurityGroup": { + "id": "ProxySecurityGroup", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy2/ProxySecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy2/ProxySecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "SecurityGroup for Database Proxy", + "securityGroupEgress": [ { - "Ref": "ProxyIAMRole2FE8AB0F" + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" } - ] + ], + "vpcId": { + "Ref": "vpcA2121C38" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnPolicy", + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Policy", + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", "version": "0.0.0" } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "0.0.0" - } - }, - "ProxySecurityGroup": { - "id": "ProxySecurityGroup", - "path": "aws-cdk-rds-proxy/Proxy/ProxySecurityGroup", - "children": { + }, "Resource": { "id": "Resource", - "path": "aws-cdk-rds-proxy/Proxy/ProxySecurityGroup/Resource", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy2/Resource", "attributes": { - "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:type": "AWS::RDS::DBProxy", "aws:cdk:cloudformation:props": { - "groupDescription": "SecurityGroup for Database Proxy", - "securityGroupEgress": [ + "auth": [ { - "cidrIp": "0.0.0.0/0", - "description": "Allow all outbound traffic by default", - "ipProtocol": "-1" + "authScheme": "SECRETS", + "iamAuth": "DISABLED", + "secretArn": { + "Ref": "dbClusterSecretAttachmentAB67A752" + } } ], - "vpcId": { - "Ref": "vpcA2121C38" - } + "dbProxyName": "awscdkrdsproxydbClusterProxy27493E9A7", + "engineFamily": "POSTGRESQL", + "requireTls": true, + "roleArn": { + "Fn::GetAtt": [ + "dbClusterProxy2IAMRole190D217C", + "Arn" + ] + }, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "dbClusterProxy2ProxySecurityGroupB44507AE", + "GroupId" + ] + } + ], + "vpcSubnetIds": [ + { + "Ref": "vpcPrivateSubnet1Subnet934893E8" + }, + { + "Ref": "vpcPrivateSubnet2Subnet7031C2BA" + } + ] } }, "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "fqn": "aws-cdk-lib.aws_rds.CfnDBProxy", "version": "0.0.0" } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-ec2.SecurityGroup", - "version": "0.0.0" - } - }, - "Resource": { - "id": "Resource", - "path": "aws-cdk-rds-proxy/Proxy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::RDS::DBProxy", - "aws:cdk:cloudformation:props": { - "auth": [ - { - "authScheme": "SECRETS", - "iamAuth": "DISABLED", - "secretArn": { - "Ref": "dbClusterSecretAttachmentAB67A752" - } - } - ], - "dbProxyName": "cluster-db-proxy", - "engineFamily": "POSTGRESQL", - "roleArn": { - "Fn::GetAtt": [ - "ProxyIAMRole2FE8AB0F", - "Arn" - ] - }, - "vpcSubnetIds": [ - { - "Ref": "vpcPrivateSubnet1Subnet934893E8" - }, - { - "Ref": "vpcPrivateSubnet2Subnet7031C2BA" - } - ], - "requireTls": true, - "vpcSecurityGroupIds": [ - { - "Fn::GetAtt": [ - "ProxyProxySecurityGroupC42FC3CE", - "GroupId" - ] + }, + "ProxyTargetGroup": { + "id": "ProxyTargetGroup", + "path": "aws-cdk-rds-proxy/dbCluster/Proxy2/ProxyTargetGroup", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBProxyTargetGroup", + "aws:cdk:cloudformation:props": { + "connectionPoolConfigurationInfo": {}, + "dbClusterIdentifiers": [ + { + "Ref": "dbClusterE86E47AE" + } + ], + "dbProxyName": { + "Ref": "dbClusterProxy28BBD43D5" + }, + "targetGroupName": "default" } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-rds.CfnDBProxy", - "version": "0.0.0" - } - }, - "ProxyTargetGroup": { - "id": "ProxyTargetGroup", - "path": "aws-cdk-rds-proxy/Proxy/ProxyTargetGroup", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::RDS::DBProxyTargetGroup", - "aws:cdk:cloudformation:props": { - "dbProxyName": { - "Ref": "ProxyCB0DFB71" }, - "targetGroupName": "default", - "connectionPoolConfigurationInfo": {}, - "dbClusterIdentifiers": [ - { - "Ref": "dbClusterE86E47AE" - } - ] + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.CfnDBProxyTargetGroup", + "version": "0.0.0" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.CfnDBProxyTargetGroup", + "fqn": "aws-cdk-lib.aws_rds.DatabaseProxy", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-rds.DatabaseProxy", + "fqn": "aws-cdk-lib.aws_rds.DatabaseCluster", "version": "0.0.0" } }, @@ -1587,7 +1827,7 @@ "id": "BootstrapVersion", "path": "aws-cdk-rds-proxy/BootstrapVersion", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", + "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" } }, @@ -1595,13 +1835,13 @@ "id": "CheckBootstrapVersion", "path": "aws-cdk-rds-proxy/CheckBootstrapVersion", "constructInfo": { - "fqn": "@aws-cdk/core.CfnRule", + "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", + "fqn": "aws-cdk-lib.Stack", "version": "0.0.0" } }, @@ -1618,7 +1858,7 @@ "path": "database-proxy-integ-test/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.270" + "version": "10.3.0" } }, "DeployAssert": { @@ -1629,7 +1869,7 @@ "id": "BootstrapVersion", "path": "database-proxy-integ-test/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", + "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" } }, @@ -1637,25 +1877,25 @@ "id": "CheckBootstrapVersion", "path": "database-proxy-integ-test/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "@aws-cdk/core.CfnRule", + "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", + "fqn": "aws-cdk-lib.Stack", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/integ-tests.IntegTest", + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", "version": "0.0.0" } }, @@ -1664,12 +1904,12 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.270" + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", + "fqn": "aws-cdk-lib.App", "version": "0.0.0" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.ts index 3f3d83b4332dc..f293338ee941e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.proxy.ts @@ -27,6 +27,7 @@ new rds.DatabaseProxy(stack, 'dbProxy', { secrets: [dbInstance.secret!], proxyTarget: rds.ProxyTarget.fromInstance(dbInstance), vpc, + clientPasswordAuthType: rds.ClientPasswordAuthType.POSTGRES_SCRAM_SHA_256, }); const cluster = new rds.DatabaseCluster(stack, 'dbCluster', { @@ -36,9 +37,14 @@ const cluster = new rds.DatabaseCluster(stack, 'dbCluster', { instanceProps: { vpc }, }); -new rds.DatabaseProxy(stack, 'Proxy', { - dbProxyName: 'cluster-db-proxy', - proxyTarget: rds.ProxyTarget.fromCluster(cluster), +// The `DatabaseProxy` internally adds a dependency so that the `TargetGroup` is created after the `DatabaseCluster` is created. +// In this test, we use `addProxy` to add two `DatabaseProxy` as a child of `DatabaseCluster` +// and verify that they can be deployed correctly without circular dependencies. +cluster.addProxy('Proxy', { + secrets: [cluster.secret!], + vpc, +}); +cluster.addProxy('Proxy2', { secrets: [cluster.secret!], vpc, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/aws-cdk-rds-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/aws-cdk-rds-integ.assets.json new file mode 100644 index 0000000000000..f6fd03ebdf483 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/aws-cdk-rds-integ.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "39bf1ae788d29e6def2af02690b18b4dd491662b26b445a93f9b8994e6f18990": { + "source": { + "path": "aws-cdk-rds-integ.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "39bf1ae788d29e6def2af02690b18b4dd491662b26b445a93f9b8994e6f18990.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/aws-cdk-rds-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/aws-cdk-rds-integ.template.json new file mode 100644 index 0000000000000..e6f73b657f48c --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/aws-cdk-rds-integ.template.json @@ -0,0 +1,519 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VPCPublicSubnet1DefaultRoute91CEF279", + "VPCPublicSubnet1RouteTableAssociation0B0896DC" + ] + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PublicSubnet2" + } + ] + }, + "DependsOn": [ + "VPCPublicSubnet2DefaultRouteB7481BBA", + "VPCPublicSubnet2RouteTableAssociation5A808732" + ] + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "SubnetGroup": { + "Type": "AWS::RDS::DBSubnetGroup", + "Properties": { + "DBSubnetGroupDescription": "My Subnet Group", + "DBSubnetGroupName": "mynotlowercasesubnetgroupname", + "SubnetIds": [ + { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + ] + } + }, + "ServerlessDatabaseSecurityGroup1E143FBB": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "RDS security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "ServerlessDatabaseSecurityGroupfrom00000IndirectPortE0823E20": { + "Type": "AWS::EC2::SecurityGroupIngress", + "Properties": { + "CidrIp": "0.0.0.0/0", + "Description": "Open to the world", + "FromPort": { + "Fn::GetAtt": [ + "ServerlessDatabaseDF340AE1", + "Endpoint.Port" + ] + }, + "GroupId": { + "Fn::GetAtt": [ + "ServerlessDatabaseSecurityGroup1E143FBB", + "GroupId" + ] + }, + "IpProtocol": "tcp", + "ToPort": { + "Fn::GetAtt": [ + "ServerlessDatabaseDF340AE1", + "Endpoint.Port" + ] + } + } + }, + "ServerlessDatabaseDF340AE1": { + "Type": "AWS::RDS::DBCluster", + "Properties": { + "CopyTagsToSnapshot": true, + "DBClusterParameterGroupName": "default.aurora-mysql5.7", + "DBSubnetGroupName": { + "Ref": "SubnetGroup" + }, + "Engine": "aurora-mysql", + "EngineMode": "serverless", + "MasterUserPassword": "7959866cacc02c2d243ecfe177464fe6", + "MasterUsername": "admin", + "ScalingConfiguration": { + "AutoPause": true, + "MaxCapacity": 32, + "MinCapacity": 8, + "SecondsBeforeTimeout": 480, + "SecondsUntilAutoPause": 300, + "TimeoutAction": "ForceApplyCapacityChange" + }, + "StorageEncrypted": true, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ServerlessDatabaseSecurityGroup1E143FBB", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/clusterdualtestDefaultTestDeployAssert0AE5E6E0.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/clusterdualtestDefaultTestDeployAssert0AE5E6E0.assets.json new file mode 100644 index 0000000000000..232acc8646e99 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/clusterdualtestDefaultTestDeployAssert0AE5E6E0.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "clusterdualtestDefaultTestDeployAssert0AE5E6E0.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/clusterdualtestDefaultTestDeployAssert0AE5E6E0.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/clusterdualtestDefaultTestDeployAssert0AE5E6E0.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/clusterdualtestDefaultTestDeployAssert0AE5E6E0.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/integ.json new file mode 100644 index 0000000000000..039efe0554cd9 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "cluster-dual-test/DefaultTest": { + "stacks": [ + "aws-cdk-rds-integ" + ], + "assertionStack": "cluster-dual-test/DefaultTest/DeployAssert", + "assertionStackName": "clusterdualtestDefaultTestDeployAssert0AE5E6E0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/manifest.json new file mode 100644 index 0000000000000..08214114a2f09 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/manifest.json @@ -0,0 +1,269 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-cdk-rds-integ.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-rds-integ.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-rds-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-rds-integ.template.json", + "terminationProtection": false, + "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}/39bf1ae788d29e6def2af02690b18b4dd491662b26b445a93f9b8994e6f18990.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-rds-integ.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-cdk-rds-integ.assets" + ], + "metadata": { + "/aws-cdk-rds-integ/VPC/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCB9E5F0B4" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1SubnetB4246D30" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableFEE4B781" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1DefaultRoute91CEF279" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1EIP6AD938E8" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1NATGatewayE0556630" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2Subnet74179F39" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTable6F1A15F1" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTableAssociation5A808732" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2DefaultRouteB7481BBA" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2EIP4947BC00" + } + ], + "/aws-cdk-rds-integ/VPC/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2NATGateway3C070193" + } + ], + "/aws-cdk-rds-integ/VPC/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1Subnet8BCA10E0" + } + ], + "/aws-cdk-rds-integ/VPC/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableBE8A6027" + } + ], + "/aws-cdk-rds-integ/VPC/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" + } + ], + "/aws-cdk-rds-integ/VPC/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" + } + ], + "/aws-cdk-rds-integ/VPC/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ], + "/aws-cdk-rds-integ/VPC/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTable0A19E10E" + } + ], + "/aws-cdk-rds-integ/VPC/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" + } + ], + "/aws-cdk-rds-integ/VPC/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" + } + ], + "/aws-cdk-rds-integ/VPC/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCIGWB7E252D3" + } + ], + "/aws-cdk-rds-integ/VPC/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCVPCGW99B986DC" + } + ], + "/aws-cdk-rds-integ/SubnetGroup/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "SubnetGroup" + } + ], + "/aws-cdk-rds-integ/Serverless Database/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ServerlessDatabaseSecurityGroup1E143FBB" + } + ], + "/aws-cdk-rds-integ/Serverless Database/SecurityGroup/from 0.0.0.0_0:{IndirectPort}": [ + { + "type": "aws:cdk:logicalId", + "data": "ServerlessDatabaseSecurityGroupfrom00000IndirectPortE0823E20" + } + ], + "/aws-cdk-rds-integ/Serverless Database/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ServerlessDatabaseDF340AE1" + } + ], + "/aws-cdk-rds-integ/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-rds-integ/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-rds-integ" + }, + "clusterdualtestDefaultTestDeployAssert0AE5E6E0.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "clusterdualtestDefaultTestDeployAssert0AE5E6E0.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "clusterdualtestDefaultTestDeployAssert0AE5E6E0": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "clusterdualtestDefaultTestDeployAssert0AE5E6E0.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "clusterdualtestDefaultTestDeployAssert0AE5E6E0.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": [ + "clusterdualtestDefaultTestDeployAssert0AE5E6E0.assets" + ], + "metadata": { + "/cluster-dual-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/cluster-dual-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "cluster-dual-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/tree.json new file mode 100644 index 0000000000000..fe6a5aac12724 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.js.snapshot/tree.json @@ -0,0 +1,902 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-rds-integ": { + "id": "aws-cdk-rds-integ", + "path": "aws-cdk-rds-integ", + "children": { + "VPC": { + "id": "VPC", + "path": "aws-cdk-rds-integ/VPC", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-integ/VPC/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-rds-integ/VPC/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-rds-integ/VPC/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "aws-cdk-rds-integ/VPC/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-rds-integ/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "aws-cdk-rds-integ/VPC/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "internetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" + } + }, + "SubnetGroup": { + "id": "SubnetGroup", + "path": "aws-cdk-rds-integ/SubnetGroup", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-rds-integ/SubnetGroup/Default", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBSubnetGroup", + "aws:cdk:cloudformation:props": { + "dbSubnetGroupDescription": "My Subnet Group", + "dbSubnetGroupName": "mynotlowercasesubnetgroupname", + "subnetIds": [ + { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.CfnDBSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.SubnetGroup", + "version": "0.0.0" + } + }, + "Serverless Database": { + "id": "Serverless Database", + "path": "aws-cdk-rds-integ/Serverless Database", + "children": { + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-cdk-rds-integ/Serverless Database/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-integ/Serverless Database/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "RDS security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + }, + "from 0.0.0.0_0:{IndirectPort}": { + "id": "from 0.0.0.0_0:{IndirectPort}", + "path": "aws-cdk-rds-integ/Serverless Database/SecurityGroup/from 0.0.0.0_0:{IndirectPort}", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupIngress", + "aws:cdk:cloudformation:props": { + "cidrIp": "0.0.0.0/0", + "description": "Open to the world", + "fromPort": { + "Fn::GetAtt": [ + "ServerlessDatabaseDF340AE1", + "Endpoint.Port" + ] + }, + "groupId": { + "Fn::GetAtt": [ + "ServerlessDatabaseSecurityGroup1E143FBB", + "GroupId" + ] + }, + "ipProtocol": "tcp", + "toPort": { + "Fn::GetAtt": [ + "ServerlessDatabaseDF340AE1", + "Endpoint.Port" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "AuroraMySqlDatabaseClusterEngineDefaultParameterGroup": { + "id": "AuroraMySqlDatabaseClusterEngineDefaultParameterGroup", + "path": "aws-cdk-rds-integ/Serverless Database/AuroraMySqlDatabaseClusterEngineDefaultParameterGroup", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-rds-integ/Serverless Database/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBCluster", + "aws:cdk:cloudformation:props": { + "copyTagsToSnapshot": true, + "dbClusterParameterGroupName": "default.aurora-mysql5.7", + "dbSubnetGroupName": { + "Ref": "SubnetGroup" + }, + "engine": "aurora-mysql", + "engineMode": "serverless", + "masterUsername": "admin", + "masterUserPassword": "7959866cacc02c2d243ecfe177464fe6", + "scalingConfiguration": { + "autoPause": true, + "minCapacity": 8, + "maxCapacity": 32, + "secondsUntilAutoPause": 300, + "secondsBeforeTimeout": 480, + "timeoutAction": "ForceApplyCapacityChange" + }, + "storageEncrypted": true, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ServerlessDatabaseSecurityGroup1E143FBB", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.CfnDBCluster", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_rds.ServerlessCluster", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-rds-integ/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-rds-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "cluster-dual-test": { + "id": "cluster-dual-test", + "path": "cluster-dual-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "cluster-dual-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "cluster-dual-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "cluster-dual-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "cluster-dual-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "cluster-dual-test/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.ts new file mode 100644 index 0000000000000..8b2ca217e20b6 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.serverless-cluster-scaling.ts @@ -0,0 +1,44 @@ +import * as ec2 from 'aws-cdk-lib/aws-ec2'; +import * as cdk from 'aws-cdk-lib'; +import * as rds from 'aws-cdk-lib/aws-rds'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-cdk-rds-integ'); + +const vpc = new ec2.Vpc(stack, 'VPC', { + restrictDefaultSecurityGroup: false, + maxAzs: 2, +}); +const subnetGroup = new rds.SubnetGroup(stack, 'SubnetGroup', { + vpc, + vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC }, + description: 'My Subnet Group', + subnetGroupName: 'MyNotLowerCaseSubnetGroupName', +}); + +const cluster = new rds.ServerlessCluster(stack, 'Serverless Database', { + engine: rds.DatabaseClusterEngine.AURORA_MYSQL, + credentials: { + username: 'admin', + password: cdk.SecretValue.unsafePlainText('7959866cacc02c2d243ecfe177464fe6'), + }, + vpc, + vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC }, + subnetGroup, + removalPolicy: cdk.RemovalPolicy.DESTROY, + scaling: { + autoPause: cdk.Duration.minutes(5), + minCapacity: rds.AuroraCapacityUnit.ACU_8, + maxCapacity: rds.AuroraCapacityUnit.ACU_32, + timeoutAction: rds.TimeoutAction.FORCE_APPLY_CAPACITY_CHANGE, + timeout: cdk.Duration.minutes(8), + }, +}); +cluster.connections.allowDefaultPortFromAnyIpv4('Open to the world'); + +new IntegTest(app, 'cluster-dual-test', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emr/integ.emr-create-cluster-with-spot-instance-fleet.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emr/integ.emr-create-cluster-with-spot-instance-fleet.ts index ea24bac23c2d9..ecbdf872a134f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emr/integ.emr-create-cluster-with-spot-instance-fleet.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emr/integ.emr-create-cluster-with-spot-instance-fleet.ts @@ -1,5 +1,5 @@ import * as sfn from 'aws-cdk-lib/aws-stepfunctions'; -import { App, Stack } from 'aws-cdk-lib'; +import { App, Duration, Stack } from 'aws-cdk-lib'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import { EmrCreateCluster } from 'aws-cdk-lib/aws-stepfunctions-tasks'; @@ -20,7 +20,7 @@ const step = new EmrCreateCluster(stack, 'EmrCreateCluster', { spotSpecification: { allocationStrategy: EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED, timeoutAction: EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER, - timeoutDurationMinutes: 60, + timeout: Duration.minutes(60), }, }, name: 'Master', diff --git a/packages/@aws-cdk/app-staging-synthesizer-alpha/LICENSE b/packages/@aws-cdk/app-staging-synthesizer-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/app-staging-synthesizer-alpha/LICENSE +++ b/packages/@aws-cdk/app-staging-synthesizer-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/app-staging-synthesizer-alpha/NOTICE b/packages/@aws-cdk/app-staging-synthesizer-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/app-staging-synthesizer-alpha/NOTICE +++ b/packages/@aws-cdk/app-staging-synthesizer-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-amplify-alpha/LICENSE b/packages/@aws-cdk/aws-amplify-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/LICENSE +++ b/packages/@aws-cdk/aws-amplify-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-amplify-alpha/NOTICE b/packages/@aws-cdk/aws-amplify-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/NOTICE +++ b/packages/@aws-cdk/aws-amplify-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-appconfig-alpha/LICENSE b/packages/@aws-cdk/aws-appconfig-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-appconfig-alpha/LICENSE +++ b/packages/@aws-cdk/aws-appconfig-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-appconfig-alpha/NOTICE b/packages/@aws-cdk/aws-appconfig-alpha/NOTICE index b1adfdf58a098..56040a5ac6498 100644 --- a/packages/@aws-cdk/aws-appconfig-alpha/NOTICE +++ b/packages/@aws-cdk/aws-appconfig-alpha/NOTICE @@ -1,5 +1,5 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. ------------------------------------------------------------------------------- diff --git a/packages/@aws-cdk/aws-apprunner-alpha/LICENSE b/packages/@aws-cdk/aws-apprunner-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-apprunner-alpha/LICENSE +++ b/packages/@aws-cdk/aws-apprunner-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-apprunner-alpha/NOTICE b/packages/@aws-cdk/aws-apprunner-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-apprunner-alpha/NOTICE +++ b/packages/@aws-cdk/aws-apprunner-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-cloud9-alpha/LICENSE b/packages/@aws-cdk/aws-cloud9-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-cloud9-alpha/LICENSE +++ b/packages/@aws-cdk/aws-cloud9-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-cloud9-alpha/NOTICE b/packages/@aws-cdk/aws-cloud9-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-cloud9-alpha/NOTICE +++ b/packages/@aws-cdk/aws-cloud9-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-codestar-alpha/LICENSE b/packages/@aws-cdk/aws-codestar-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-codestar-alpha/LICENSE +++ b/packages/@aws-cdk/aws-codestar-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-codestar-alpha/NOTICE b/packages/@aws-cdk/aws-codestar-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-codestar-alpha/NOTICE +++ b/packages/@aws-cdk/aws-codestar-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-cognito-identitypool-alpha/LICENSE b/packages/@aws-cdk/aws-cognito-identitypool-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-cognito-identitypool-alpha/LICENSE +++ b/packages/@aws-cdk/aws-cognito-identitypool-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-cognito-identitypool-alpha/NOTICE b/packages/@aws-cdk/aws-cognito-identitypool-alpha/NOTICE index 5efb94182cd88..1db36033b0c04 100644 --- a/packages/@aws-cdk/aws-cognito-identitypool-alpha/NOTICE +++ b/packages/@aws-cdk/aws-cognito-identitypool-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. \ No newline at end of file +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. \ No newline at end of file diff --git a/packages/@aws-cdk/aws-gamelift-alpha/LICENSE b/packages/@aws-cdk/aws-gamelift-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/LICENSE +++ b/packages/@aws-cdk/aws-gamelift-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-gamelift-alpha/NOTICE b/packages/@aws-cdk/aws-gamelift-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/NOTICE +++ b/packages/@aws-cdk/aws-gamelift-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-glue-alpha/LICENSE b/packages/@aws-cdk/aws-glue-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-glue-alpha/LICENSE +++ b/packages/@aws-cdk/aws-glue-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-glue-alpha/NOTICE b/packages/@aws-cdk/aws-glue-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-glue-alpha/NOTICE +++ b/packages/@aws-cdk/aws-glue-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-glue-alpha/README.md b/packages/@aws-cdk/aws-glue-alpha/README.md index cbbea0b1dbf84..67018d6559724 100644 --- a/packages/@aws-cdk/aws-glue-alpha/README.md +++ b/packages/@aws-cdk/aws-glue-alpha/README.md @@ -202,7 +202,10 @@ See [documentation](https://docs.aws.amazon.com/glue/latest/dg/encryption-securi A `Database` is a logical grouping of `Tables` in the Glue Catalog. ```ts -new glue.Database(this, 'MyDatabase'); +new glue.Database(this, 'MyDatabase', { + databaseName: 'my_database', + description: 'my_database_description', +}); ``` ## Table @@ -263,6 +266,24 @@ new glue.S3Table(this, 'MyTable', { }); ``` +Glue tables can also be configured to contain user-defined table properties through the [`parameters`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters) property: + +```ts +declare const myDatabase: glue.Database; +new glue.S3Table(this, 'MyTable', { + parameters: { + key1: 'val1', + key2: 'val2', + }, + database: myDatabase, + columns: [{ + name: 'col1', + type: glue.Schema.STRING, + }], + dataFormat: glue.DataFormat.JSON, +}); +``` + ### Partition Keys To improve query performance, a table can specify `partitionKeys` on which data is stored and queried separately. For example, you might partition a table by `year` and `month` to optimize queries based on a time window: diff --git a/packages/@aws-cdk/aws-glue-alpha/lib/database.ts b/packages/@aws-cdk/aws-glue-alpha/lib/database.ts index 8368caa0c89a5..6b208b3fdfecd 100644 --- a/packages/@aws-cdk/aws-glue-alpha/lib/database.ts +++ b/packages/@aws-cdk/aws-glue-alpha/lib/database.ts @@ -43,6 +43,13 @@ export interface DatabaseProps { * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html */ readonly locationUri?: string; + + /** + * A description of the database. + * + * @default - no database description + */ + readonly description?: string; } /** @@ -96,8 +103,13 @@ export class Database extends Resource implements IDatabase { }), }); + if (props.description !== undefined) { + validateDescription(props.description); + } + let databaseInput: CfnDatabase.DatabaseInputProperty = { name: this.physicalName, + description: props.description, }; if (props.locationUri !== undefined) { @@ -133,6 +145,12 @@ export class Database extends Resource implements IDatabase { function validateLocationUri(locationUri: string): void { if (locationUri.length < 1 || locationUri.length > 1024) { - throw new Error(`locationUri length must be (inclusively) between 1 and 1024, but was ${locationUri.length}`); + throw new Error(`locationUri length must be (inclusively) between 1 and 1024, got ${locationUri.length}`); + } +} + +function validateDescription(description: string): void { + if (description.length > 2048) { + throw new Error(`description length must be less than or equal to 2048, got ${description.length}`); } } diff --git a/packages/@aws-cdk/aws-glue-alpha/lib/external-table.ts b/packages/@aws-cdk/aws-glue-alpha/lib/external-table.ts index eacfcdb99b38e..38bb5b28e5919 100644 --- a/packages/@aws-cdk/aws-glue-alpha/lib/external-table.ts +++ b/packages/@aws-cdk/aws-glue-alpha/lib/external-table.ts @@ -69,6 +69,7 @@ export class ExternalTable extends TableBase { 'has_encrypted_data': true, 'partition_filtering.enabled': props.enablePartitionFiltering, 'connectionName': props.connection.connectionName, + ...props.parameters, }, storageDescriptor: { location: props.externalDataLocation, diff --git a/packages/@aws-cdk/aws-glue-alpha/lib/s3-table.ts b/packages/@aws-cdk/aws-glue-alpha/lib/s3-table.ts index 56c81e4e473c4..49d56abdd5968 100644 --- a/packages/@aws-cdk/aws-glue-alpha/lib/s3-table.ts +++ b/packages/@aws-cdk/aws-glue-alpha/lib/s3-table.ts @@ -141,6 +141,7 @@ export class S3Table extends TableBase { 'classification': props.dataFormat.classificationString?.value, 'has_encrypted_data': true, 'partition_filtering.enabled': props.enablePartitionFiltering, + ...this.parameters, }, storageDescriptor: { location: `s3://${this.bucket.bucketName}/${this.s3Prefix}`, diff --git a/packages/@aws-cdk/aws-glue-alpha/lib/table-base.ts b/packages/@aws-cdk/aws-glue-alpha/lib/table-base.ts index e77875c6c75e3..b313ae72885c2 100644 --- a/packages/@aws-cdk/aws-glue-alpha/lib/table-base.ts +++ b/packages/@aws-cdk/aws-glue-alpha/lib/table-base.ts @@ -147,6 +147,16 @@ export interface TableBaseProps { * @default - The parameter is not defined */ readonly storageParameters?: StorageParameter[]; + + /** + * The key/value pairs define properties associated with the table. + * The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed. + * + * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters + * + * @default - The parameter is not defined + */ + readonly parameters?: { [key: string]: string } } /** @@ -214,6 +224,12 @@ export abstract class TableBase extends Resource implements ITable { */ public readonly storageParameters?: StorageParameter[]; + /** + * The tables' properties associated with the table. + * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters + */ + protected readonly parameters: { [key: string]: string } + /** * Partition indexes must be created one at a time. To avoid * race conditions, we store the resource and add dependencies @@ -236,6 +252,7 @@ export abstract class TableBase extends Resource implements ITable { this.columns = props.columns; this.partitionKeys = props.partitionKeys; this.storageParameters = props.storageParameters; + this.parameters = props.parameters ?? {}; this.compressed = props.compressed ?? false; } diff --git a/packages/@aws-cdk/aws-glue-alpha/test/database.test.ts b/packages/@aws-cdk/aws-glue-alpha/test/database.test.ts index 5acb1e88f09c2..2379c07071808 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/database.test.ts +++ b/packages/@aws-cdk/aws-glue-alpha/test/database.test.ts @@ -58,6 +58,29 @@ test('explicit locationURI', () => { }); +test('explicit description', () => { + new glue.Database(stack, 'Database', { + description: 'database-description', + }); + + Template.fromStack(stack).templateMatches({ + Resources: { + DatabaseB269D8BB: { + Type: 'AWS::Glue::Database', + Properties: { + CatalogId: { + Ref: 'AWS::AccountId', + }, + DatabaseInput: { + Description: 'database-description', + Name: 'database', + }, + }, + }, + }, + }); +}); + test('fromDatabase', () => { // WHEN const database = glue.Database.fromDatabaseArn(stack, 'import', 'arn:aws:glue:us-east-1:123456789012:database/db1'); @@ -85,7 +108,15 @@ test('locationUri length must be <= 1024', () => { new glue.Database(stack, 'Database', { locationUri: 'a'.repeat(1025), }), - ).toThrow(); + ).toThrow('locationUri length must be (inclusively) between 1 and 1024, got 1025'); +}); + +test('description length must be <= 2048', () => { + expect(() => + new glue.Database(stack, 'Database', { + description: 'a'.repeat(2049), + }), + ).toThrow('description length must be less than or equal to 2048, got 2049'); }); test('can specify a physical name', () => { diff --git a/packages/@aws-cdk/aws-glue-alpha/test/external-table.test.ts b/packages/@aws-cdk/aws-glue-alpha/test/external-table.test.ts index 012722e050ebc..68aac264d2d35 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/external-table.test.ts +++ b/packages/@aws-cdk/aws-glue-alpha/test/external-table.test.ts @@ -1066,6 +1066,47 @@ test('can associate an external location with the glue table', () => { }); }); +test('can specify table parameter', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack'); + const database = new glue.Database(stack, 'Database'); + const connection = new glue.Connection(stack, 'Connection', { + connectionName: 'my_connection', + type: glue.ConnectionType.JDBC, + properties: { + JDBC_CONNECTION_URL: 'jdbc:server://server:443/connection', + USERNAME: 'username', + PASSWORD: 'password', + }, + }); + new glue.ExternalTable(stack, 'Table', { + database, + tableName: 'my_table', + connection, + columns: [{ + name: 'col', + type: glue.Schema.STRING, + }], + dataFormat: glue.DataFormat.JSON, + externalDataLocation, + parameters: { + key1: 'val1', + key2: 'val2', + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Glue::Table', { + TableInput: { + Parameters: { + key1: 'val1', + key2: 'val2', + classification: 'json', + has_encrypted_data: true, + }, + }, + }); +}); + function createTable(props: Pick>): void { const stack = new cdk.Stack(); const connection = new glue.Connection(stack, 'Connection', { diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/aws-cdk-glue.assets.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/aws-cdk-glue.assets.json index e08d0476521bf..d8eee410e2343 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/aws-cdk-glue.assets.json +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/aws-cdk-glue.assets.json @@ -1,7 +1,7 @@ { "version": "34.0.0", "files": { - "7a0cca4ed21fb1c6d9b050e5fd7c8d857b13af8ef7b8cead40cd08d2e25fc892": { + "da03946f3d9f7502490ea840d2b597db3ee9912d25cfc58e27cd53a0432b663e": { "source": { "path": "aws-cdk-glue.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7a0cca4ed21fb1c6d9b050e5fd7c8d857b13af8ef7b8cead40cd08d2e25fc892.json", + "objectKey": "da03946f3d9f7502490ea840d2b597db3ee9912d25cfc58e27cd53a0432b663e.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-glue-alpha/test/integ.table.js.snapshot/aws-cdk-glue.template.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/aws-cdk-glue.template.json index 75020f0d007ad..f55cb568118b6 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/aws-cdk-glue.template.json +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/aws-cdk-glue.template.json @@ -12,6 +12,7 @@ "Ref": "AWS::AccountId" }, "DatabaseInput": { + "Description": "my_database_description", "Name": "my_database" } } @@ -623,6 +624,72 @@ } } }, + "MyTableWithParametersTable39568AB8": { + "Type": "AWS::Glue::Table", + "Properties": { + "CatalogId": { + "Ref": "AWS::AccountId" + }, + "DatabaseName": { + "Ref": "MyDatabase1E2517DB" + }, + "TableInput": { + "Description": "table_with_parameters generated by CDK", + "Name": "table_with_parameters", + "Parameters": { + "classification": "json", + "has_encrypted_data": true, + "key1": "val1", + "key2": "val2" + }, + "StorageDescriptor": { + "Columns": [ + { + "Name": "col1", + "Type": "string" + }, + { + "Comment": "col2 comment", + "Name": "col2", + "Type": "string" + }, + { + "Name": "col3", + "Type": "array" + }, + { + "Name": "col4", + "Type": "map" + }, + { + "Name": "col5", + "Type": "struct" + } + ], + "Compressed": false, + "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", + "Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "DataBucketE3889A50" + }, + "/" + ] + ] + }, + "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", + "SerdeInfo": { + "SerializationLibrary": "org.openx.data.jsonserde.JsonSerDe" + }, + "StoredAsSubDirectories": false + }, + "TableType": "EXTERNAL_TABLE" + } + } + }, "MyDeprecatedTableAA0364FD": { "Type": "AWS::Glue::Table", "Properties": { diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/manifest.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/manifest.json index d511e7b0795fb..7fed09b87ad66 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/manifest.json @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-cdk-glue.template.json", + "terminationProtection": false, "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}/7a0cca4ed21fb1c6d9b050e5fd7c8d857b13af8ef7b8cead40cd08d2e25fc892.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/da03946f3d9f7502490ea840d2b597db3ee9912d25cfc58e27cd53a0432b663e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -105,6 +106,12 @@ "data": "MyTableWithStorageDescriptorParametersTable1A347345" } ], + "/aws-cdk-glue/MyTableWithParameters/Table": [ + { + "type": "aws:cdk:logicalId", + "data": "MyTableWithParametersTable39568AB8" + } + ], "/aws-cdk-glue/MyDeprecatedTable/Table": [ { "type": "aws:cdk:logicalId", @@ -146,24 +153,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "MyConnection5621880D": [ - { - "type": "aws:cdk:logicalId", - "data": "MyConnection5621880D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "MyTableWithCustomLocationTable43A19D42": [ - { - "type": "aws:cdk:logicalId", - "data": "MyTableWithCustomLocationTable43A19D42", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "aws-cdk-glue" @@ -181,6 +170,7 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "awscdkgluetableintegDefaultTestDeployAssert8BFB5B70.template.json", + "terminationProtection": false, "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}", diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/tree.json b/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/tree.json index ca372333c5ca8..9b5807f68bb18 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.table.js.snapshot/tree.json @@ -44,7 +44,8 @@ "Ref": "AWS::AccountId" }, "databaseInput": { - "name": "my_database" + "name": "my_database", + "description": "my_database_description" } } }, @@ -842,6 +843,90 @@ "version": "0.0.0" } }, + "MyTableWithParameters": { + "id": "MyTableWithParameters", + "path": "aws-cdk-glue/MyTableWithParameters", + "children": { + "Table": { + "id": "Table", + "path": "aws-cdk-glue/MyTableWithParameters/Table", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Glue::Table", + "aws:cdk:cloudformation:props": { + "catalogId": { + "Ref": "AWS::AccountId" + }, + "databaseName": { + "Ref": "MyDatabase1E2517DB" + }, + "tableInput": { + "name": "table_with_parameters", + "description": "table_with_parameters generated by CDK", + "parameters": { + "classification": "json", + "has_encrypted_data": true, + "key1": "val1", + "key2": "val2" + }, + "storageDescriptor": { + "location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "DataBucketE3889A50" + }, + "/" + ] + ] + }, + "compressed": false, + "storedAsSubDirectories": false, + "columns": [ + { + "name": "col1", + "type": "string" + }, + { + "name": "col2", + "type": "string", + "comment": "col2 comment" + }, + { + "name": "col3", + "type": "array" + }, + { + "name": "col4", + "type": "map" + }, + { + "name": "col5", + "type": "struct" + } + ], + "inputFormat": "org.apache.hadoop.mapred.TextInputFormat", + "outputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", + "serdeInfo": { + "serializationLibrary": "org.openx.data.jsonserde.JsonSerDe" + } + }, + "tableType": "EXTERNAL_TABLE" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_glue.CfnTable", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-glue-alpha.S3Table", + "version": "0.0.0" + } + }, "MyDeprecatedTable": { "id": "MyDeprecatedTable", "path": "aws-cdk-glue/MyDeprecatedTable", diff --git a/packages/@aws-cdk/aws-glue-alpha/test/integ.table.ts b/packages/@aws-cdk/aws-glue-alpha/test/integ.table.ts index 7c175b5bfa3bc..250cf6ee3fedb 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/integ.table.ts +++ b/packages/@aws-cdk/aws-glue-alpha/test/integ.table.ts @@ -16,6 +16,7 @@ const bucket = new s3.Bucket(stack, 'DataBucket', { const database = new glue.Database(stack, 'MyDatabase', { databaseName: 'my_database', + description: 'my_database_description', }); const columns = [{ @@ -124,6 +125,18 @@ new glue.S3Table(stack, 'MyTableWithStorageDescriptorParameters', { ], }); +new glue.S3Table(stack, 'MyTableWithParameters', { + database, + bucket, + tableName: 'table_with_parameters', + columns, + dataFormat: glue.DataFormat.JSON, + parameters: { + key1: 'val1', + key2: 'val2', + }, +}); + new glue.Table(stack, 'MyDeprecatedTable', { database, bucket, diff --git a/packages/@aws-cdk/aws-glue-alpha/test/s3-table.test.ts b/packages/@aws-cdk/aws-glue-alpha/test/s3-table.test.ts index c5e498ad61c41..dd228f1c8336a 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/s3-table.test.ts +++ b/packages/@aws-cdk/aws-glue-alpha/test/s3-table.test.ts @@ -1095,6 +1095,36 @@ describe('validate', () => { }); }); +test('can specify table parameter', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack'); + const database = new glue.Database(stack, 'Database'); + const dataFormat = glue.DataFormat.JSON; + new glue.S3Table(stack, 'Table', { + database, + columns: [{ + name: 'col', + type: glue.Schema.STRING, + }], + dataFormat, + parameters: { + key1: 'val1', + key2: 'val2', + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Glue::Table', { + TableInput: { + Parameters: { + key1: 'val1', + key2: 'val2', + classification: 'json', + has_encrypted_data: true, + }, + }, + }); +}); + function createTable(props: Pick>): void { const stack = new cdk.Stack(); new glue.S3Table(stack, 'table', { diff --git a/packages/@aws-cdk/aws-glue-alpha/test/table-base.test.ts b/packages/@aws-cdk/aws-glue-alpha/test/table-base.test.ts index d39345c288f24..abc837d19f225 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/table-base.test.ts +++ b/packages/@aws-cdk/aws-glue-alpha/test/table-base.test.ts @@ -674,6 +674,34 @@ test('data format without classification string', () => { }); }); +test('can specify table parameter', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack'); + const database = new glue.Database(stack, 'Database'); + const dataFormat = glue.DataFormat.JSON; + new glue.S3Table(stack, 'Table', { + database, + columns: [{ + name: 'col', + type: glue.Schema.STRING, + }], + dataFormat, + parameters: { + key1: 'val1', + key2: 'val2', + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Glue::Table', { + TableInput: { + Parameters: { + key1: 'val1', + key2: 'val2', + }, + }, + }); +}); + function createTable(props: Pick>): void { const stack = new cdk.Stack(); new glue.S3Table(stack, 'table', { diff --git a/packages/@aws-cdk/aws-iot-actions-alpha/LICENSE b/packages/@aws-cdk/aws-iot-actions-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-iot-actions-alpha/LICENSE +++ b/packages/@aws-cdk/aws-iot-actions-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-iot-actions-alpha/NOTICE b/packages/@aws-cdk/aws-iot-actions-alpha/NOTICE index 096ec7d8eb081..54241f6b2f921 100644 --- a/packages/@aws-cdk/aws-iot-actions-alpha/NOTICE +++ b/packages/@aws-cdk/aws-iot-actions-alpha/NOTICE @@ -1,5 +1,5 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. ------------------------------------------------------------------------------- diff --git a/packages/@aws-cdk/aws-iot-alpha/LICENSE b/packages/@aws-cdk/aws-iot-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-iot-alpha/LICENSE +++ b/packages/@aws-cdk/aws-iot-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-iot-alpha/NOTICE b/packages/@aws-cdk/aws-iot-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-iot-alpha/NOTICE +++ b/packages/@aws-cdk/aws-iot-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-iotevents-actions-alpha/LICENSE b/packages/@aws-cdk/aws-iotevents-actions-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-iotevents-actions-alpha/LICENSE +++ b/packages/@aws-cdk/aws-iotevents-actions-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-iotevents-actions-alpha/NOTICE b/packages/@aws-cdk/aws-iotevents-actions-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-iotevents-actions-alpha/NOTICE +++ b/packages/@aws-cdk/aws-iotevents-actions-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-iotevents-alpha/LICENSE b/packages/@aws-cdk/aws-iotevents-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-iotevents-alpha/LICENSE +++ b/packages/@aws-cdk/aws-iotevents-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-iotevents-alpha/NOTICE b/packages/@aws-cdk/aws-iotevents-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-iotevents-alpha/NOTICE +++ b/packages/@aws-cdk/aws-iotevents-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-ivs-alpha/LICENSE b/packages/@aws-cdk/aws-ivs-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-ivs-alpha/LICENSE +++ b/packages/@aws-cdk/aws-ivs-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-ivs-alpha/NOTICE b/packages/@aws-cdk/aws-ivs-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-ivs-alpha/NOTICE +++ b/packages/@aws-cdk/aws-ivs-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/LICENSE b/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/LICENSE +++ b/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/NOTICE b/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/NOTICE +++ b/packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/LICENSE b/packages/@aws-cdk/aws-kinesisfirehose-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/LICENSE +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/NOTICE b/packages/@aws-cdk/aws-kinesisfirehose-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/NOTICE +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/LICENSE b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/LICENSE +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/NOTICE b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/NOTICE +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-lambda-go-alpha/LICENSE b/packages/@aws-cdk/aws-lambda-go-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-lambda-go-alpha/LICENSE +++ b/packages/@aws-cdk/aws-lambda-go-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-lambda-go-alpha/NOTICE b/packages/@aws-cdk/aws-lambda-go-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-lambda-go-alpha/NOTICE +++ b/packages/@aws-cdk/aws-lambda-go-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-lambda-go-alpha/lib/bundling.ts b/packages/@aws-cdk/aws-lambda-go-alpha/lib/bundling.ts index f219915c068f3..de91e04bb360d 100644 --- a/packages/@aws-cdk/aws-lambda-go-alpha/lib/bundling.ts +++ b/packages/@aws-cdk/aws-lambda-go-alpha/lib/bundling.ts @@ -209,7 +209,7 @@ export class Bundling implements cdk.BundlingOptions { const goBuildCommand: string = [ 'go', 'build', hasVendor ? '-mod=vendor': '', - '-o', `${pathJoin(outputDir, 'bootstrap')}`, + '-o', `"${pathJoin(outputDir, 'bootstrap')}"`, `${this.props.goBuildFlags ? this.props.goBuildFlags.join(' ') : ''}`, `${this.relativeEntryPath.replace(/\\/g, '/')}`, ].filter(c => !!c).join(' '); diff --git a/packages/@aws-cdk/aws-lambda-go-alpha/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-go-alpha/test/bundling.test.ts index 3fdf7aa467f5f..f9a8559add078 100644 --- a/packages/@aws-cdk/aws-lambda-go-alpha/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-go-alpha/test/bundling.test.ts @@ -53,7 +53,7 @@ test('bundling', () => { command: [ 'bash', '-c', [ - 'go build -o /asset-output/bootstrap ./cmd/api', + 'go build -o "/asset-output/bootstrap" ./cmd/api', ].join(' && '), ], }), @@ -81,7 +81,7 @@ test('bundling with file as entry', () => { command: [ 'bash', '-c', [ - 'go build -o /asset-output/bootstrap ./main.go', + 'go build -o "/asset-output/bootstrap" ./main.go', ].join(' && '), ], }), @@ -102,7 +102,7 @@ test('bundling with file in subdirectory as entry', () => { command: [ 'bash', '-c', [ - 'go build -o /asset-output/bootstrap ./cmd/api/main.go', + 'go build -o "/asset-output/bootstrap" ./cmd/api/main.go', ].join(' && '), ], }), @@ -123,7 +123,7 @@ test('bundling with file other than main.go in subdirectory as entry', () => { command: [ 'bash', '-c', [ - 'go build -o /asset-output/bootstrap ./cmd/api/api.go', + 'go build -o "/asset-output/bootstrap" ./cmd/api/api.go', ].join(' && '), ], }), @@ -265,7 +265,7 @@ test('Go build flags can be passed', () => { command: [ 'bash', '-c', [ - 'go build -o /asset-output/bootstrap -ldflags "-s -w" ./cmd/api', + 'go build -o "/asset-output/bootstrap" -ldflags "-s -w" ./cmd/api', ].join(' && '), ], }), @@ -297,7 +297,7 @@ test('AssetHashType can be specified', () => { command: [ 'bash', '-c', [ - 'go build -o /asset-output/bootstrap ./cmd/api', + 'go build -o "/asset-output/bootstrap" ./cmd/api', ].join(' && '), ], }), diff --git a/packages/@aws-cdk/aws-lambda-python-alpha/LICENSE b/packages/@aws-cdk/aws-lambda-python-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-lambda-python-alpha/LICENSE +++ b/packages/@aws-cdk/aws-lambda-python-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-lambda-python-alpha/NOTICE b/packages/@aws-cdk/aws-lambda-python-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-lambda-python-alpha/NOTICE +++ b/packages/@aws-cdk/aws-lambda-python-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-location-alpha/LICENSE b/packages/@aws-cdk/aws-location-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-location-alpha/LICENSE +++ b/packages/@aws-cdk/aws-location-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-location-alpha/NOTICE b/packages/@aws-cdk/aws-location-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-location-alpha/NOTICE +++ b/packages/@aws-cdk/aws-location-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-msk-alpha/LICENSE b/packages/@aws-cdk/aws-msk-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-msk-alpha/LICENSE +++ b/packages/@aws-cdk/aws-msk-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-msk-alpha/NOTICE b/packages/@aws-cdk/aws-msk-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-msk-alpha/NOTICE +++ b/packages/@aws-cdk/aws-msk-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-neptune-alpha/LICENSE b/packages/@aws-cdk/aws-neptune-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/LICENSE +++ b/packages/@aws-cdk/aws-neptune-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-neptune-alpha/NOTICE b/packages/@aws-cdk/aws-neptune-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/NOTICE +++ b/packages/@aws-cdk/aws-neptune-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-redshift-alpha/LICENSE b/packages/@aws-cdk/aws-redshift-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/LICENSE +++ b/packages/@aws-cdk/aws-redshift-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-redshift-alpha/NOTICE b/packages/@aws-cdk/aws-redshift-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/NOTICE +++ b/packages/@aws-cdk/aws-redshift-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-route53resolver-alpha/LICENSE b/packages/@aws-cdk/aws-route53resolver-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-route53resolver-alpha/LICENSE +++ b/packages/@aws-cdk/aws-route53resolver-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-route53resolver-alpha/NOTICE b/packages/@aws-cdk/aws-route53resolver-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-route53resolver-alpha/NOTICE +++ b/packages/@aws-cdk/aws-route53resolver-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-s3objectlambda-alpha/LICENSE b/packages/@aws-cdk/aws-s3objectlambda-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-s3objectlambda-alpha/LICENSE +++ b/packages/@aws-cdk/aws-s3objectlambda-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-s3objectlambda-alpha/NOTICE b/packages/@aws-cdk/aws-s3objectlambda-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-s3objectlambda-alpha/NOTICE +++ b/packages/@aws-cdk/aws-s3objectlambda-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-sagemaker-alpha/LICENSE b/packages/@aws-cdk/aws-sagemaker-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-sagemaker-alpha/LICENSE +++ b/packages/@aws-cdk/aws-sagemaker-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-sagemaker-alpha/NOTICE b/packages/@aws-cdk/aws-sagemaker-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-sagemaker-alpha/NOTICE +++ b/packages/@aws-cdk/aws-sagemaker-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-scheduler-alpha/LICENSE b/packages/@aws-cdk/aws-scheduler-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/LICENSE +++ b/packages/@aws-cdk/aws-scheduler-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-scheduler-alpha/NOTICE b/packages/@aws-cdk/aws-scheduler-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/NOTICE +++ b/packages/@aws-cdk/aws-scheduler-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/aws-cdk-scheduler-schedule.assets.json b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/aws-cdk-scheduler-schedule.assets.json index eb0c8d4f91218..29f5f45f33428 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/aws-cdk-scheduler-schedule.assets.json +++ b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/aws-cdk-scheduler-schedule.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "36.0.0", "files": { - "7c2f669a6fc34b993d394fcc754d832f1fb720665c9db5146c9856a595ddaac2": { + "e85511e5051d124b858b12d793cf362aeaa393047d83195843b1ab4d1bcac9ee": { "source": { "path": "aws-cdk-scheduler-schedule.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7c2f669a6fc34b993d394fcc754d832f1fb720665c9db5146c9856a595ddaac2.json", + "objectKey": "e85511e5051d124b858b12d793cf362aeaa393047d83195843b1ab4d1bcac9ee.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-scheduler-alpha/test/integ.schedule.js.snapshot/aws-cdk-scheduler-schedule.template.json b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/aws-cdk-scheduler-schedule.template.json index f3d2bc6233f52..1ba23e790fdd4 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/aws-cdk-scheduler-schedule.template.json +++ b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/aws-cdk-scheduler-schedule.template.json @@ -383,13 +383,13 @@ "ScheduleWithTimeFrameC1C8BDCC": { "Type": "AWS::Scheduler::Schedule", "Properties": { - "EndDate": "2025-10-01T00:00:00.000Z", + "EndDate": "2026-10-01T00:00:00.000Z", "FlexibleTimeWindow": { "Mode": "OFF" }, "ScheduleExpression": "rate(12 hours)", "ScheduleExpressionTimezone": "Etc/UTC", - "StartDate": "2024-04-15T06:30:00.000Z", + "StartDate": "2025-04-15T06:30:00.000Z", "State": "ENABLED", "Target": { "Arn": { diff --git a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/cdk.out b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/cdk.out index c5cb2e5de6344..1f0068d32659a 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/integ.json b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/integ.json index 6728e425e3c98..1e270e1ccbe28 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "36.0.0", "testCases": { "integtest-schedule/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/integtestscheduleDefaultTestDeployAssert24CB3896.assets.json b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/integtestscheduleDefaultTestDeployAssert24CB3896.assets.json index 98271e1ade15f..f67f3b0c0d103 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/integtestscheduleDefaultTestDeployAssert24CB3896.assets.json +++ b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/integtestscheduleDefaultTestDeployAssert24CB3896.assets.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "36.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/manifest.json b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/manifest.json index 836a18c963b27..e516ba9597896 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "36.0.0", "artifacts": { "aws-cdk-scheduler-schedule.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,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}/7c2f669a6fc34b993d394fcc754d832f1fb720665c9db5146c9856a595ddaac2.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e85511e5051d124b858b12d793cf362aeaa393047d83195843b1ab4d1bcac9ee.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/tree.json b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/tree.json index d903ee961eaa2..1b58e23e9b78a 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-scheduler-alpha/test/integ.schedule.js.snapshot/tree.json @@ -211,7 +211,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-scheduler-alpha.Group", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -235,7 +235,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-scheduler-alpha.Group", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -283,7 +283,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -332,7 +332,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -381,7 +381,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -429,7 +429,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -477,7 +477,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -612,7 +612,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -661,7 +661,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, @@ -675,13 +675,13 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::Scheduler::Schedule", "aws:cdk:cloudformation:props": { - "endDate": "2025-10-01T00:00:00.000Z", + "endDate": "2026-10-01T00:00:00.000Z", "flexibleTimeWindow": { "mode": "OFF" }, "scheduleExpression": "rate(12 hours)", "scheduleExpressionTimezone": "Etc/UTC", - "startDate": "2024-04-15T06:30:00.000Z", + "startDate": "2025-04-15T06:30:00.000Z", "state": "ENABLED", "target": { "arn": { @@ -711,7 +711,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/LICENSE b/packages/@aws-cdk/aws-scheduler-targets-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/LICENSE +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/NOTICE b/packages/@aws-cdk/aws-scheduler-targets-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/NOTICE +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/LICENSE b/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/LICENSE +++ b/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/NOTICE b/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/NOTICE +++ b/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/cdk-cli-wrapper/LICENSE b/packages/@aws-cdk/cdk-cli-wrapper/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/cdk-cli-wrapper/LICENSE +++ b/packages/@aws-cdk/cdk-cli-wrapper/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/cdk-cli-wrapper/NOTICE b/packages/@aws-cdk/cdk-cli-wrapper/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/cdk-cli-wrapper/NOTICE +++ b/packages/@aws-cdk/cdk-cli-wrapper/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/cli-lib-alpha/LICENSE b/packages/@aws-cdk/cli-lib-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/cli-lib-alpha/LICENSE +++ b/packages/@aws-cdk/cli-lib-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/cli-lib-alpha/NOTICE b/packages/@aws-cdk/cli-lib-alpha/NOTICE index 0dd703eaedb4a..9d28b2500bc86 100644 --- a/packages/@aws-cdk/cli-lib-alpha/NOTICE +++ b/packages/@aws-cdk/cli-lib-alpha/NOTICE @@ -1,5 +1,5 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/cloud-assembly-schema/LICENSE b/packages/@aws-cdk/cloud-assembly-schema/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/LICENSE +++ b/packages/@aws-cdk/cloud-assembly-schema/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/cloud-assembly-schema/NOTICE b/packages/@aws-cdk/cloud-assembly-schema/NOTICE index 2017bfea2c9c5..e5df7f7b8d0b0 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/NOTICE +++ b/packages/@aws-cdk/cloud-assembly-schema/NOTICE @@ -1,5 +1,5 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. ------------------------------------------------------------------------------- diff --git a/packages/@aws-cdk/cloudformation-diff/LICENSE b/packages/@aws-cdk/cloudformation-diff/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/cloudformation-diff/LICENSE +++ b/packages/@aws-cdk/cloudformation-diff/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/cloudformation-diff/NOTICE b/packages/@aws-cdk/cloudformation-diff/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/cloudformation-diff/NOTICE +++ b/packages/@aws-cdk/cloudformation-diff/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/custom-resource-handlers/LICENSE b/packages/@aws-cdk/custom-resource-handlers/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/custom-resource-handlers/LICENSE +++ b/packages/@aws-cdk/custom-resource-handlers/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/custom-resource-handlers/NOTICE b/packages/@aws-cdk/custom-resource-handlers/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/custom-resource-handlers/NOTICE +++ b/packages/@aws-cdk/custom-resource-handlers/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/cx-api/LICENSE b/packages/@aws-cdk/cx-api/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/cx-api/LICENSE +++ b/packages/@aws-cdk/cx-api/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/cx-api/NOTICE b/packages/@aws-cdk/cx-api/NOTICE index dfd92979140de..f35ae6174f9d0 100644 --- a/packages/@aws-cdk/cx-api/NOTICE +++ b/packages/@aws-cdk/cx-api/NOTICE @@ -1,5 +1,5 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. ------------------------------------------------------------------------------- diff --git a/packages/@aws-cdk/example-construct-library/LICENSE b/packages/@aws-cdk/example-construct-library/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/example-construct-library/LICENSE +++ b/packages/@aws-cdk/example-construct-library/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/example-construct-library/NOTICE b/packages/@aws-cdk/example-construct-library/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/example-construct-library/NOTICE +++ b/packages/@aws-cdk/example-construct-library/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/integ-runner/LICENSE b/packages/@aws-cdk/integ-runner/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/integ-runner/LICENSE +++ b/packages/@aws-cdk/integ-runner/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/integ-runner/NOTICE b/packages/@aws-cdk/integ-runner/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/integ-runner/NOTICE +++ b/packages/@aws-cdk/integ-runner/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/integ-tests-alpha/LICENSE b/packages/@aws-cdk/integ-tests-alpha/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/integ-tests-alpha/LICENSE +++ b/packages/@aws-cdk/integ-tests-alpha/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/integ-tests-alpha/NOTICE b/packages/@aws-cdk/integ-tests-alpha/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/integ-tests-alpha/NOTICE +++ b/packages/@aws-cdk/integ-tests-alpha/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/region-info/LICENSE b/packages/@aws-cdk/region-info/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/region-info/LICENSE +++ b/packages/@aws-cdk/region-info/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/region-info/NOTICE b/packages/@aws-cdk/region-info/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/region-info/NOTICE +++ b/packages/@aws-cdk/region-info/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/sdk-v2-to-v3-adapter/LICENSE b/packages/@aws-cdk/sdk-v2-to-v3-adapter/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/@aws-cdk/sdk-v2-to-v3-adapter/LICENSE +++ b/packages/@aws-cdk/sdk-v2-to-v3-adapter/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/@aws-cdk/sdk-v2-to-v3-adapter/NOTICE b/packages/@aws-cdk/sdk-v2-to-v3-adapter/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/@aws-cdk/sdk-v2-to-v3-adapter/NOTICE +++ b/packages/@aws-cdk/sdk-v2-to-v3-adapter/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/aws-cdk-lib/LICENSE b/packages/aws-cdk-lib/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/aws-cdk-lib/LICENSE +++ b/packages/aws-cdk-lib/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/aws-cdk-lib/NOTICE b/packages/aws-cdk-lib/NOTICE index 07256e46441bf..f1dbff982512f 100644 --- a/packages/aws-cdk-lib/NOTICE +++ b/packages/aws-cdk-lib/NOTICE @@ -1,5 +1,5 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. ------------------------------------------------------------------------------- diff --git a/packages/aws-cdk-lib/README.md b/packages/aws-cdk-lib/README.md index 1aa3f0db1b592..446cb1a118976 100644 --- a/packages/aws-cdk-lib/README.md +++ b/packages/aws-cdk-lib/README.md @@ -396,7 +396,7 @@ CloudFormation to re-read the secret. ## ARN manipulation Sometimes you will need to put together or pick apart Amazon Resource Names -(ARNs). The functions `stack.formatArn()` and `stack.parseArn()` exist for +(ARNs). The functions `stack.formatArn()` and `stack.splitArn()` exist for this purpose. `formatArn()` can be used to build an ARN from components. It will automatically @@ -409,12 +409,12 @@ declare const stack: Stack; stack.formatArn({ service: 'lambda', resource: 'function', - sep: ':', + arnFormat: ArnFormat.COLON_RESOURCE_NAME, resourceName: 'MyFunction' }); ``` -`parseArn()` can be used to get a single component from an ARN. `parseArn()` +`splitArn()` can be used to get a single component from an ARN. `splitArn()` will correctly deal with both literal ARNs and deploy-time values (tokens), but in case of a deploy-time value be aware that the result will be another deploy-time value which cannot be inspected in the CDK application. @@ -423,14 +423,13 @@ deploy-time value which cannot be inspected in the CDK application. declare const stack: Stack; // Extracts the function name out of an AWS Lambda Function ARN -const arnComponents = stack.parseArn(arn, ':'); +const arnComponents = stack.splitArn(arn, ArnFormat.COLON_RESOURCE_NAME); const functionName = arnComponents.resourceName; ``` -Note that depending on the service, the resource separator can be either -`:` or `/`, and the resource name can be either the 6th or 7th -component in the ARN. When using these functions, you will need to know -the format of the ARN you are dealing with. +Note that the format of the resource separator depends on the service and +may be any of the values supported by `ArnFormat`. When dealing with these +functions, it is important to know the format of the ARN you are dealing with. For an exhaustive list of ARN formats used in AWS, see [AWS ARNs and Namespaces](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) @@ -611,7 +610,7 @@ response to the CloudFormation service and handle various error cases. Set `serviceToken` to `lambda.functionArn` to use this provider: ```ts -const fn = new lambda.Function(this, 'MyProvider', functionProps); +const fn = new lambda.SingletonFunction(this, 'MyProvider', functionProps); new CustomResource(this, 'MyResource', { serviceToken: fn.functionArn, @@ -625,7 +624,8 @@ framework designed to implement simple and slim custom resource providers. It currently only supports Node.js-based user handlers, represents permissions as raw JSON blobs instead of `iam.PolicyStatement` objects, and it does not have support for asynchronous waiting (handler cannot exceed the 15min lambda -timeout). +timeout). The `CustomResourceProviderRuntime` supports runtime `nodejs12.x`, +`nodejs14.x`, `nodejs16.x`, `nodejs18.x`. [`@aws-cdk/core.CustomResourceProvider`]: https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.CustomResourceProvider.html @@ -1096,6 +1096,31 @@ declare const regionTable: CfnMapping; regionTable.findInMap(Aws.REGION, 'regionName'); ``` +An optional default value can also be passed to `findInMap`. If either key is not found in the map and the mapping is lazy, `findInMap` will return the default value and not render the mapping. +If the mapping is not lazy or either key is an unresolved token, the call to `findInMap` will return a token that resolves to +`{ "Fn::FindInMap": [ "MapName", "TopLevelKey", "SecondLevelKey", { "DefaultValue": "DefaultValue" } ] }`, and the mapping will be rendered. +Note that the `AWS::LanguageExtentions` transform is added to enable the default value functionality. + +For example, the following code will again not produce anything in the "Mappings" section. The +call to `findInMap` will be able to resolve the value during synthesis and simply return +`'Region not found'`. + +```ts +const regionTable = new CfnMapping(this, 'RegionTable', { + mapping: { + 'us-east-1': { + regionName: 'US East (N. Virginia)', + }, + 'us-east-2': { + regionName: 'US East (Ohio)', + }, + }, + lazy: true, +}); + +regionTable.findInMap('us-west-1', 'regionName', 'Region not found'); +``` + [cfn-mappings]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html ### Dynamic References @@ -1187,6 +1212,13 @@ const stack = new Stack(app, 'StackName', { }); ``` +You can also set termination protection with the setter after you've instantiated the stack. + +```ts +const stack = new Stack(app, 'StackName', {}); +stack.terminationProtection = true; +``` + By default, termination protection is disabled. ### Description @@ -1245,6 +1277,20 @@ It's possible to synthesize the project with more Resources than the allowed (or Set the context key `@aws-cdk/core:stackResourceLimit` with the proper value, being 0 for disable the limit of resources. +### Template Indentation + +The AWS CloudFormation templates generated by CDK include indentation by default. +Indentation makes the templates more readable, but also increases their size, +and CloudFormation templates cannot exceed 1MB. + +It's possible to reduce the size of your templates by suppressing indentation. + +To do this for all templates, set the context key `@aws-cdk/core:suppressTemplateIndentation` to `true`. + +To do this for a specific stack, add a `suppressTemplateIndentation: true` property to the +stack's `StackProps` parameter. You can also set this property to `false` to override +the context key setting. + ## App Context [Context values](https://docs.aws.amazon.com/cdk/v2/guide/context.html) are key-value pairs that can be associated with an app, stack, or construct. @@ -1440,6 +1486,10 @@ class MyPlugin implements IPolicyValidationPluginBeta1 { } ``` +In addition to the name, plugins may optionally report their version (`version` +property ) and a list of IDs of the rules they are going to evaluate (`ruleIds` +property). + Note that plugins are not allowed to modify anything in the cloud assembly. Any attempt to do so will result in synthesis failure. @@ -1452,4 +1502,40 @@ add it to the `postinstall` [script](https://docs.npmjs.com/cli/v9/using-npm/scripts) in the `package.json` file. +## Annotations + +Construct authors can add annotations to constructs to report at three different +levels: `ERROR`, `WARN`, `INFO`. + +Typically warnings are added for things that are important for the user to be +aware of, but will not cause deployment errors in all cases. Some common +scenarios are (non-exhaustive list): + +- Warn when the user needs to take a manual action, e.g. IAM policy should be + added to an referenced resource. +- Warn if the user configuration might not follow best practices (but is still + valid) +- Warn if the user is using a deprecated API + +### Acknowledging Warnings + +If you would like to run with `--strict` mode enabled (warnings will throw +errors) it is possible to `acknowledge` warnings to make the warning go away. + +For example, if > 10 IAM managed policies are added to an IAM Group, a warning +will be created: + +```text +IAM:Group:MaxPoliciesExceeded: You added 11 to IAM Group my-group. The maximum number of managed policies attached to an IAM group is 10. +``` + +If you have requested a [quota increase](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entities) +you may have the ability to add > 10 managed policies which means that this +warning does not apply to you. You can acknowledge this by `acknowledging` the +warning by the `id`. + +```ts +Annotations.of(this).acknowledgeWarning('IAM:Group:MaxPoliciesExceeded', 'Account has quota increased to 20'); +``` + diff --git a/packages/aws-cdk-lib/aws-appsync/README.md b/packages/aws-cdk-lib/aws-appsync/README.md index 637dbb230edb2..a496118c76e90 100644 --- a/packages/aws-cdk-lib/aws-appsync/README.md +++ b/packages/aws-cdk-lib/aws-appsync/README.md @@ -741,3 +741,18 @@ new appsync.Resolver(this, 'PipelineResolver', { ``` Learn more about Pipeline Resolvers and AppSync Functions [here](https://docs.aws.amazon.com/appsync/latest/devguide/pipeline-resolvers.html). + +## Introspection + +By default, AppSync allows you to use introspection queries. + +For customers that want to limit access to be introspection queries, the `introspectionConfig` property can be set to `IntrospectionConfig.DISABLED` at creation time. +If `introspectionConfig` is not set, the service will default to `ENABLED`. + +```ts +const api = new appsync.GraphqlApi(this, 'api', { + name: 'DisableIntrospectionApi', + definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.schema.graphql')), + introspectionConfig: appsync.IntrospectionConfig.DISABLED, +}); +``` \ No newline at end of file diff --git a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts index f6b19fedbea4e..078edc4980237 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts @@ -435,6 +435,13 @@ export interface GraphqlApiProps { * @default - no domain name */ readonly domainName?: DomainOptions; + + /** + * A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection. + * + * @default IntrospectionConfig.ENABLED + */ + readonly introspectionConfig?: IntrospectionConfig; } /** @@ -513,6 +520,21 @@ export interface GraphqlApiAttributes { readonly graphqlApiArn?: string, } +/** + * Introspection configuration for a GraphQL API + */ +export enum IntrospectionConfig { + /** + * Enable introspection + */ + ENABLED = 'ENABLED', + + /** + * Disable introspection + */ + DISABLED = 'DISABLED', +} + /** * An AppSync GraphQL API * @@ -634,6 +656,7 @@ export class GraphqlApi extends GraphqlApiBase { visibility: props.visibility, mergedApiExecutionRoleArn: this.mergedApiExecutionRole?.roleArn, apiType: this.definition.sourceApiOptions ? 'MERGED' : undefined, + introspectionConfig: props.introspectionConfig, }); this.apiId = this.api.attrApiId; diff --git a/packages/aws-cdk-lib/aws-appsync/test/appsync.test.ts b/packages/aws-cdk-lib/aws-appsync/test/appsync.test.ts index 39a5fe26011fa..e46a49cd26fec 100644 --- a/packages/aws-cdk-lib/aws-appsync/test/appsync.test.ts +++ b/packages/aws-cdk-lib/aws-appsync/test/appsync.test.ts @@ -298,4 +298,19 @@ test('appsync fails when specifing schema and definition', () => { definition: appsync.Definition.fromSchema(appsync.SchemaFile.fromAsset(path.join(__dirname, 'appsync.test.graphql'))), }); }).toThrowError('You cannot specify both properties schema and definition.'); +}); + +test('when introspectionConfig is set it should be used when creating the API', () => { + // WHEN + new appsync.GraphqlApi(stack, 'disabled-introspection', { + authorizationConfig: {}, + name: 'disabled-introspection', + schema: appsync.SchemaFile.fromAsset(path.join(__dirname, 'appsync.test.graphql')), + introspectionConfig: appsync.IntrospectionConfig.DISABLED, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::AppSync::GraphQLApi', { + IntrospectionConfig: 'DISABLED', + }); }); \ No newline at end of file diff --git a/packages/aws-cdk-lib/aws-autoscaling/README.md b/packages/aws-cdk-lib/aws-autoscaling/README.md index 91bac6fc22c91..72d33ae0ca402 100644 --- a/packages/aws-cdk-lib/aws-autoscaling/README.md +++ b/packages/aws-cdk-lib/aws-autoscaling/README.md @@ -91,6 +91,29 @@ new autoscaling.AutoScalingGroup(this, 'ASG', { }); ``` +You can specify instances requirements with the `instanceRequirements ` property: + +```ts +declare const vpc: ec2.Vpc; +declare const launchTemplate1: ec2.LaunchTemplate; + +new autoscaling.AutoScalingGroup(this, 'ASG', { + vpc, + mixedInstancesPolicy: { + launchTemplate: launchTemplate1, + launchTemplateOverrides: [ + { + instanceRequirements: { + vCpuCount: { min: 4, max: 8 }, + memoryMiB: { min: 16384 }, + cpuManufacturers: ['intel'], + }, + } + ], + } +}); +``` + ## Machine Images (AMIs) AMIs control the OS that gets launched when you start your EC2 instance. The EC2 diff --git a/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts b/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts index 90539d3738910..10dc6a5fefb1a 100644 --- a/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts +++ b/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts @@ -550,13 +550,30 @@ export interface InstancesDistribution { * LaunchTemplateOverrides is a subproperty of LaunchTemplate that describes an override for a launch template. */ export interface LaunchTemplateOverrides { + /** + * The instance requirements. Amazon EC2 Auto Scaling uses your specified requirements to identify instance types. + * Then, it uses your On-Demand and Spot allocation strategies to launch instances from these instance types. + * + * You can specify up to four separate sets of instance requirements per Auto Scaling group. + * This is useful for provisioning instances from different Amazon Machine Images (AMIs) in the same Auto Scaling group. + * To do this, create the AMIs and create a new launch template for each AMI. + * Then, create a compatible set of instance requirements for each launch template. + * + * You must specify one of instanceRequirements or instanceType. + * + * @default - Do not override instance type + */ + readonly instanceRequirements?: CfnAutoScalingGroup.InstanceRequirementsProperty + /** * The instance type, such as m3.xlarge. You must use an instance type that is supported in your requested Region * and Availability Zones. * + * You must specify one of instanceRequirements or instanceType. + * * @default - Do not override instance type */ - readonly instanceType: ec2.InstanceType, + readonly instanceType?: ec2.InstanceType, /** * Provides the launch template to be used when launching the instance type. For example, some instance types might @@ -1850,11 +1867,18 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements if (override.weightedCapacity && Math.floor(override.weightedCapacity) !== override.weightedCapacity) { throw new Error('Weight must be an integer'); } + if (!override.instanceType && !override.instanceRequirements) { + throw new Error('You must specify either \'instanceRequirements\' or \'instanceType\'.'); + } + if (override.instanceType && override.instanceRequirements) { + throw new Error('You can specify either \'instanceRequirements\' or \'instanceType\', not both.'); + } return { - instanceType: override.instanceType.toString(), + instanceType: override.instanceType?.toString(), launchTemplateSpecification: override.launchTemplate ? this.convertILaunchTemplateToSpecification(override.launchTemplate) : undefined, + instanceRequirements: override.instanceRequirements, weightedCapacity: override.weightedCapacity?.toString(), }; }), diff --git a/packages/aws-cdk-lib/aws-autoscaling/test/auto-scaling-group.test.ts b/packages/aws-cdk-lib/aws-autoscaling/test/auto-scaling-group.test.ts index 1ea4e5665ba25..f6c8b8fbe6295 100644 --- a/packages/aws-cdk-lib/aws-autoscaling/test/auto-scaling-group.test.ts +++ b/packages/aws-cdk-lib/aws-autoscaling/test/auto-scaling-group.test.ts @@ -1862,6 +1862,120 @@ describe('auto scaling group', () => { }); }); + test('Can specify InstanceRequirements', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const lt = LaunchTemplate.fromLaunchTemplateAttributes(stack, 'imported-lt', { + launchTemplateId: 'test-lt-id', + versionNumber: '0', + }); + + new autoscaling.AutoScalingGroup(stack, 'mip-asg', { + mixedInstancesPolicy: { + launchTemplate: lt, + launchTemplateOverrides: [{ + instanceRequirements: { + vCpuCount: { min: 4, max: 8 }, + memoryMiB: { min: 16384 }, + cpuManufacturers: ['intel'], + }, + launchTemplate: lt, + weightedCapacity: 9, + }], + }, + vpc: mockVpc(stack), + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::AutoScaling::AutoScalingGroup', { + MixedInstancesPolicy: { + LaunchTemplate: { + LaunchTemplateSpecification: { + LaunchTemplateId: 'test-lt-id', + Version: '0', + }, + Overrides: [ + { + InstanceRequirements: { + VCpuCount: { + Min: 4, + Max: 8, + }, + MemoryMiB: { + Min: 16384, + }, + CpuManufacturers: ['intel'], + }, + LaunchTemplateSpecification: { + LaunchTemplateId: 'test-lt-id', + Version: '0', + }, + WeightedCapacity: '9', + }, + ], + }, + }, + }); + }); + + test('Cannot specify InstanceRequirements and InstanceType at the same time', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const lt = LaunchTemplate.fromLaunchTemplateAttributes(stack, 'imported-lt', { + launchTemplateId: 'test-lt-id', + versionNumber: '0', + }); + + // THEN + expect(() => { + new autoscaling.AutoScalingGroup(stack, 'mip-asg', { + mixedInstancesPolicy: { + launchTemplate: lt, + launchTemplateOverrides: [{ + instanceRequirements: { + vCpuCount: { min: 4, max: 8 }, + memoryMiB: { min: 16384 }, + cpuManufacturers: ['intel'], + }, + instanceType: new InstanceType('t4g.micro'), + launchTemplate: lt, + weightedCapacity: 9, + }], + }, + vpc: mockVpc(stack), + }); + }).toThrow('You can specify either \'instanceRequirements\' or \'instanceType\', not both.'); + }); + + test('Should specify either InstanceRequirements or InstanceType', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const lt = LaunchTemplate.fromLaunchTemplateAttributes(stack, 'imported-lt', { + launchTemplateId: 'test-lt-id', + versionNumber: '0', + }); + + // THEN + expect(() => { + new autoscaling.AutoScalingGroup(stack, 'mip-asg', { + mixedInstancesPolicy: { + launchTemplate: lt, + launchTemplateOverrides: [{ + launchTemplate: lt, + weightedCapacity: 9, + }], + }, + vpc: mockVpc(stack), + }); + }).toThrow('You must specify either \'instanceRequirements\' or \'instanceType\'.'); + }); + test('Cannot specify both Launch Template and Launch Config', () => { // GIVEN const stack = new cdk.Stack(); diff --git a/packages/aws-cdk-lib/aws-cloudfront/README.md b/packages/aws-cdk-lib/aws-cloudfront/README.md index 4766a7801b6b8..333367b4ec176 100644 --- a/packages/aws-cdk-lib/aws-cloudfront/README.md +++ b/packages/aws-cdk-lib/aws-cloudfront/README.md @@ -518,6 +518,7 @@ You can also deploy CloudFront functions and add them to a CloudFront distributi // Add a cloudfront Function to a Distribution const cfFunction = new cloudfront.Function(this, 'Function', { code: cloudfront.FunctionCode.fromInline('function handler(event) { return event.request }'), + runtime: cloudfront.FunctionRuntime.JS_2_0, }); declare const s3Bucket: s3.Bucket; @@ -536,6 +537,27 @@ It will auto-generate the name of the function and deploy it to the `live` stage Additionally, you can load the function's code from a file using the `FunctionCode.fromFile()` method. +### Key Value Store + +A CloudFront Key Value Store can be created and optionally have data imported from a JSON file +by default. + +To create an empty Key Value Store: + +```ts +const store = new cloudfront.KeyValueStore(this, 'KeyValueStore'); +``` + +To also include an initial set of value, the `source` property can be specified. For the +structure of this file, see [Creating a file of key value pairs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/kvs-with-functions-create-s3-kvp.html). + +```ts +const store = new cloudfront.KeyValueStore(this, 'KeyValueStore', { + keyValueStoreName: 'KeyValueStore', + source: cloudfront.ImportSource.fromAsset('path-to-data.json'), +}); +``` + ### Logging You can configure CloudFront to create log files that contain detailed information about every user request that CloudFront receives. diff --git a/packages/aws-cdk-lib/aws-cloudfront/lib/function.ts b/packages/aws-cdk-lib/aws-cloudfront/lib/function.ts index d4dd19e98a18b..71b874adb1934 100644 --- a/packages/aws-cdk-lib/aws-cloudfront/lib/function.ts +++ b/packages/aws-cdk-lib/aws-cloudfront/lib/function.ts @@ -100,6 +100,13 @@ export interface FunctionAttributes { * The ARN of the function. */ readonly functionArn: string; + + /** + * The Runtime of the function. + * @default FunctionRuntime.JS_1_0 + */ + readonly functionRuntime?: string; + } /** @@ -122,6 +129,12 @@ export interface FunctionProps { * The source code of the function. */ readonly code: FunctionCode; + + /** + * The runtime environment for the function. + * @default FunctionRuntime.JS_1_0 + */ + readonly runtime?: FunctionRuntime; } /** @@ -136,6 +149,7 @@ export class Function extends Resource implements IFunction { return new class extends Resource implements IFunction { public readonly functionName = attrs.functionName; public readonly functionArn = attrs.functionArn; + public readonly functionRuntime = attrs.functionRuntime ?? FunctionRuntime.JS_1_0.value; }(scope, id); } @@ -154,18 +168,25 @@ export class Function extends Resource implements IFunction { * @attribute */ public readonly functionStage: string; + /** + * the runtime of the CloudFront function + * @attribute + */ + public readonly functionRuntime: string; constructor(scope: Construct, id: string, props: FunctionProps) { super(scope, id); this.functionName = props.functionName ?? this.generateName(); + this.functionRuntime = props.runtime?.value ?? FunctionRuntime.JS_1_0.value; + const resource = new CfnFunction(this, 'Resource', { autoPublish: true, functionCode: props.code.render(), functionConfig: { comment: props.comment ?? this.functionName, - runtime: 'cloudfront-js-1.0', + runtime: this.functionRuntime, }, name: this.functionName, }); @@ -212,3 +233,29 @@ export interface FunctionAssociation { /** The type of event which should invoke the function. */ readonly eventType: FunctionEventType; } + +/** + * The function's runtime environment version. + */ +export class FunctionRuntime { + /** + * cloudfront-js-1.0 + */ + public static readonly JS_1_0 = new FunctionRuntime('cloudfront-js-1.0'); + + /** + * cloudfront-js-2.0 + */ + public static readonly JS_2_0 = new FunctionRuntime('cloudfront-js-2.0'); + + /** + * A custom runtime string. + * + * Gives full control over the runtime string fragment. + */ + public static custom(runtimeString: string): FunctionRuntime { + return new FunctionRuntime(runtimeString); + } + + private constructor(public readonly value: string) {} +} diff --git a/packages/aws-cdk-lib/aws-cloudfront/lib/index.ts b/packages/aws-cdk-lib/aws-cloudfront/lib/index.ts index fec6239124609..5a7e2863c8a4e 100644 --- a/packages/aws-cdk-lib/aws-cloudfront/lib/index.ts +++ b/packages/aws-cdk-lib/aws-cloudfront/lib/index.ts @@ -4,6 +4,7 @@ export * from './endpoint'; export * from './function'; export * from './geo-restriction'; export * from './key-group'; +export * from './key-value-store'; export * from './origin'; export * from './origin-access-identity'; export * from './origin-request-policy'; diff --git a/packages/aws-cdk-lib/aws-cloudfront/lib/key-value-store.ts b/packages/aws-cdk-lib/aws-cloudfront/lib/key-value-store.ts new file mode 100644 index 0000000000000..4dc6c45fd3871 --- /dev/null +++ b/packages/aws-cdk-lib/aws-cloudfront/lib/key-value-store.ts @@ -0,0 +1,209 @@ +import { Construct } from 'constructs'; +import { CfnKeyValueStore } from './cloudfront.generated'; +import * as s3 from '../../aws-s3'; +import * as s3_assets from '../../aws-s3-assets'; +import { Resource, IResource, Lazy, Names, Stack, Arn, ArnFormat } from '../../core'; + +/** + * The data to be imported to the key value store. + */ +export abstract class ImportSource { + /** + * An import source that exists as an object in an S3 bucket. + * + * @param bucket the S3 bucket that contains the data + * @param key the key within the S3 bucket that contains the data + */ + public static fromBucket(bucket: s3.IBucket, key: string): ImportSource { + return new S3ImportSource(bucket, key); + } + + /** + * An import source that exists as a local file. + * + * @param path the path to the local file + * @param options the configuration for the temporarily created S3 file + */ + public static fromAsset(path: string, options?: s3_assets.AssetOptions): ImportSource { + return new AssetImportSource(path, options); + } + + /** + * Called when the key value store is initialized to allow the import source to + * be bound to the stack. + * + * The method is primarily intended for internal use. + * + * @param scope the binding scope + * @internal + */ + public abstract _bind(scope: Construct): CfnKeyValueStore.ImportSourceProperty; +} + +/** + * An import source from an S3 object. + */ +export class S3ImportSource extends ImportSource { + /** + * @param bucket the S3 bucket that contains the data + * @param key the key within the S3 bucket that contains the data + */ + constructor(public readonly bucket: s3.IBucket, public readonly key: string) { + super(); + } + + /** + * @internal + */ + public _bind(_scope: Construct): CfnKeyValueStore.ImportSourceProperty { + return { + sourceType: 'S3', + sourceArn: `${this.bucket.arnForObjects(this.key)}`, + }; + } +} + +/** + * An import source from a local file. + */ +export class AssetImportSource extends ImportSource { + private asset?: s3_assets.Asset; + + /** + * @param path the path to the local file + * @param options the configuration for the temporarily created S3 file + */ + constructor(public readonly path: string, private readonly options: s3_assets.AssetOptions = {}) { + super(); + } + + /** + * @internal + */ + public _bind(scope: Construct): CfnKeyValueStore.ImportSourceProperty { + if (!this.asset) { + this.asset = new s3_assets.Asset(scope, 'ImportSource', { + path: this.path, + deployTime: true, + ...this.options, + }); + } else if (Stack.of(this.asset) !== Stack.of(scope)) { + throw new Error( + `Asset is already associated with another stack '${Stack.of(this.asset).stackName}. ` + + 'Create a new ImportSource instance for every stack.', + ); + } + + return { + sourceType: 'S3', + sourceArn: this.asset.bucket.arnForObjects(this.asset.s3ObjectKey), + }; + } +} + +/** + * The properties to create a Key Value Store. + */ +export interface KeyValueStoreProps { + /** + * The unique name of the Key Value Store. + * + * @default A generated name + */ + readonly keyValueStoreName?: string; + + /** + * A comment for the Key Value Store + * + * @default No comment will be specified + */ + readonly comment?: string; + + /** + * The import source for the Key Value Store. + * + * This will populate the initial items in the Key Value Store. The + * source data must be in a valid JSON format. + * + * @default No data will be imported to the store + */ + readonly source?: ImportSource; +} + +/** + * A CloudFront Key Value Store. + */ +export interface IKeyValueStore extends IResource { + /** + * The ARN of the Key Value Store. + * + * @attribute + */ + readonly keyValueStoreArn: string; + + /** + * The Unique ID of the Key Value Store. + * + * @attribute + */ + readonly keyValueStoreId: string; + + /** + * The status of the Key Value Store. + * + * @attribute + */ + readonly keyValueStoreStatus: string; +} + +/** + * A CloudFront Key Value Store. + * + * @resource AWS::CloudFront::KeyValueStore + */ +export class KeyValueStore extends Resource implements IKeyValueStore { + /** + * Import a Key Value Store using its ARN. + */ + public static fromKeyValueStoreArn(scope: Construct, id: string, keyValueStoreArn: string): IKeyValueStore { + const storeId = Arn.split(keyValueStoreArn, ArnFormat.SLASH_RESOURCE_NAME).resourceName; + if (!storeId) { + throw new Error(`Invalid Key Value Store Arn: '${keyValueStoreArn}'`); + } + return new class Import extends Resource implements IKeyValueStore { + readonly keyValueStoreArn: string = keyValueStoreArn; + readonly keyValueStoreId: string = storeId!; + constructor() { + super(scope, id, { + environmentFromArn: keyValueStoreArn, + }); + } + + public get keyValueStoreStatus(): string { + throw new Error('Status is not available for imported Key Value Store'); + } + }; + } + + readonly keyValueStoreArn: string; + readonly keyValueStoreId: string; + readonly keyValueStoreStatus: string; + + constructor(scope: Construct, id: string, props?: KeyValueStoreProps) { + super(scope, id, { + physicalName: props?.keyValueStoreName ?? Lazy.string({ + produce: () => Names.uniqueResourceName(this, { maxLength: 64 }), + }), + }); + + const resource = new CfnKeyValueStore(this, 'Resource', { + name: this.physicalName, + comment: props?.comment, + importSource: props?.source?._bind(this), + }); + + this.keyValueStoreArn = resource.attrArn; + this.keyValueStoreId = resource.attrId; + this.keyValueStoreStatus = resource.attrStatus; + } +} diff --git a/packages/aws-cdk-lib/aws-cloudfront/test/function.test.ts b/packages/aws-cdk-lib/aws-cloudfront/test/function.test.ts index 7573e1c7e65af..142559b07ea7c 100644 --- a/packages/aws-cdk-lib/aws-cloudfront/test/function.test.ts +++ b/packages/aws-cdk-lib/aws-cloudfront/test/function.test.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import { Template } from '../../assertions'; import { App, Stack } from '../../core'; -import { Function, FunctionCode } from '../lib'; +import { Function, FunctionCode, FunctionRuntime } from '../lib'; describe('CloudFront Function', () => { @@ -132,4 +132,60 @@ describe('CloudFront Function', () => { }, }); }); + + test('runtime testing', () => { + const app = new App(); + const stack = new Stack(app, 'Stack', { + env: { account: '123456789012', region: 'testregion' }, + }); + new Function(stack, 'CF2', { + code: FunctionCode.fromInline('code'), + runtime: FunctionRuntime.JS_2_0, + }); + + Template.fromStack(stack).templateMatches({ + Resources: { + CF2D7241DD7: { + Type: 'AWS::CloudFront::Function', + Properties: { + Name: 'testregionStackCF2CE3F783F', + AutoPublish: true, + FunctionCode: 'code', + FunctionConfig: { + Comment: 'testregionStackCF2CE3F783F', + Runtime: 'cloudfront-js-2.0', + }, + }, + }, + }, + }); + }); + + test('custom runtime testing', () => { + const app = new App(); + const stack = new Stack(app, 'Stack', { + env: { account: '123456789012', region: 'testregion' }, + }); + new Function(stack, 'CF2', { + code: FunctionCode.fromInline('code'), + runtime: FunctionRuntime.custom('cloudfront-js-2.0'), + }); + + Template.fromStack(stack).templateMatches({ + Resources: { + CF2D7241DD7: { + Type: 'AWS::CloudFront::Function', + Properties: { + Name: 'testregionStackCF2CE3F783F', + AutoPublish: true, + FunctionCode: 'code', + FunctionConfig: { + Comment: 'testregionStackCF2CE3F783F', + Runtime: 'cloudfront-js-2.0', + }, + }, + }, + }, + }); + }); }); diff --git a/packages/aws-cdk-lib/aws-cloudfront/test/key-value-store-source.json b/packages/aws-cdk-lib/aws-cloudfront/test/key-value-store-source.json new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/aws-cdk-lib/aws-cloudfront/test/key-value-store.test.ts b/packages/aws-cdk-lib/aws-cloudfront/test/key-value-store.test.ts new file mode 100644 index 0000000000000..f7c7221c23f5a --- /dev/null +++ b/packages/aws-cdk-lib/aws-cloudfront/test/key-value-store.test.ts @@ -0,0 +1,122 @@ +import * as path from 'node:path'; +import { Match, Template } from '../../assertions'; +import * as s3 from '../../aws-s3'; +import { App, Stack } from '../../core'; +import { KeyValueStore, ImportSource } from '../lib'; + +describe('Key Value Store', () => { + test('minimal example', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + new KeyValueStore(stack, 'TestStore'); + + // THEN + Template.fromStack(stack).templateMatches({ + Resources: { + TestStore8BB973CF: { + Type: 'AWS::CloudFront::KeyValueStore', + Properties: { + Name: 'TestStore', + }, + }, + }, + }); + }); + + test('with name', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + new KeyValueStore(stack, 'TestStore', { + keyValueStoreName: 'TestStoreName', + }); + + // THEN + Template.fromStack(stack).templateMatches({ + Resources: { + TestStore8BB973CF: { + Type: 'AWS::CloudFront::KeyValueStore', + Properties: { + Name: 'TestStoreName', + }, + }, + }, + }); + }); + + test('with comment', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + new KeyValueStore(stack, 'TestStore', { + comment: 'Test comment', + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::CloudFront::KeyValueStore', { + Comment: 'Test comment', + }); + }); + + test('with code from S3 bucket', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + const bucket = s3.Bucket.fromBucketArn(stack, 'TestBucket', 'arn:aws:s3:::bucket'); + new KeyValueStore(stack, 'TestStore', { + source: ImportSource.fromBucket(bucket, 'test'), + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::CloudFront::KeyValueStore', { + ImportSource: { + SourceArn: 'arn:aws:s3:::bucket/test', + SourceType: 'S3', + }, + }); + }); + + test('with code from local file', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + new KeyValueStore(stack, 'TestStore', { + source: ImportSource.fromAsset(path.join(__dirname, 'key-value-store-source.json')), + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::CloudFront::KeyValueStore', { + ImportSource: { + SourceArn: Match.anyValue(), + SourceType: 'S3', + }, + }); + }); + + test('imported resource throws error when missing ID', () => { + // GIVEN + const stack = new Stack(); + + // THEN + expect( + () => KeyValueStore.fromKeyValueStoreArn(stack, 'TestStore', 'arn:aws:cloudfront::123456789012:key-value-store'), + ).toThrow(/Invalid Key Value Store Arn:/); + }); + + test('imported resource throws error when accessing status', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + const store = KeyValueStore.fromKeyValueStoreArn(stack, 'TestStore', 'arn:aws:cloudfront::123456789012:key-value-store/id1'); + + // THEN + expect(() => store.keyValueStoreStatus).toThrow('Status is not available for imported Key Value Store'); + }); +}); diff --git a/packages/aws-cdk-lib/aws-codebuild/lib/linux-arm-build-image.ts b/packages/aws-cdk-lib/aws-codebuild/lib/linux-arm-build-image.ts index 3df1631fb46b0..af72cad27b39a 100644 --- a/packages/aws-cdk-lib/aws-codebuild/lib/linux-arm-build-image.ts +++ b/packages/aws-cdk-lib/aws-codebuild/lib/linux-arm-build-image.ts @@ -30,7 +30,10 @@ interface LinuxArmBuildImageProps { * @see https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html */ export class LinuxArmBuildImage implements IBuildImage { - /** Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0". */ + /** + * Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0". + * @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 instead. + * */ public static readonly AMAZON_LINUX_2_STANDARD_1_0 = LinuxArmBuildImage.fromCodeBuildImageId('aws/codebuild/amazonlinux2-aarch64-standard:1.0'); /** Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0". */ public static readonly AMAZON_LINUX_2_STANDARD_2_0 = LinuxArmBuildImage.fromCodeBuildImageId('aws/codebuild/amazonlinux2-aarch64-standard:2.0'); diff --git a/packages/aws-cdk-lib/aws-codebuild/lib/project.ts b/packages/aws-cdk-lib/aws-codebuild/lib/project.ts index d4dcc4e65f624..fec076b9dd0ed 100644 --- a/packages/aws-cdk-lib/aws-codebuild/lib/project.ts +++ b/packages/aws-cdk-lib/aws-codebuild/lib/project.ts @@ -1756,10 +1756,16 @@ import { LinuxArmBuildImage } from './linux-arm-build-image'; * @see https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html */ export class LinuxBuildImage implements IBuildImage { + /** @deprecated Use LinuxBuildImage.STANDARD_7_0 instead. */ public static readonly STANDARD_1_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:1.0'); + /** @deprecated Use LinuxBuildImage.STANDARD_7_0 instead. */ public static readonly STANDARD_2_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:2.0'); + /** @deprecated Use LinuxBuildImage.STANDARD_7_0 instead. */ public static readonly STANDARD_3_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:3.0'); - /** The `aws/codebuild/standard:4.0` build image. */ + /** + * The `aws/codebuild/standard:4.0` build image. + * @deprecated Use LinuxBuildImage.STANDARD_7_0 instead. + * */ public static readonly STANDARD_4_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:4.0'); /** The `aws/codebuild/standard:5.0` build image. */ public static readonly STANDARD_5_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:5.0'); @@ -1768,84 +1774,89 @@ export class LinuxBuildImage implements IBuildImage { /** The `aws/codebuild/standard:7.0` build image. */ public static readonly STANDARD_7_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:7.0'); + /** @deprecated Use LinuxBuildImage.AMAZON_LINUX_2_5 instead. */ public static readonly AMAZON_LINUX_2 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:1.0'); + /** @deprecated Use LinuxBuildImage.AMAZON_LINUX_2_5 instead. */ public static readonly AMAZON_LINUX_2_2 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:2.0'); - /** The Amazon Linux 2 x86_64 standard image, version `3.0`. */ + /** + * The Amazon Linux 2 x86_64 standard image, version `3.0`. + * @deprecated Use LinuxBuildImage.AMAZON_LINUX_2_5 instead. + * */ public static readonly AMAZON_LINUX_2_3 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:3.0'); /** The Amazon Linux 2 x86_64 standard image, version `4.0`. */ public static readonly AMAZON_LINUX_2_4 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:4.0'); /** The Amazon Linux 2 x86_64 standard image, version `5.0`. */ public static readonly AMAZON_LINUX_2_5 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:5.0'); - /** @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0 instead. */ + /** @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 instead. */ public static readonly AMAZON_LINUX_2_ARM = LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0; /** * Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0". - * @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0 instead. + * @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 instead. * */ public static readonly AMAZON_LINUX_2_ARM_2 = LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0; /** @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 instead. */ public static readonly AMAZON_LINUX_2_ARM_3 = LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0; - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_BASE = LinuxBuildImage.codeBuildImage('aws/codebuild/ubuntu-base:14.04'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_ANDROID_JAVA8_24_4_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/android-java-8:24.4.1'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_ANDROID_JAVA8_26_1_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/android-java-8:26.1.1'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_DOCKER_17_09_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/docker:17.09.0'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_DOCKER_18_09_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/docker:18.09.0'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_GOLANG_1_10 = LinuxBuildImage.codeBuildImage('aws/codebuild/golang:1.10'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_GOLANG_1_11 = LinuxBuildImage.codeBuildImage('aws/codebuild/golang:1.11'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_OPEN_JDK_8 = LinuxBuildImage.codeBuildImage('aws/codebuild/java:openjdk-8'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_OPEN_JDK_9 = LinuxBuildImage.codeBuildImage('aws/codebuild/java:openjdk-9'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_OPEN_JDK_11 = LinuxBuildImage.codeBuildImage('aws/codebuild/java:openjdk-11'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_NODEJS_10_14_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/nodejs:10.14.1'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_NODEJS_10_1_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/nodejs:10.1.0'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_NODEJS_8_11_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/nodejs:8.11.0'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_NODEJS_6_3_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/nodejs:6.3.1'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_PHP_5_6 = LinuxBuildImage.codeBuildImage('aws/codebuild/php:5.6'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_PHP_7_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/php:7.0'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_PHP_7_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/php:7.1'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_PYTHON_3_7_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:3.7.1'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_PYTHON_3_6_5 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:3.6.5'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_PYTHON_3_5_2 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:3.5.2'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_PYTHON_3_4_5 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:3.4.5'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_PYTHON_3_3_6 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:3.3.6'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_PYTHON_2_7_12 = LinuxBuildImage.codeBuildImage('aws/codebuild/python:2.7.12'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_RUBY_2_5_3 = LinuxBuildImage.codeBuildImage('aws/codebuild/ruby:2.5.3'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_RUBY_2_5_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/ruby:2.5.1'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_RUBY_2_3_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/ruby:2.3.1'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_RUBY_2_2_5 = LinuxBuildImage.codeBuildImage('aws/codebuild/ruby:2.2.5'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_DOTNET_CORE_1_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/dot-net:core-1'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_DOTNET_CORE_2_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/dot-net:core-2.0'); - /** @deprecated Use `STANDARD_2_0` and specify runtime in buildspec runtime-versions section */ + /** @deprecated Use `STANDARD_7_0` and specify runtime in buildspec runtime-versions section */ public static readonly UBUNTU_14_04_DOTNET_CORE_2_1 = LinuxBuildImage.codeBuildImage('aws/codebuild/dot-net:core-2.1'); /** diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/lib/s3/deploy-action.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/lib/s3/deploy-action.ts index 91b265d4e3b01..f4ed6e5be53a0 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/lib/s3/deploy-action.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/lib/s3/deploy-action.ts @@ -25,16 +25,26 @@ export class CacheControl { public static noCache() { return new CacheControl('no-cache'); } /** The 'no-transform' cache control directive. */ public static noTransform() { return new CacheControl('no-transform'); } + /** The 'no-store' cache control directive. */ + public static noStore() { return new CacheControl('no-store'); } + /** The 'must-understand' cache control directive. */ + public static mustUnderstand() { return new CacheControl('must-understand'); } /** The 'public' cache control directive. */ public static setPublic() { return new CacheControl('public'); } /** The 'private' cache control directive. */ public static setPrivate() { return new CacheControl('private'); } + /** The 'immutable' cache control directive. */ + public static immutable() { return new CacheControl('immutable'); } /** The 'proxy-revalidate' cache control directive. */ public static proxyRevalidate() { return new CacheControl('proxy-revalidate'); } /** The 'max-age' cache control directive. */ public static maxAge(t: Duration) { return new CacheControl(`max-age=${t.toSeconds()}`); } /** The 's-max-age' cache control directive. */ public static sMaxAge(t: Duration) { return new CacheControl(`s-maxage=${t.toSeconds()}`); } + /** The 'stale-while-revalidate' cache control directive. */ + public static staleWhileRevalidate(t: Duration) { return new CacheControl(`stale-while-revalidate=${t.toSeconds()}`); } + /** The 'stale-if-error' cache control directive. */ + public static staleIfError(t: Duration) { return new CacheControl(`stale-if-error=${t.toSeconds()}`); } /** * Allows you to create an arbitrary cache control directive, * in case our support is missing a method for a particular directive. diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/s3/s3-deploy-action.test.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/s3/s3-deploy-action.test.ts index a2d362a9602e0..243fa7e0128af 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/s3/s3-deploy-action.test.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/s3/s3-deploy-action.test.ts @@ -125,6 +125,23 @@ describe('S3 Deploy Action', () => { }); }); + test('cache-control directive has correct values', () => { + expect(cpactions.CacheControl.mustRevalidate().value).toEqual('must-revalidate'); + expect(cpactions.CacheControl.noCache().value).toEqual('no-cache'); + expect(cpactions.CacheControl.noTransform().value).toEqual('no-transform'); + expect(cpactions.CacheControl.noStore().value).toEqual('no-store'); + expect(cpactions.CacheControl.mustUnderstand().value).toEqual('must-understand'); + expect(cpactions.CacheControl.setPublic().value).toEqual('public'); + expect(cpactions.CacheControl.setPrivate().value).toEqual('private'); + expect(cpactions.CacheControl.immutable().value).toEqual('immutable'); + expect(cpactions.CacheControl.proxyRevalidate().value).toEqual('proxy-revalidate'); + expect(cpactions.CacheControl.maxAge(Duration.minutes(1)).value).toEqual('max-age=60'); + expect(cpactions.CacheControl.sMaxAge(Duration.minutes(1)).value).toEqual('s-maxage=60'); + expect(cpactions.CacheControl.staleWhileRevalidate(Duration.minutes(1)).value).toEqual('stale-while-revalidate=60'); + expect(cpactions.CacheControl.staleIfError(Duration.minutes(1)).value).toEqual('stale-if-error=60'); + expect(cpactions.CacheControl.fromString('custom').value).toEqual('custom'); + }); + test('allow customizing objectKey (deployment path on S3)', () => { const stack = new Stack(); minimalPipeline(stack, { diff --git a/packages/aws-cdk-lib/aws-ecs/README.md b/packages/aws-cdk-lib/aws-ecs/README.md index 134101df92cd8..669f91846defa 100644 --- a/packages/aws-cdk-lib/aws-ecs/README.md +++ b/packages/aws-cdk-lib/aws-ecs/README.md @@ -203,6 +203,19 @@ taskDefinition.addToTaskRolePolicy( ) ``` +To manage task protection settings in an ECS cluster, you can use the `grantTaskProtection` method. +This method grants the `ecs:UpdateTaskProtection` permission to a specified IAM entity. + +```ts +// Assume 'cluster' is an instance of ecs.Cluster +declare const cluster: ecs.Cluster; +declare const taskRole: iam.Role; + +// Grant ECS Task Protection permissions to the role +// Now 'taskRole' has the 'ecs:UpdateTaskProtection' permission on all tasks in the cluster +cluster.grantTaskProtection(taskRole); +``` + ### Bottlerocket [Bottlerocket](https://aws.amazon.com/bottlerocket/) is a Linux-based open source operating system that is @@ -222,6 +235,19 @@ cluster.addCapacity('bottlerocket-asg', { }); ``` +You can also specify an NVIDIA-compatible AMI such as in this example: + +```ts +declare const cluster: ecs.Cluster; + +cluster.addCapacity('bottlerocket-asg', { + instanceType: new ec2.InstanceType('p3.2xlarge'), + machineImage: new ecs.BottleRocketImage({ + variant: ecs.BottlerocketEcsVariant.AWS_ECS_2_NVIDIA, + }), +}); +``` + ### ARM64 (Graviton) Instances To launch instances with ARM64 hardware, you can use the Amazon ECS-optimized @@ -456,6 +482,20 @@ const taskDef = new ecs.TaskDefinition(this, 'TaskDef', { taskDef.grantRun(role); ``` +To deploy containerized applications that require the allocation of standard input (stdin) or a terminal (tty), use the `interactive` property. + +This parameter corresponds to `OpenStdin` in the [Create a container](https://docs.docker.com/engine/api/v1.35/#tag/Container/operation/ContainerCreate) section of the [Docker Remote API](https://docs.docker.com/engine/api/v1.35/) +and the `--interactive` option to [docker run](https://docs.docker.com/engine/reference/run/#security-configuration). + +```ts +declare const taskDefinition: ecs.TaskDefinition; + +taskDefinition.addContainer("Container", { + image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"), + interactive: true, +}); +``` + ### Images Images supply the software that runs inside the container. Images can be diff --git a/packages/aws-cdk-lib/aws-ecs/lib/amis.ts b/packages/aws-cdk-lib/aws-ecs/lib/amis.ts index 52fcc44f45210..66addf36879cb 100644 --- a/packages/aws-cdk-lib/aws-ecs/lib/amis.ts +++ b/packages/aws-cdk-lib/aws-ecs/lib/amis.ts @@ -298,8 +298,19 @@ export enum BottlerocketEcsVariant { /** * aws-ecs-1 variant */ - AWS_ECS_1 = 'aws-ecs-1' - + AWS_ECS_1 = 'aws-ecs-1', + /** + * aws-ecs-1-nvidia variant + */ + AWS_ECS_1_NVIDIA = 'aws-ecs-1-nvidia', + /** + * aws-ecs-2 variant + */ + AWS_ECS_2 = 'aws-ecs-2', + /** + * aws-ecs-2-nvidia variant + */ + AWS_ECS_2_NVIDIA = 'aws-ecs-2-nvidia', } /** @@ -308,7 +319,6 @@ export enum BottlerocketEcsVariant { export interface BottleRocketImageProps { /** * The Amazon ECS variant to use. - * Only `aws-ecs-1` is currently available * * @default - BottlerocketEcsVariant.AWS_ECS_1 */ diff --git a/packages/aws-cdk-lib/aws-ecs/lib/cluster.ts b/packages/aws-cdk-lib/aws-ecs/lib/cluster.ts index cf469007614b5..19c96715e37b3 100644 --- a/packages/aws-cdk-lib/aws-ecs/lib/cluster.ts +++ b/packages/aws-cdk-lib/aws-ecs/lib/cluster.ts @@ -598,6 +598,21 @@ export class Cluster extends Resource implements ICluster { }); } + /** + * Grants an ECS Task Protection API permission to the specified grantee. + * This method provides a streamlined way to assign the 'ecs:UpdateTaskProtection' + * permission, enabling the grantee to manage task protection in the ECS cluster. + * + * @param grantee The entity (e.g., IAM role or user) to grant the permissions to. + */ + public grantTaskProtection(grantee: iam.IGrantable): iam.Grant { + return iam.Grant.addToPrincipal({ + grantee, + actions: ['ecs:UpdateTaskProtection'], + resourceArns: [this.arnForTasks('*')], + }); + } + private configureWindowsAutoScalingGroup(autoScalingGroup: autoscaling.AutoScalingGroup, options: AddAutoScalingGroupCapacityOptions = {}) { // clear the cache of the agent autoScalingGroup.addUserData('Remove-Item -Recurse C:\\ProgramData\\Amazon\\ECS\\Cache'); diff --git a/packages/aws-cdk-lib/aws-ecs/lib/container-definition.ts b/packages/aws-cdk-lib/aws-ecs/lib/container-definition.ts index 5c9ebf3df039c..0478a059df68d 100644 --- a/packages/aws-cdk-lib/aws-ecs/lib/container-definition.ts +++ b/packages/aws-cdk-lib/aws-ecs/lib/container-definition.ts @@ -251,6 +251,14 @@ export interface ContainerDefinitionOptions { */ readonly hostname?: string; + /** + * When this parameter is true, you can deploy containerized applications that require stdin or a tty to be allocated. + * + * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinition.html#cfn-ecs-taskdefinition-containerdefinition-interactive + * @default - false + */ + readonly interactive?: boolean; + /** * The amount (in MiB) of memory to present to the container. * @@ -797,6 +805,7 @@ export class ContainerDefinition extends Construct { essential: this.essential, hostname: this.props.hostname, image: this.imageConfig.imageName, + interactive: this.props.interactive, memory: this.props.memoryLimitMiB, memoryReservation: this.props.memoryReservationMiB, mountPoints: cdk.Lazy.any({ produce: () => this.mountPoints.map(renderMountPoint) }, { omitEmptyArray: true }), diff --git a/packages/aws-cdk-lib/aws-ecs/test/amis.test.ts b/packages/aws-cdk-lib/aws-ecs/test/amis.test.ts new file mode 100644 index 0000000000000..f5bf64f419325 --- /dev/null +++ b/packages/aws-cdk-lib/aws-ecs/test/amis.test.ts @@ -0,0 +1,27 @@ +import * as cdk from '../../core'; +import * as ecs from '../lib'; + +describe('amis', () => { + test.each([ + [ecs.BottlerocketEcsVariant.AWS_ECS_1, 'SsmParameterValueawsservicebottlerocketawsecs1x8664'], + [ecs.BottlerocketEcsVariant.AWS_ECS_1_NVIDIA, 'SsmParameterValueawsservicebottlerocketawsecs1nvidiax8664'], + [ecs.BottlerocketEcsVariant.AWS_ECS_2, 'SsmParameterValueawsservicebottlerocketawsecs2x8664'], + [ecs.BottlerocketEcsVariant.AWS_ECS_2_NVIDIA, 'SsmParameterValueawsservicebottlerocketawsecs2nvidiax8664'], + ])('BottleRocketImage with %s variant', (variant, ssmKey) => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app); + + // WHEN + new ecs.BottleRocketImage({ + variant, + }).getImage(stack); + + // THEN + const assembly = app.synth(); + const parameters = assembly.getStackByName(stack.stackName).template.Parameters; + expect(Object.entries(parameters).some( + ([k, v]) => k.startsWith(ssmKey) && (v as any).Default.includes(`/bottlerocket/${variant}/x86_64/`), + )).toEqual(true); + }); +}); diff --git a/packages/aws-cdk-lib/aws-ecs/test/cluster.test.ts b/packages/aws-cdk-lib/aws-ecs/test/cluster.test.ts index aae6da1bad290..ae6b8fb8d9efe 100644 --- a/packages/aws-cdk-lib/aws-ecs/test/cluster.test.ts +++ b/packages/aws-cdk-lib/aws-ecs/test/cluster.test.ts @@ -1123,6 +1123,48 @@ describe('cluster', () => { }); }); + test('grantTaskProtection grants ecs:UpdateTaskProtection permission', () => { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'MyVpc', {}); + const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); + const role = new iam.Role(stack, 'TestRole', { + assumedBy: new iam.ServicePrincipal('ecs.amazonaws.com'), + }); + + // WHEN + cluster.grantTaskProtection(role); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'ecs:UpdateTaskProtection', + Effect: 'Allow', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { Ref: 'AWS::Partition' }, + ':ecs:', + { Ref: 'AWS::Region' }, + ':', + { Ref: 'AWS::AccountId' }, + ':task/', + { Ref: 'EcsCluster97242B84' }, + '/*', + ], + ], + }, + }, + ], + Version: '2012-10-17', + }, + }); + }); + /* * TODO:v2.0.0 END OF OBSOLETE BLOCK */ diff --git a/packages/aws-cdk-lib/aws-ecs/test/container-definition.test.ts b/packages/aws-cdk-lib/aws-ecs/test/container-definition.test.ts index f537852fae364..76c1d5c254109 100644 --- a/packages/aws-cdk-lib/aws-ecs/test/container-definition.test.ts +++ b/packages/aws-cdk-lib/aws-ecs/test/container-definition.test.ts @@ -2636,4 +2636,30 @@ describe('container definition', () => { }); }); }); + + test('can specify interactive parameter', () => { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + new ecs.ContainerDefinition(stack, 'Container', { + image: ecs.ContainerImage.fromRegistry('/aws/aws-example-app'), + taskDefinition, + memoryLimitMiB: 2048, + interactive: true, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + Essential: true, + Image: '/aws/aws-example-app', + Memory: 2048, + Name: 'Container', + Interactive: true, + }, + ], + }); + }); }); diff --git a/packages/aws-cdk-lib/aws-events/lib/event-bus.ts b/packages/aws-cdk-lib/aws-events/lib/event-bus.ts index a59aa8c1b4cca..78f533c5a5536 100644 --- a/packages/aws-cdk-lib/aws-events/lib/event-bus.ts +++ b/packages/aws-cdk-lib/aws-events/lib/event-bus.ts @@ -341,10 +341,13 @@ export class EventBus extends EventBusBase { throw new Error('Event Bus policy statements must have a sid'); } - const policy = new EventBusPolicy(this, statement.sid, { + // In order to generate new statementIDs for the change in https://github.com/aws/aws-cdk/pull/27340 + const statementId = `cdk-${statement.sid}`.slice(0, 64); + statement.sid = statementId; + const policy = new EventBusPolicy(this, statementId, { eventBus: this, statement: statement.toJSON(), - statementId: statement.sid, + statementId, }); return { statementAdded: true, policyDependable: policy }; diff --git a/packages/aws-cdk-lib/aws-events/test/event-bus.test.ts b/packages/aws-cdk-lib/aws-events/test/event-bus.test.ts index 3d9b4de91994c..da4a96a3763e3 100644 --- a/packages/aws-cdk-lib/aws-events/test/event-bus.test.ts +++ b/packages/aws-cdk-lib/aws-events/test/event-bus.test.ts @@ -548,7 +548,7 @@ describe('event bus', () => { // THEN Template.fromStack(stack).hasResourceProperties('AWS::Events::EventBusPolicy', { - StatementId: '123', + StatementId: 'cdk-123', EventBusName: { Ref: 'BusEA82B648', }, @@ -569,7 +569,7 @@ describe('event bus', () => { ], }, }, - Sid: '123', + Sid: 'cdk-123', Resource: { 'Fn::GetAtt': [ 'BusEA82B648', diff --git a/packages/aws-cdk-lib/aws-iam/lib/principals.ts b/packages/aws-cdk-lib/aws-iam/lib/principals.ts index c6e350f40192b..5de347fd4606f 100644 --- a/packages/aws-cdk-lib/aws-iam/lib/principals.ts +++ b/packages/aws-cdk-lib/aws-iam/lib/principals.ts @@ -264,6 +264,20 @@ export class PrincipalWithConditions extends PrincipalAdapter { this.additionalConditions = conditions; } + public addToAssumeRolePolicy(doc: PolicyDocument) { + // Lazy import to avoid circular import dependencies during startup + + // eslint-disable-next-line @typescript-eslint/no-require-imports + const adapter: typeof import('./private/policydoc-adapter') = require('./private/policydoc-adapter'); + + defaultAddPrincipalToAssumeRole(this.wrapped, new adapter.MutatingPolicyDocumentAdapter(doc, (statement) => { + // Avoid override of existing actions (see https://github.com/aws/aws-cdk/issues/28426) + statement.addActions(this.assumeRoleAction); + statement.addConditions(this.conditions); + return statement; + })); + } + /** * Add a condition to the principal */ diff --git a/packages/aws-cdk-lib/aws-iam/lib/role.ts b/packages/aws-cdk-lib/aws-iam/lib/role.ts index 5ed1302543d47..b8937d7b951aa 100644 --- a/packages/aws-cdk-lib/aws-iam/lib/role.ts +++ b/packages/aws-cdk-lib/aws-iam/lib/role.ts @@ -413,6 +413,10 @@ export class Role extends Resource implements IRole { physicalName: props.roleName, }); + if (props.roleName && !Token.isUnresolved(props.roleName) && !/^[\w+=,.@-]{1,64}$/.test(props.roleName)) { + throw new Error('Invalid roleName. The name must be a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. Length must be between 1 and 64 characters.'); + } + const externalIds = props.externalIds || []; if (props.externalId) { externalIds.push(props.externalId); diff --git a/packages/aws-cdk-lib/aws-iam/test/principals.test.ts b/packages/aws-cdk-lib/aws-iam/test/principals.test.ts index cc1d166845930..8b9532e0d17e1 100644 --- a/packages/aws-cdk-lib/aws-iam/test/principals.test.ts +++ b/packages/aws-cdk-lib/aws-iam/test/principals.test.ts @@ -441,4 +441,44 @@ test('Can enable session tags', () => { ], }, }); -}); \ No newline at end of file +}); + +test('Can enable session tags with conditions (order of calls is irrelevant)', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + new iam.Role(stack, 'Role', { + assumedBy: new iam.ServicePrincipal( + 's3.amazonaws.com') + .withConditions({ + StringEquals: { hairColor: 'blond' }, + }) + .withSessionTags(), + }); + + new iam.Role(stack, 'Role2', { + assumedBy: new iam.ServicePrincipal( + 's3.amazonaws.com') + .withSessionTags() + .withConditions({ + StringEquals: { hairColor: 'blond' }, + }), + }); + + // THEN + Template.fromStack(stack).resourcePropertiesCountIs('AWS::IAM::Role', { + AssumeRolePolicyDocument: { + Statement: [ + { + Action: ['sts:AssumeRole', 'sts:TagSession'], + Condition: { + StringEquals: { hairColor: 'blond' }, + }, + Effect: 'Allow', + Principal: { Service: 's3.amazonaws.com' }, + }, + ], + }, + }, 2); +}); diff --git a/packages/aws-cdk-lib/aws-iam/test/role.test.ts b/packages/aws-cdk-lib/aws-iam/test/role.test.ts index 5d239254d5bbc..88ee4f2d6cbbc 100644 --- a/packages/aws-cdk-lib/aws-iam/test/role.test.ts +++ b/packages/aws-cdk-lib/aws-iam/test/role.test.ts @@ -1,7 +1,7 @@ import { testDeprecated } from '@aws-cdk/cdk-build-tools'; import { Construct } from 'constructs'; import { Template, Match, Annotations } from '../../assertions'; -import { Duration, Stack, App, CfnResource, RemovalPolicy, Lazy, Stage, DefaultStackSynthesizer, CliCredentialsStackSynthesizer, PERMISSIONS_BOUNDARY_CONTEXT_KEY, PermissionsBoundary } from '../../core'; +import { Duration, Stack, App, CfnResource, RemovalPolicy, Lazy, Stage, DefaultStackSynthesizer, CliCredentialsStackSynthesizer, PERMISSIONS_BOUNDARY_CONTEXT_KEY, PermissionsBoundary, Token } from '../../core'; import { AnyPrincipal, ArnPrincipal, CompositePrincipal, FederatedPrincipal, ManagedPolicy, PolicyStatement, Role, ServicePrincipal, User, Policy, PolicyDocument, Effect } from '../lib'; describe('isRole() returns', () => { @@ -1325,3 +1325,84 @@ test('cross-env role ARNs include path', () => { }, }); }); + +test('doesn\'t throw with roleName of 64 chars', () => { + const app = new App(); + const stack = new Stack(app, 'MyStack'); + const valdName = 'a'.repeat(64); + + expect(() => { + new Role(stack, 'Test', { + assumedBy: new ServicePrincipal('sns.amazonaws.com'), + roleName: valdName, + }); + }).not.toThrow('Invalid roleName'); +}); + +test('throws with roleName over 64 chars', () => { + const app = new App(); + const stack = new Stack(app, 'MyStack'); + const longName = 'a'.repeat(65); + + expect(() => { + new Role(stack, 'Test', { + assumedBy: new ServicePrincipal('sns.amazonaws.com'), + roleName: longName, + }); + }).toThrow('Invalid roleName'); +}); + +describe('roleName validation', () => { + const app = new App(); + const stack = new Stack(app, 'MyStack'); + const invalidChars = '!#$%^&*()'; + + it('rejects names with spaces', () => { + expect(() => { + new Role(stack, 'test spaces', { + assumedBy: new ServicePrincipal('sns.amazonaws.com'), + roleName: 'invalid name', + }); + }).toThrow('Invalid roleName'); + }); + + invalidChars.split('').forEach(char => { + it(`rejects name with ${char}`, () => { + expect(() => { + new Role(stack, `test ${char}`, { + assumedBy: new ServicePrincipal('sns.amazonaws.com'), + roleName: `invalid${char}`, + }); + }).toThrow('Invalid roleName'); + }); + }); + +}); + +test('roleName validation with Tokens', () =>{ + const app = new App(); + const stack = new Stack(app, 'MyStack'); + const token = Lazy.string({ produce: () => 'token' }); + + // Mock isUnresolved to return false + jest.spyOn(Token, 'isUnresolved').mockReturnValue(false); + + expect(() => { + new Role(stack, 'Valid', { + assumedBy: new ServicePrincipal('sns.amazonaws.com'), + roleName: token, + }); + }).toThrow('Invalid roleName'); + + // Mock isUnresolved to return true + jest.spyOn(Token, 'isUnresolved').mockReturnValue(true); + + expect(() => { + new Role(stack, 'Invalid', { + assumedBy: new ServicePrincipal('sns.amazonaws.com'), + roleName: token, + }); + }).not.toThrow('Invalid roleName'); + + jest.clearAllMocks(); +}); \ No newline at end of file diff --git a/packages/aws-cdk-lib/aws-lambda/lib/function.ts b/packages/aws-cdk-lib/aws-lambda/lib/function.ts index 2a7d151a23c8e..6af25ad28bf33 100644 --- a/packages/aws-cdk-lib/aws-lambda/lib/function.ts +++ b/packages/aws-cdk-lib/aws-lambda/lib/function.ts @@ -48,7 +48,7 @@ export enum Tracing { /** * Lambda will not trace any request. */ - DISABLED = 'Disabled' + DISABLED = 'Disabled', } /** @@ -68,7 +68,7 @@ export enum SystemLogLevel { /** * Lambda will capture only logs at warn level. */ - WARN = 'WARN' + WARN = 'WARN', } /** @@ -100,7 +100,7 @@ export enum ApplicationLogLevel { /** * Lambda will capture only logs at fatal level. */ - FATAL = 'FATAL' + FATAL = 'FATAL', } /** @@ -118,7 +118,7 @@ export enum LogFormat { /** * Lambda structured logging in Json format. */ - JSON = 'JSON' + JSON = 'JSON', } /** diff --git a/packages/aws-cdk-lib/aws-opensearchservice/README.md b/packages/aws-cdk-lib/aws-opensearchservice/README.md index bb5cf3f7f3bc6..9078815c579e8 100644 --- a/packages/aws-cdk-lib/aws-opensearchservice/README.md +++ b/packages/aws-cdk-lib/aws-opensearchservice/README.md @@ -36,7 +36,6 @@ const gp3Domain = new Domain(this, 'Domain', { }); ``` - Create a production grade cluster by also specifying things like capacity and az distribution ```ts @@ -473,4 +472,15 @@ const domain = new Domain(this, 'Domain', { version: EngineVersion.OPENSEARCH_1_3, enableAutoSoftwareUpdate: true, }); -``` \ No newline at end of file +``` + +## IP address type + +You can specify either dual stack or IPv4 as your IP address type. + +```ts +const domain = new Domain(this, 'Domain', { + version: EngineVersion.OPENSEARCH_1_3, + ipAddressType: IpAddressType.DUAL_STACK, +}); +``` diff --git a/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts b/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts index 830ed96724fed..154f849647ea1 100644 --- a/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts +++ b/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts @@ -423,6 +423,20 @@ export interface WindowStartTime { readonly minutes: number; } +/** + * The IP address type for the domain. + */ +export enum IpAddressType { + /** + * IPv4 addresses only + */ + IPV4 = 'ipv4', + /** + * IPv4 and IPv6 addresses + */ + DUAL_STACK = 'dualstack', +} + /** * Properties for an Amazon OpenSearch Service domain. */ @@ -642,6 +656,16 @@ export interface DomainProps { * @default - false */ readonly enableAutoSoftwareUpdate?: boolean; + + /** + * Specify either dual stack or IPv4 as your IP address type. + * Dual stack allows you to share domain resources across IPv4 and IPv6 address types, and is the recommended option. + * + * If you set your IP address type to dual stack, you can't change your address type later. + * + * @default - IpAddressType.IPV4 + */ + readonly ipAddressType?: IpAddressType; } /** @@ -1883,6 +1907,7 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { softwareUpdateOptions: props.enableAutoSoftwareUpdate ? { autoSoftwareUpdateEnabled: props.enableAutoSoftwareUpdate, } : undefined, + ipAddressType: props.ipAddressType, }); this.domain.applyRemovalPolicy(props.removalPolicy); diff --git a/packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts b/packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts index 58ff9cf1959aa..aab03cc079d1d 100644 --- a/packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts +++ b/packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts @@ -10,7 +10,7 @@ import * as logs from '../../aws-logs'; import * as route53 from '../../aws-route53'; import { App, Stack, Duration, SecretValue, CfnParameter, Token } from '../../core'; import * as cxapi from '../../cx-api'; -import { Domain, DomainProps, EngineVersion } from '../lib'; +import { Domain, DomainProps, EngineVersion, IpAddressType } from '../lib'; let app: App; let stack: Stack; @@ -2468,6 +2468,20 @@ describe('EBS Options Configurations', () => { }); }); +each([ + [IpAddressType.IPV4, 'ipv4'], + [IpAddressType.DUAL_STACK, 'dualstack'], +]).test('ip address type', (type, expected) => { + new Domain(stack, 'Domain', { + version: EngineVersion.OPENSEARCH_2_5, + ipAddressType: type, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::OpenSearchService::Domain', { + IPAddressType: expected, + }); +}); + function testGrant( expectedActions: string[], invocation: (user: iam.IPrincipal, domain: Domain) => void, diff --git a/packages/aws-cdk-lib/aws-rds/README.md b/packages/aws-cdk-lib/aws-rds/README.md index 6b56958ebae40..24046fb698435 100644 --- a/packages/aws-cdk-lib/aws-rds/README.md +++ b/packages/aws-cdk-lib/aws-rds/README.md @@ -788,6 +788,27 @@ proxy.grantConnect(role, 'admin'); // Grant the role connection access to the DB **Note**: In addition to the setup above, a database user will need to be created to support IAM auth. See for setup instructions. +To specify the details of authentication used by a proxy to log in as a specific database +user use the `clientPasswordAuthType` property: + +```ts +declare const vpc: ec2.Vpc; +const cluster = new rds.DatabaseCluster(this, 'Database', { + engine: rds.DatabaseClusterEngine.auroraMysql({ + version: rds.AuroraMysqlEngineVersion.VER_3_03_0, + }), + writer: rds.ClusterInstance.provisioned('writer'), + vpc, +}); + +const proxy = new rds.DatabaseProxy(this, 'Proxy', { + proxyTarget: rds.ProxyTarget.fromCluster(cluster), + secrets: [cluster.secret!], + vpc, + clientPasswordAuthType: rds.ClientPasswordAuthType.MYSQL_NATIVE_PASSWORD, +}); +``` + ### Cluster The following example shows granting connection access for an IAM role to an Aurora Cluster. @@ -1042,6 +1063,8 @@ const cluster = new rds.ServerlessCluster(this, 'AnotherCluster', { autoPause: Duration.minutes(10), // default is to pause after 5 minutes of idle time minCapacity: rds.AuroraCapacityUnit.ACU_8, // default is 2 Aurora capacity units (ACUs) maxCapacity: rds.AuroraCapacityUnit.ACU_32, // default is 16 Aurora capacity units (ACUs) + timeout: Duration.seconds(100), // default is 5 minutes + timeoutAction: rds.TimeoutAction.FORCE_APPLY_CAPACITY_CHANGE // default is ROLLBACK_CAPACITY_CHANGE } }); ``` diff --git a/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts b/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts index 375d8ea3af348..f0740b727d3ee 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts @@ -855,6 +855,8 @@ export class AuroraPostgresEngineVersion { public static readonly VER_12_15 = AuroraPostgresEngineVersion.of('12.15', '12', { s3Import: true, s3Export: true }); /** Version "12.16". */ public static readonly VER_12_16 = AuroraPostgresEngineVersion.of('12.16', '12', { s3Import: true, s3Export: true }); + /** Version "12.17". */ + public static readonly VER_12_17 = AuroraPostgresEngineVersion.of('12.17', '12', { s3Import: true, s3Export: true }); /** * Version "13.3". * @deprecated Version 13.3 is no longer supported by Amazon RDS. @@ -887,6 +889,8 @@ export class AuroraPostgresEngineVersion { public static readonly VER_13_11 = AuroraPostgresEngineVersion.of('13.11', '13', { s3Import: true, s3Export: true }); /** Version "13.12". */ public static readonly VER_13_12 = AuroraPostgresEngineVersion.of('13.12', '13', { s3Import: true, s3Export: true }); + /** Version "13.13". */ + public static readonly VER_13_13 = AuroraPostgresEngineVersion.of('13.13', '13', { s3Import: true, s3Export: true }); /** Version "14.3". */ public static readonly VER_14_3 = AuroraPostgresEngineVersion.of('14.3', '14', { s3Import: true, s3Export: true }); /** @@ -904,12 +908,20 @@ export class AuroraPostgresEngineVersion { public static readonly VER_14_8 = AuroraPostgresEngineVersion.of('14.8', '14', { s3Import: true, s3Export: true }); /** Version "14.9". */ public static readonly VER_14_9 = AuroraPostgresEngineVersion.of('14.9', '14', { s3Import: true, s3Export: true }); + /** Version "14.10". */ + public static readonly VER_14_10 = AuroraPostgresEngineVersion.of('14.10', '14', { s3Import: true, s3Export: true }); /** Version "15.2". */ public static readonly VER_15_2 = AuroraPostgresEngineVersion.of('15.2', '15', { s3Import: true, s3Export: true }); /** Version "15.3". */ public static readonly VER_15_3 = AuroraPostgresEngineVersion.of('15.3', '15', { s3Import: true, s3Export: true }); /** Version "15.4". */ - public static readonly VER_15_4 = AuroraPostgresEngineVersion.of('15.4', '15', { s3Import: true, s3Export: true }) + public static readonly VER_15_4 = AuroraPostgresEngineVersion.of('15.4', '15', { s3Import: true, s3Export: true }); + /** Version "15.5". */ + public static readonly VER_15_5 = AuroraPostgresEngineVersion.of('15.5', '15', { s3Import: true, s3Export: true }); + /** Version "16.0". + * Version 16.0 is available in preview environment as of November 15, 2023. + */ + public static readonly VER_16_0 = AuroraPostgresEngineVersion.of('16.0', '16', { s3Import: true, s3Export: true }); /** * Create a new AuroraPostgresEngineVersion with an arbitrary version. diff --git a/packages/aws-cdk-lib/aws-rds/lib/proxy.ts b/packages/aws-cdk-lib/aws-rds/lib/proxy.ts index 63f8b483b908e..1e66307be4406 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/proxy.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/proxy.ts @@ -3,13 +3,35 @@ import { IDatabaseCluster } from './cluster-ref'; import { IEngine } from './engine'; import { IDatabaseInstance } from './instance'; import { engineDescription } from './private/util'; -import { CfnDBProxy, CfnDBProxyTargetGroup } from './rds.generated'; +import { CfnDBProxy, CfnDBProxyTargetGroup, CfnDBInstance } from './rds.generated'; import * as ec2 from '../../aws-ec2'; import * as iam from '../../aws-iam'; import * as secretsmanager from '../../aws-secretsmanager'; import * as cdk from '../../core'; import * as cxapi from '../../cx-api'; +/** + * Client password authentication type used by a proxy to log in as a specific database user. + */ +export enum ClientPasswordAuthType { + /** + * MySQL Native Password client authentication type. + */ + MYSQL_NATIVE_PASSWORD = 'MYSQL_NATIVE_PASSWORD', + /** + * SCRAM SHA 256 client authentication type. + */ + POSTGRES_SCRAM_SHA_256 = 'POSTGRES_SCRAM_SHA_256', + /** + * PostgreSQL MD5 client authentication type. + */ + POSTGRES_MD5 = 'POSTGRES_MD5', + /** + * SQL Server Authentication client authentication type. + */ + SQL_SERVER_AUTHENTICATION = 'SQL_SERVER_AUTHENTICATION', +} + /** * SessionPinningFilter * @@ -259,6 +281,13 @@ export interface DatabaseProxyOptions { * The VPC to associate with the new proxy. */ readonly vpc: ec2.IVpc; + + /** + * Specifies the details of authentication used by a proxy to log in as a specific database user. + * + * @default - CloudFormation defaults will apply given the specified database engine. + */ + readonly clientPasswordAuthType?: ClientPasswordAuthType; } /** @@ -445,10 +474,13 @@ export class DatabaseProxy extends DatabaseProxyBase } this.secrets = props.secrets; + this.validateClientPasswordAuthType(bindResult.engineFamily, props.clientPasswordAuthType); + this.resource = new CfnDBProxy(this, 'Resource', { auth: props.secrets.map(_ => { return { authScheme: 'SECRETS', + clientPasswordAuthType: props.clientPasswordAuthType, iamAuth: props.iamAuth ? 'REQUIRED' : 'DISABLED', secretArn: _.secretArn, }; @@ -490,7 +522,22 @@ export class DatabaseProxy extends DatabaseProxyBase connectionPoolConfigurationInfo: toConnectionPoolConfigurationInfo(props), }); - bindResult.dbClusters?.forEach((c) => proxyTargetGroup.node.addDependency(c)); + // When a `DatabaseProxy` is created by `DatabaseCluster.addProxy`, + // the `DatabaseProxy` and `DBProxyTarget` are created as a child of the `DatabaseCluster`, + // so if multiple `DatabaseProxy` are created by `DatabaseCluster.addProxy`, + // using `node.addDependency` will cause circular dependencies. + // To avoid this, use `CfnResource.addDependency` to add dependencies on `DatabaseCluster` and `DBInstance`. + bindResult.dbClusters?.forEach((cluster) => { + cluster.node.children.forEach((child) => { + if (child instanceof CfnDBInstance) { + proxyTargetGroup.addDependency(child); + } + }); + const clusterResource = cluster.node.defaultChild as cdk.CfnResource; + if (clusterResource && cdk.CfnResource.isCfnResource(clusterResource)) { + proxyTargetGroup.addDependency(clusterResource); + } + }); } /** @@ -514,6 +561,22 @@ export class DatabaseProxy extends DatabaseProxyBase } return super.grantConnect(grantee, dbUser); } + + private validateClientPasswordAuthType(engineFamily: string, clientPasswordAuthType?: ClientPasswordAuthType) { + if (!clientPasswordAuthType || cdk.Token.isUnresolved(clientPasswordAuthType)) return; + if (clientPasswordAuthType === ClientPasswordAuthType.MYSQL_NATIVE_PASSWORD && engineFamily !== 'MYSQL') { + throw new Error(`${ClientPasswordAuthType.MYSQL_NATIVE_PASSWORD} client password authentication type requires MYSQL engineFamily, got ${engineFamily}`); + } + if (clientPasswordAuthType === ClientPasswordAuthType.POSTGRES_SCRAM_SHA_256 && engineFamily !== 'POSTGRESQL') { + throw new Error(`${ClientPasswordAuthType.POSTGRES_SCRAM_SHA_256} client password authentication type requires POSTGRESQL engineFamily, got ${engineFamily}`); + } + if (clientPasswordAuthType === ClientPasswordAuthType.POSTGRES_MD5 && engineFamily !== 'POSTGRESQL') { + throw new Error(`${ClientPasswordAuthType.POSTGRES_MD5} client password authentication type requires POSTGRESQL engineFamily, got ${engineFamily}`); + } + if (clientPasswordAuthType === ClientPasswordAuthType.SQL_SERVER_AUTHENTICATION && engineFamily !== 'SQLSERVER') { + throw new Error(`${ClientPasswordAuthType.SQL_SERVER_AUTHENTICATION} client password authentication type requires SQLSERVER engineFamily, got ${engineFamily}`); + } + } } /** diff --git a/packages/aws-cdk-lib/aws-rds/lib/serverless-cluster.ts b/packages/aws-cdk-lib/aws-rds/lib/serverless-cluster.ts index ca2662b84e3ed..d43d78a6ea415 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/serverless-cluster.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/serverless-cluster.ts @@ -239,6 +239,26 @@ export enum AuroraCapacityUnit { ACU_384 = 384 } +/** + * TimeoutAction defines the action to take when a timeout occurs if a scaling point is not found. + * + * @see https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v1.how-it-works.html#aurora-serverless.how-it-works.timeout-action + */ +export enum TimeoutAction { + /** + * FORCE_APPLY_CAPACITY_CHANGE sets the capacity to the specified value as soon as possible. + * Transactions may be interrupted, and connections to temporary tables and locks may be dropped. + * Only select this option if your application can recover from dropped connections or incomplete transactions. + */ + FORCE_APPLY_CAPACITY_CHANGE = 'ForceApplyCapacityChange', + + /** + * ROLLBACK_CAPACITY_CHANGE ignores the capacity change if a scaling point is not found. + * This is the default behavior. + */ + ROLLBACK_CAPACITY_CHANGE = 'RollbackCapacityChange', +} + /** * Options for configuring scaling on an Aurora Serverless cluster * @@ -272,6 +292,23 @@ export interface ServerlessScalingOptions { * @default - automatic pause enabled after 5 minutes */ readonly autoPause?: Duration; + + /** + * The amount of time that Aurora Serverless v1 tries to find a scaling point to perform + * seamless scaling before enforcing the timeout action. + * + * @default - 5 minutes + */ + readonly timeout? : Duration; + + /** + * The action to take when the timeout is reached. + * Selecting ForceApplyCapacityChange will force the capacity to the specified value as soon as possible, even without a scaling point. + * Selecting RollbackCapacityChange will ignore the capacity change if a scaling point is not found. This is the default behavior. + * + * @default - TimeoutAction.ROLLBACK_CAPACITY_CHANGE + */ + readonly timeoutAction?: TimeoutAction; } /** @@ -444,6 +481,7 @@ abstract class ServerlessClusterNew extends ServerlessClusterBase { private renderScalingConfiguration(options: ServerlessScalingOptions): CfnDBCluster.ScalingConfigurationProperty { const minCapacity = options.minCapacity; const maxCapacity = options.maxCapacity; + const timeout = options.timeout?.toSeconds(); if (minCapacity && maxCapacity && minCapacity > maxCapacity) { throw new Error('maximum capacity must be greater than or equal to minimum capacity.'); @@ -454,11 +492,17 @@ abstract class ServerlessClusterNew extends ServerlessClusterBase { throw new Error('auto pause time must be between 5 minutes and 1 day.'); } + if (timeout && (timeout < 60 || timeout > 600)) { + throw new Error(`timeout must be between 60 and 600 seconds, but got ${timeout} seconds.`); + } + return { autoPause: (secondsToAutoPause === 0) ? false : true, minCapacity: options.minCapacity, maxCapacity: options.maxCapacity, secondsUntilAutoPause: (secondsToAutoPause === 0) ? undefined : secondsToAutoPause, + secondsBeforeTimeout: timeout, + timeoutAction: options.timeoutAction, }; } } diff --git a/packages/aws-cdk-lib/aws-rds/test/proxy.test.ts b/packages/aws-cdk-lib/aws-rds/test/proxy.test.ts index 1b9c7de783110..6546164210972 100644 --- a/packages/aws-cdk-lib/aws-rds/test/proxy.test.ts +++ b/packages/aws-cdk-lib/aws-rds/test/proxy.test.ts @@ -399,14 +399,192 @@ describe('proxy', () => { 'clusterInstance183584D40', 'clusterInstance23D1AD8B2', 'cluster611F8AFF', - 'clusterSecretAttachment69BFCEC4', - 'clusterSecretE349B730', - 'clusterSecurityGroupfromproxyProxySecurityGroupA80F0525IndirectPortA13E5F3D', - 'clusterSecurityGroupF441DCEA', - 'clusterSubnets81E3593F', ], }); }); + + test('Correct dependencies are created when multiple DatabaseProxy are created with addProxy', () => { + // GIVEN + const cluster = new rds.DatabaseCluster(stack, 'cluster', { + engine: rds.DatabaseClusterEngine.AURORA, + instanceProps: { + vpc, + }, + }); + + //WHEN + cluster.addProxy('Proxy', { + vpc, + secrets: [cluster.secret!], + }); + cluster.addProxy('Proxy2', { + vpc, + secrets: [cluster.secret!], + }); + + // THEN + Template.fromStack(stack).hasResource('AWS::RDS::DBProxyTargetGroup', { + Properties: { + DBProxyName: { + Ref: 'clusterProxy22303E35D', + }, + TargetGroupName: 'default', + }, + DependsOn: [ + 'clusterInstance183584D40', + 'clusterInstance23D1AD8B2', + 'cluster611F8AFF', + ], + }); + Template.fromStack(stack).hasResource('AWS::RDS::DBProxyTargetGroup', { + Properties: { + DBProxyName: { + Ref: 'clusterProxyC4BEF551', + }, + TargetGroupName: 'default', + }, + DependsOn: [ + 'clusterInstance183584D40', + 'clusterInstance23D1AD8B2', + 'cluster611F8AFF', + ], + }); + }); + + describe('clientPasswordAuthType', () => { + test('create a DB proxy with specified client password authentication type', () => { + // GIVEN + const instance = new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.mysql({ + version: rds.MysqlEngineVersion.VER_5_7, + }), + vpc, + }); + + // WHEN + new rds.DatabaseProxy(stack, 'Proxy', { + proxyTarget: rds.ProxyTarget.fromInstance(instance), + secrets: [instance.secret!], + vpc, + clientPasswordAuthType: rds.ClientPasswordAuthType.MYSQL_NATIVE_PASSWORD, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::RDS::DBProxy', { + Auth: [ + { + AuthScheme: 'SECRETS', + IAMAuth: 'DISABLED', + ClientPasswordAuthType: 'MYSQL_NATIVE_PASSWORD', + SecretArn: { + Ref: 'InstanceSecretAttachment83BEE581', + }, + }, + ], + DBProxyName: 'Proxy', + EngineFamily: 'MYSQL', + RequireTLS: true, + RoleArn: { + 'Fn::GetAtt': [ + 'ProxyIAMRole2FE8AB0F', + 'Arn', + ], + }, + VpcSubnetIds: [ + { + Ref: 'VPCPrivateSubnet1Subnet8BCA10E0', + }, + { + Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A', + }, + ], + }); + }); + + test('MYSQL_NATIVE_PASSWORD clientPasswordAuthType requires MYSQL engine family', () => { + // GIVEN + const instance = new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.postgres({ + version: rds.PostgresEngineVersion.VER_11, + }), + vpc, + }); + + // WHEN + // THEN + expect(() => { + new rds.DatabaseProxy(stack, 'Proxy', { + proxyTarget: rds.ProxyTarget.fromInstance(instance), + secrets: [instance.secret!], + vpc, + clientPasswordAuthType: rds.ClientPasswordAuthType.MYSQL_NATIVE_PASSWORD, + }); + }).toThrow(/MYSQL_NATIVE_PASSWORD client password authentication type requires MYSQL engineFamily, got POSTGRESQL/); + }); + + test('POSTGRES_SCRAM_SHA_256 clientPasswordAuthType requires POSTGRESQL engine family', () => { + // GIVEN + const instance = new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.mysql({ + version: rds.MysqlEngineVersion.VER_5_7, + }), + vpc, + }); + + // WHEN + // THEN + expect(() => { + new rds.DatabaseProxy(stack, 'Proxy', { + proxyTarget: rds.ProxyTarget.fromInstance(instance), + secrets: [instance.secret!], + vpc, + clientPasswordAuthType: rds.ClientPasswordAuthType.POSTGRES_SCRAM_SHA_256, + }); + }).toThrow(/POSTGRES_SCRAM_SHA_256 client password authentication type requires POSTGRESQL engineFamily, got MYSQL/); + }); + + test('POSTGRES_MD5 clientPasswordAuthType requires POSTGRESQL engine family', () => { + // GIVEN + const instance = new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.mysql({ + version: rds.MysqlEngineVersion.VER_5_7, + }), + vpc, + }); + + // WHEN + // THEN + expect(() => { + new rds.DatabaseProxy(stack, 'Proxy', { + proxyTarget: rds.ProxyTarget.fromInstance(instance), + secrets: [instance.secret!], + vpc, + clientPasswordAuthType: rds.ClientPasswordAuthType.POSTGRES_MD5, + }); + }).toThrow(/POSTGRES_MD5 client password authentication type requires POSTGRESQL engineFamily, got MYSQL/); + }); + + test('SQL_SERVER_AUTHENTICATION clientPasswordAuthType requires SQLSERVER engine family', () => { + // GIVEN + const instance = new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.mysql({ + version: rds.MysqlEngineVersion.VER_5_7, + }), + vpc, + }); + + // WHEN + // THEN + expect(() => { + new rds.DatabaseProxy(stack, 'Proxy', { + proxyTarget: rds.ProxyTarget.fromInstance(instance), + secrets: [instance.secret!], + vpc, + clientPasswordAuthType: rds.ClientPasswordAuthType.SQL_SERVER_AUTHENTICATION, + }); + }).toThrow(/SQL_SERVER_AUTHENTICATION client password authentication type requires SQLSERVER engineFamily, got MYSQL/); + }); + }); }); describe('feature flag @aws-cdk/aws-rds:databaseProxyUniqueResourceName', () => { diff --git a/packages/aws-cdk-lib/aws-rds/test/serverless-cluster.test.ts b/packages/aws-cdk-lib/aws-rds/test/serverless-cluster.test.ts index cae4e4a84b886..08c57abf25ffc 100644 --- a/packages/aws-cdk-lib/aws-rds/test/serverless-cluster.test.ts +++ b/packages/aws-cdk-lib/aws-rds/test/serverless-cluster.test.ts @@ -4,7 +4,7 @@ import * as iam from '../../aws-iam'; import * as kms from '../../aws-kms'; import * as cdk from '../../core'; import * as cxapi from '../../cx-api'; -import { AuroraPostgresEngineVersion, ServerlessCluster, DatabaseClusterEngine, ParameterGroup, AuroraCapacityUnit, DatabaseSecret, SubnetGroup } from '../lib'; +import { AuroraPostgresEngineVersion, ServerlessCluster, DatabaseClusterEngine, ParameterGroup, AuroraCapacityUnit, DatabaseSecret, SubnetGroup, TimeoutAction } from '../lib'; describe('serverless cluster', () => { test('can create a Serverless Cluster with Aurora Postgres database engine', () => { @@ -935,6 +935,56 @@ describe('serverless cluster', () => { }); }); + test('check properties propagation of ServerlessScalingOptions', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new ServerlessCluster(stack, 'Database', { + engine: DatabaseClusterEngine.AURORA_MYSQL, + vpc: new ec2.Vpc(stack, 'Vpc'), + scaling: { + autoPause: cdk.Duration.minutes(10), + minCapacity: AuroraCapacityUnit.ACU_8, + maxCapacity: AuroraCapacityUnit.ACU_32, + timeout: cdk.Duration.minutes(10), + timeoutAction: TimeoutAction.FORCE_APPLY_CAPACITY_CHANGE, + }, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::RDS::DBCluster', { + ScalingConfiguration: { + AutoPause: true, + MaxCapacity: 32, + MinCapacity: 8, + SecondsUntilAutoPause: 600, + SecondsBeforeTimeout: 600, + TimeoutAction: 'ForceApplyCapacityChange', + }, + }); + }); + + test.each([ + cdk.Duration.seconds(59), + cdk.Duration.seconds(601), + ])('invalid ServerlessScalingOptions throws', (duration) => { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'Vpc'); + + // THEN + expect(() => new ServerlessCluster(stack, 'Database1', { + engine: DatabaseClusterEngine.AURORA_MYSQL, + vpc, + scaling: { + autoPause: cdk.Duration.minutes(10), + minCapacity: AuroraCapacityUnit.ACU_8, + maxCapacity: AuroraCapacityUnit.ACU_32, + timeout: duration, + }, + })).toThrow(/timeout must be between 60 and 600 seconds/); + }); }); function testStack(app?: cdk.App, id?: string): cdk.Stack { diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/README.md b/packages/aws-cdk-lib/aws-stepfunctions-tasks/README.md index f142c4890be2b..c19d860f46892 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/README.md +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/README.md @@ -634,7 +634,7 @@ new tasks.EmrCreateCluster(this, 'SpotSpecification', { spotSpecification: { allocationStrategy: tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED, timeoutAction: tasks.EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER, - timeoutDurationMinutes: 60, + timeout: Duration.minutes(5), }, }, }], diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts index a1f82782755c4..0f1feb0a096fb 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts @@ -582,6 +582,8 @@ export namespace EmrCreateCluster { /** * The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD. * + * Cannot specify both `bidPrice` and `bidPriceAsPercentageOfOnDemandPrice`. + * * @default - None */ readonly bidPrice?: string; @@ -589,6 +591,8 @@ export namespace EmrCreateCluster { /** * The bid price, as a percentage of On-Demand price. * + * Cannot specify both `bidPrice` and `bidPriceAsPercentageOfOnDemandPrice`. + * * @default - None */ readonly bidPriceAsPercentageOfOnDemandPrice?: number; @@ -680,6 +684,20 @@ export namespace EmrCreateCluster { * Capacity-optimized, which launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. */ CAPACITY_OPTIMIZED = 'capacity-optimized', + /** + * Price-capacity-optimized, which launches instances from Spot Instance pools with the highest capacity availability for the number of instances that are launching. + * + * Recommended. + */ + PRICE_CAPACITY_OPTIMIZED = 'price-capacity-optimized', + /** + * Lowest-price, which launches instances from the lowest priced pool that has available capacity. + */ + LOWEST_PRICE = 'lowest-price', + /** + * Diversified, which launches instances across all Spot capacity pools. + */ + DIVERSIFIED = 'diversified', } /** @@ -713,8 +731,27 @@ export namespace EmrCreateCluster { /** * The spot provisioning timeout period in minutes. + * + * The value must be between 5 and 1440 minutes. + * + * You must specify one of `timeout` and `timeoutDurationMinutes`. + * + * @default - The value in `timeout` is used + * + * @deprecated - Use `timeout`. + */ + readonly timeoutDurationMinutes?: number; + + /** + * The spot provisioning timeout period in minutes. + * + * The value must be between 5 and 1440 minutes. + * + * You must specify one of `timeout` and `timeoutDurationMinutes`. + * + * @default - The value in `timeoutDurationMinutes` is used */ - readonly timeoutDurationMinutes: number; + readonly timeout?: cdk.Duration; } /** @@ -781,6 +818,12 @@ export namespace EmrCreateCluster { /** * The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. * + * If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using `targetSpotCapacity`. + * + * At least one of `targetSpotCapacity` and `targetOnDemandCapacity` should be greater than 0. + * For a master instance fleet, only one of `targetSpotCapacity` and `targetOnDemandCapacity` can be specified, and its value + * must be 1. + * * @default No targetOnDemandCapacity */ readonly targetOnDemandCapacity?: number; @@ -788,7 +831,13 @@ export namespace EmrCreateCluster { /** * The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision * - * @default No targetSpotCapacity + * If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet using `targetOnDemandCapacity`. + * + * At least one of `targetSpotCapacity` and `targetOnDemandCapacity` should be greater than 0. + * For a master instance fleet, only one of `targetSpotCapacity` and `targetOnDemandCapacity` can be specified, and its value + * must be 1. + * + * @default No targetSpotCapacity */ readonly targetSpotCapacity?: number; } diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/private/cluster-utils.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/private/cluster-utils.ts index ea43357b433a5..21630dd0efe4e 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/private/cluster-utils.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/private/cluster-utils.ts @@ -105,6 +105,10 @@ export function EbsConfigurationPropertyToJson(property: EmrCreateCluster.EbsCon * @param property */ export function InstanceTypeConfigPropertyToJson(property: EmrCreateCluster.InstanceTypeConfigProperty) { + if (property.bidPrice && property.bidPriceAsPercentageOfOnDemandPrice) { + throw new Error('Cannot specify both bidPrice and bidPriceAsPercentageOfOnDemandPrice'); + } + return { BidPrice: cdk.stringToCloudFormation(property.bidPrice), BidPriceAsPercentageOfOnDemandPrice: cdk.numberToCloudFormation(property.bidPriceAsPercentageOfOnDemandPrice), @@ -146,11 +150,20 @@ function SpotProvisioningSpecificationPropertyToJson(property?: EmrCreateCluster if (!property) { return undefined; } + + if ((property.timeout && property.timeoutDurationMinutes) || (!property.timeout && !property.timeoutDurationMinutes)) { + throw new Error('one of timeout and timeoutDurationMinutes must be specified'); + } + const timeout = property.timeout?.toMinutes() ?? property.timeoutDurationMinutes; + if (timeout !== undefined && !cdk.Token.isUnresolved(timeout) && (timeout < 5 || timeout > 1440)) { + throw new Error(`timeout must be between 5 and 1440 minutes, got ${timeout} minutes.`); + } + return { AllocationStrategy: cdk.stringToCloudFormation(property.allocationStrategy), BlockDurationMinutes: cdk.numberToCloudFormation(property.blockDurationMinutes), TimeoutAction: cdk.stringToCloudFormation(property.timeoutAction?.valueOf()), - TimeoutDurationMinutes: cdk.numberToCloudFormation(property.timeoutDurationMinutes), + TimeoutDurationMinutes: cdk.numberToCloudFormation(property.timeout?.toMinutes() || property.timeoutDurationMinutes), }; } @@ -160,6 +173,20 @@ function SpotProvisioningSpecificationPropertyToJson(property?: EmrCreateCluster * @param property */ export function InstanceFleetConfigPropertyToJson(property: EmrCreateCluster.InstanceFleetConfigProperty) { + if (!property.targetSpotCapacity && !property.targetOnDemandCapacity) { + throw new Error('At least one of targetSpotCapacity and targetOnDemandCapacity should be greater than 0'); + } + if (property.instanceFleetType === EmrCreateCluster.InstanceRoleType.MASTER) { + if (property.targetSpotCapacity && property.targetOnDemandCapacity) { + throw new Error('For a master instance fleet, only one of targetSpotCapacity and targetOnDemandCapacity can be specified'); + } + if (property.targetSpotCapacity && property.targetSpotCapacity !== 1) { + throw new Error(`For a master instance fleet, targetSpotCapacity cannot be a number other than 1, got ${property.targetSpotCapacity}`); + } + if (property.targetOnDemandCapacity && property.targetOnDemandCapacity !== 1) { + throw new Error(`For a master instance fleet, targetOnDemandCapacity cannot be a number other than 1, got ${property.targetOnDemandCapacity}`); + } + } return { InstanceFleetType: cdk.stringToCloudFormation(property.instanceFleetType?.valueOf()), InstanceTypeConfigs: cdk.listMapper(InstanceTypeConfigPropertyToJson)(property.instanceTypeConfigs), diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emr/emr-create-cluster.test.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emr/emr-create-cluster.test.ts index a0be73f8f94ba..5c3b69a412087 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emr/emr-create-cluster.test.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emr/emr-create-cluster.test.ts @@ -1,4 +1,4 @@ -import { Template, Match } from '../../../assertions'; +import { Template } from '../../../assertions'; import * as iam from '../../../aws-iam'; import * as sfn from '../../../aws-stepfunctions'; import * as cdk from '../../../core'; @@ -883,7 +883,12 @@ test('Create Cluster with Instances configuration', () => { }); }); -test('Create Cluster with InstanceFleet with allocation strategy=capacity-optimized for Spot instances', () => { +test.each([ + [EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED, 'capacity-optimized'], + [EmrCreateCluster.SpotAllocationStrategy.PRICE_CAPACITY_OPTIMIZED, 'price-capacity-optimized'], + [EmrCreateCluster.SpotAllocationStrategy.LOWEST_PRICE, 'lowest-price'], + [EmrCreateCluster.SpotAllocationStrategy.DIVERSIFIED, 'diversified'], +])('Create Cluster with InstanceFleet with allocation strategy %s for Spot instances', (strategy, expected) => { // WHEN const task = new EmrCreateCluster(stack, 'Task', { instances: { @@ -891,7 +896,6 @@ test('Create Cluster with InstanceFleet with allocation strategy=capacity-optimi instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, instanceTypeConfigs: [{ bidPrice: '1', - bidPriceAsPercentageOfOnDemandPrice: 1, configurations: [{ classification: 'Classification', properties: { @@ -914,14 +918,13 @@ test('Create Cluster with InstanceFleet with allocation strategy=capacity-optimi }], launchSpecifications: { spotSpecification: { - allocationStrategy: EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED, + allocationStrategy: strategy, blockDurationMinutes: 1, timeoutAction: EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER, - timeoutDurationMinutes: 1, + timeout: cdk.Duration.minutes(5), }, }, name: 'Main', - targetOnDemandCapacity: 1, targetSpotCapacity: 1, }], }, @@ -955,7 +958,6 @@ test('Create Cluster with InstanceFleet with allocation strategy=capacity-optimi InstanceFleetType: 'MASTER', InstanceTypeConfigs: [{ BidPrice: '1', - BidPriceAsPercentageOfOnDemandPrice: 1, Configurations: [{ Classification: 'Classification', Properties: { @@ -978,14 +980,13 @@ test('Create Cluster with InstanceFleet with allocation strategy=capacity-optimi }], LaunchSpecifications: { SpotSpecification: { - AllocationStrategy: 'capacity-optimized', + AllocationStrategy: expected, BlockDurationMinutes: 1, TimeoutAction: 'TERMINATE_CLUSTER', - TimeoutDurationMinutes: 1, + TimeoutDurationMinutes: 5, }, }, Name: 'Main', - TargetOnDemandCapacity: 1, TargetSpotCapacity: 1, }], }, @@ -1008,7 +1009,6 @@ test('Create Cluster with InstanceFleet for Spot instances', () => { instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, instanceTypeConfigs: [{ bidPrice: '1', - bidPriceAsPercentageOfOnDemandPrice: 1, configurations: [{ classification: 'Classification', properties: { @@ -1033,11 +1033,10 @@ test('Create Cluster with InstanceFleet for Spot instances', () => { spotSpecification: { blockDurationMinutes: 1, timeoutAction: EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER, - timeoutDurationMinutes: 1, + timeout: cdk.Duration.minutes(5), }, }, name: 'Main', - targetOnDemandCapacity: 1, targetSpotCapacity: 1, }], }, @@ -1071,7 +1070,6 @@ test('Create Cluster with InstanceFleet for Spot instances', () => { InstanceFleetType: 'MASTER', InstanceTypeConfigs: [{ BidPrice: '1', - BidPriceAsPercentageOfOnDemandPrice: 1, Configurations: [{ Classification: 'Classification', Properties: { @@ -1096,11 +1094,10 @@ test('Create Cluster with InstanceFleet for Spot instances', () => { SpotSpecification: { BlockDurationMinutes: 1, TimeoutAction: 'TERMINATE_CLUSTER', - TimeoutDurationMinutes: 1, + TimeoutDurationMinutes: 5, }, }, Name: 'Main', - TargetOnDemandCapacity: 1, TargetSpotCapacity: 1, }], }, @@ -1123,7 +1120,6 @@ test('Create Cluster with InstanceFleet for On-Demand instances', () => { instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, instanceTypeConfigs: [{ bidPrice: '1', - bidPriceAsPercentageOfOnDemandPrice: 1, configurations: [{ classification: 'Classification', properties: { @@ -1151,7 +1147,6 @@ test('Create Cluster with InstanceFleet for On-Demand instances', () => { }, name: 'Main', targetOnDemandCapacity: 1, - targetSpotCapacity: 1, }], }, clusterRole, @@ -1184,7 +1179,6 @@ test('Create Cluster with InstanceFleet for On-Demand instances', () => { InstanceFleetType: 'MASTER', InstanceTypeConfigs: [{ BidPrice: '1', - BidPriceAsPercentageOfOnDemandPrice: 1, Configurations: [{ Classification: 'Classification', Properties: { @@ -1212,7 +1206,6 @@ test('Create Cluster with InstanceFleet for On-Demand instances', () => { }, Name: 'Main', TargetOnDemandCapacity: 1, - TargetSpotCapacity: 1, }], }, VisibleToAllUsers: true, @@ -1226,6 +1219,289 @@ test('Create Cluster with InstanceFleet for On-Demand instances', () => { }); }); +test('Throws if timeout for Spot instances is less than 5 minutes', () => { + // GIVEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + launchSpecifications: { + spotSpecification: { + timeoutAction: EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER, + timeout: cdk.Duration.minutes(4), + }, + }, + name: 'Main', + targetSpotCapacity: 1, + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/timeout must be between 5 and 1440 minutes, got 4/); +}); + +test('Throws if timeout for Spot instances is greater than 1440 minutes', () => { + // GIVEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + launchSpecifications: { + spotSpecification: { + timeoutAction: EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER, + timeout: cdk.Duration.minutes(1441), + }, + }, + name: 'Main', + targetSpotCapacity: 1, + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/timeout must be between 5 and 1440 minutes, got 1441 minutes./); +}); + +test('Throws if timeoutDurationMinutes for Spot instances is less than 5 minutes', () => { + // GIVEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + launchSpecifications: { + spotSpecification: { + timeoutAction: EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER, + timeoutDurationMinutes: 4, + }, + }, + name: 'Main', + targetSpotCapacity: 1, + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/timeout must be between 5 and 1440 minutes, got 4 minutes./); +}); + +test('Throws if timeoutDurationMinutes for Spot instances is greater than 1440 minutes', () => { + // GIVEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + launchSpecifications: { + spotSpecification: { + timeoutAction: EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER, + timeoutDurationMinutes: 1441, + }, + }, + name: 'Main', + targetSpotCapacity: 1, + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/timeout must be between 5 and 1440 minutes, got 1441 minutes./); +}); + +test('Throws if neither timeout nor timeoutDurationMinutes is specified', () => { + // GIVEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + launchSpecifications: { + spotSpecification: { + timeoutAction: EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER, + }, + }, + name: 'Main', + targetSpotCapacity: 1, + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/one of timeout and timeoutDurationMinutes must be specified/); +}); + +test('Throws if both timeout and timeoutDurationMinutes are specified', () => { + // WHEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + launchSpecifications: { + spotSpecification: { + timeoutAction: EmrCreateCluster.SpotTimeoutAction.TERMINATE_CLUSTER, + timeout: cdk.Duration.minutes(5), + timeoutDurationMinutes: 10, + }, + }, + name: 'Main', + targetSpotCapacity: 1, + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/one of timeout and timeoutDurationMinutes must be specified/); +}); + +test('Throws if both bidPrice and bidPriceAsPercentageOfOnDemandPrice are specified', () => { + // GIVEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + instanceTypeConfigs: [{ + bidPrice: '1', + bidPriceAsPercentageOfOnDemandPrice: 1, + instanceType: 'm5.xlarge', + }], + name: 'Main', + targetSpotCapacity: 1, + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/Cannot specify both bidPrice and bidPriceAsPercentageOfOnDemandPrice/); +}); + +test('Throws if neither targetSpotCapacity nor targetOnDemandCapacity is specified', () => { + // GIVEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + name: 'Main', + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/At least one of targetSpotCapacity and targetOnDemandCapacity should be greater than 0/); +}); + +test('Throws if both targetSpotCapacity and targetOnDemandCapacity are specified for a master instance fleet', () => { + // GIVEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + name: 'Main', + targetSpotCapacity: 1, + targetOnDemandCapacity: 1, + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/For a master instance fleet, only one of targetSpotCapacity and targetOnDemandCapacity can be specified/); +}); + +test('Throws if a number other than 1 as targetSpotCapacity is specified for a master instance fleet', () => { + // GIVEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + name: 'Main', + targetSpotCapacity: 2, + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/For a master instance fleet, targetSpotCapacity cannot be a number other than 1, got 2/); +}); + +test('Throws if a number other than 1 as targetOnDemandCapacity is specified for a master instance fleet', () => { + // GIVEN + const task = new EmrCreateCluster(stack, 'Task', { + instances: { + instanceFleets: [{ + instanceFleetType: EmrCreateCluster.InstanceRoleType.MASTER, + name: 'Main', + targetOnDemandCapacity: 2, + }], + }, + clusterRole, + name: 'Cluster', + serviceRole, + integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE, + }); + + // THEN + expect(() => { + task.toStateJson(); + }).toThrow(/For a master instance fleet, targetOnDemandCapacity cannot be a number other than 1, got 2/); +}); + test('Create Cluster with InstanceGroup', () => { // WHEN const task = new EmrCreateCluster(stack, 'Task', { diff --git a/packages/aws-cdk-lib/awslint.json b/packages/aws-cdk-lib/awslint.json index 9f44fe0c02597..4798a4f3fc2fd 100644 --- a/packages/aws-cdk-lib/awslint.json +++ b/packages/aws-cdk-lib/awslint.json @@ -236,6 +236,7 @@ "docs-public-apis:aws-cdk-lib.aws_autoscaling.TargetTrackingScalingPolicy", "docs-public-apis:aws-cdk-lib.aws_cloudfront.ViewerCertificate.aliases", "docs-public-apis:aws-cdk-lib.aws_cloudfront.ViewerCertificate.props", + "docs-public-apis:aws-cdk-lib.aws_cloudfront.FunctionRuntime.value", "docs-public-apis:aws-cdk-lib.aws_cloudtrail.InsightType.value", "docs-public-apis:aws-cdk-lib.aws_cloudwatch.DefaultValue.val", "docs-public-apis:aws-cdk-lib.aws_cloudwatch.Values.toJson", diff --git a/packages/aws-cdk-lib/core/README.md b/packages/aws-cdk-lib/core/README.md index 4c7e9ecd309d0..446cb1a118976 100644 --- a/packages/aws-cdk-lib/core/README.md +++ b/packages/aws-cdk-lib/core/README.md @@ -17,9 +17,37 @@ dependencies. According to the kind of project you are developing: -- For projects that are CDK libraries, declare them both under the `devDependencies` - **and** `peerDependencies` sections. -- For CDK apps, declare them under the `dependencies` section only. +For projects that are CDK libraries in NPM, declare them both under the `devDependencies` **and** `peerDependencies` sections. +To make sure your library is compatible with the widest range of CDK versions: pick the minimum `aws-cdk-lib` version +that your library requires; declare a range dependency with a caret on that version in peerDependencies, and declare a +point version dependency on that version in devDependencies. + +For example, let's say the minimum version your library needs is `2.38.0`. Your `package.json` should look like this: + +```javascript +{ + "peerDependencies": { + "aws-cdk-lib": "^2.38.0", + "constructs": "^10.0.0" + }, + "devDependencies": { + /* Install the oldest version for testing so we don't accidentally use features from a newer version than we declare */ + "aws-cdk-lib": "2.38.0" + } +} +``` + +For CDK apps, declare them under the `dependencies` section. Use a caret so you always get the latest version: + +```json +{ + "dependencies": { + "aws-cdk-lib": "^2.38.0", + "constructs": "^10.0.0" + } +} +``` + ### Use in your code @@ -27,20 +55,27 @@ According to the kind of project you are developing: You can use a classic import to get access to each service namespaces: -```ts -import { aws_s3 as s3 } from 'aws-cdk-lib'; +```ts nofixture +import { Stack, App, aws_s3 as s3 } from 'aws-cdk-lib'; -new s3.Bucket(this, 'TestBucket'); +const app = new App(); +const stack = new Stack(app, 'TestStack'); + +new s3.Bucket(stack, 'TestBucket'); ``` #### Barrel import Alternatively, you can use "barrel" imports: -```ts +```ts nofixture +import { App, Stack } from 'aws-cdk-lib'; import { Bucket } from 'aws-cdk-lib/aws-s3'; -new Bucket(this, 'TestBucket'); +const app = new App(); +const stack = new Stack(app, 'TestStack'); + +new Bucket(stack, 'TestBucket'); ``` @@ -361,7 +396,7 @@ CloudFormation to re-read the secret. ## ARN manipulation Sometimes you will need to put together or pick apart Amazon Resource Names -(ARNs). The functions `stack.formatArn()` and `stack.parseArn()` exist for +(ARNs). The functions `stack.formatArn()` and `stack.splitArn()` exist for this purpose. `formatArn()` can be used to build an ARN from components. It will automatically @@ -374,12 +409,12 @@ declare const stack: Stack; stack.formatArn({ service: 'lambda', resource: 'function', - sep: ':', + arnFormat: ArnFormat.COLON_RESOURCE_NAME, resourceName: 'MyFunction' }); ``` -`parseArn()` can be used to get a single component from an ARN. `parseArn()` +`splitArn()` can be used to get a single component from an ARN. `splitArn()` will correctly deal with both literal ARNs and deploy-time values (tokens), but in case of a deploy-time value be aware that the result will be another deploy-time value which cannot be inspected in the CDK application. @@ -388,14 +423,13 @@ deploy-time value which cannot be inspected in the CDK application. declare const stack: Stack; // Extracts the function name out of an AWS Lambda Function ARN -const arnComponents = stack.parseArn(arn, ':'); +const arnComponents = stack.splitArn(arn, ArnFormat.COLON_RESOURCE_NAME); const functionName = arnComponents.resourceName; ``` -Note that depending on the service, the resource separator can be either -`:` or `/`, and the resource name can be either the 6th or 7th -component in the ARN. When using these functions, you will need to know -the format of the ARN you are dealing with. +Note that the format of the resource separator depends on the service and +may be any of the values supported by `ArnFormat`. When dealing with these +functions, it is important to know the format of the ARN you are dealing with. For an exhaustive list of ARN formats used in AWS, see [AWS ARNs and Namespaces](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) @@ -576,7 +610,7 @@ response to the CloudFormation service and handle various error cases. Set `serviceToken` to `lambda.functionArn` to use this provider: ```ts -const fn = new lambda.Function(this, 'MyProvider', functionProps); +const fn = new lambda.SingletonFunction(this, 'MyProvider', functionProps); new CustomResource(this, 'MyResource', { serviceToken: fn.functionArn, @@ -678,8 +712,8 @@ exports.handler = async (e) => { `sum.ts`: ```ts nofixture +import { Construct } from 'constructs'; import { - Construct, CustomResource, CustomResourceProvider, CustomResourceProviderRuntime, @@ -781,7 +815,7 @@ new CustomResource(this, 'MyResource', { }); ``` -See the [documentation](https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html) for more details. +See the [documentation](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-cdk-lib.custom_resources-readme.html) for more details. ## AWS CloudFormation features @@ -905,7 +939,7 @@ a property of the creationPolicy on the resource options. Setting it to true wil resources that depend on the fleet resource. ```ts -const fleet = new CfnFleet(stack, 'Fleet', { +const fleet = new appstream.CfnFleet(this, 'Fleet', { instanceType: 'stream.standard.small', name: 'Fleet', computeCapacity: { @@ -928,10 +962,14 @@ The format of the timeout is `PT#H#M#S`. In the example below AWS Cloudformation `CREATE_COMPLETE`. ```ts -resource.cfnOptions.resourceSignal = { - count: 3, - timeout: 'PR15M', -} +declare const resource: CfnResource; + +resource.cfnOptions.creationPolicy = { + resourceSignal: { + count: 3, + timeout: 'PR15M', + } +}; ``` [creation-policy]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html @@ -1330,8 +1368,6 @@ to all roles within a specific construct scope. The most common use case would be to apply a permissions boundary at the `Stage` level. ```ts -declare const app: App; - const prodStage = new Stage(app, 'ProdStage', { permissionsBoundary: PermissionsBoundary.fromName('cdk-${Qualifier}-PermissionsBoundary'), }); @@ -1363,11 +1399,11 @@ will be printed to the console or to a file (see below). To use one or more validation plugins in your application, use the `policyValidationBeta1` property of `Stage`: -```ts +```ts fixture=validation-plugin // globally for the entire app (an app is a stage) const app = new App({ policyValidationBeta1: [ - // These hypothetical classes implement IValidationPlugin: + // These hypothetical classes implement IPolicyValidationPluginBeta1: new ThirdPartyPluginX(), new ThirdPartyPluginY(), ], @@ -1375,7 +1411,9 @@ const app = new App({ // only apply to a particular stage const prodStage = new Stage(app, 'ProdStage', { - policyValidationBeta1: [...], + policyValidationBeta1: [ + new ThirdPartyPluginX(), + ], }); ``` @@ -1412,35 +1450,39 @@ the standard output. ### For plugin authors The communication protocol between the CDK core module and your policy tool is -defined by the `IValidationPluginBeta1` interface. To create a new plugin you must +defined by the `IPolicyValidationPluginBeta1` interface. To create a new plugin you must write a class that implements this interface. There are two things you need to implement: the plugin name (by overriding the `name` property), and the `validate()` method. -The framework will call `validate()`, passing an `IValidationContextBeta1` object. +The framework will call `validate()`, passing an `IPolicyValidationContextBeta1` object. The location of the templates to be validated is given by `templatePaths`. The -plugin should return an instance of `ValidationPluginReportBeta1`. This object +plugin should return an instance of `PolicyValidationPluginReportBeta1`. This object represents the report that the user wil receive at the end of the synthesis. -```ts -validate(context: ValidationContextBeta1): ValidationReportBeta1 { - // First read the templates using context.templatePaths... - - // ...then perform the validation, and then compose and return the report. - // Using hard-coded values here for better clarity: - return { - success: false, - violations: [{ - ruleName: 'CKV_AWS_117', - recommendation: 'Ensure that AWS Lambda function is configured inside a VPC', - fix: 'https://docs.bridgecrew.io/docs/ensure-that-aws-lambda-function-is-configured-inside-a-vpc-1', - violatingResources: [{ - resourceName: 'MyFunction3BAA72D1', - templatePath: '/home/johndoe/myapp/cdk.out/MyService.template.json', - locations: 'Properties/VpcConfig', +```ts fixture=validation-plugin +class MyPlugin implements IPolicyValidationPluginBeta1 { + public readonly name = 'MyPlugin'; + + public validate(context: IPolicyValidationContextBeta1): PolicyValidationPluginReportBeta1 { + // First read the templates using context.templatePaths... + + // ...then perform the validation, and then compose and return the report. + // Using hard-coded values here for better clarity: + return { + success: false, + violations: [{ + ruleName: 'CKV_AWS_117', + description: 'Ensure that AWS Lambda function is configured inside a VPC', + fix: 'https://docs.bridgecrew.io/docs/ensure-that-aws-lambda-function-is-configured-inside-a-vpc-1', + violatingResources: [{ + resourceLogicalId: 'MyFunction3BAA72D1', + templatePath: '/home/johndoe/myapp/cdk.out/MyService.template.json', + locations: ['Properties/VpcConfig'], + }], }], - }], - }; + }; + } } ``` @@ -1483,7 +1525,7 @@ errors) it is possible to `acknowledge` warnings to make the warning go away. For example, if > 10 IAM managed policies are added to an IAM Group, a warning will be created: -``` +```text IAM:Group:MaxPoliciesExceeded: You added 11 to IAM Group my-group. The maximum number of managed policies attached to an IAM group is 10. ``` diff --git a/packages/aws-cdk-lib/rosetta/aws_opensearchservice/default.ts-fixture b/packages/aws-cdk-lib/rosetta/aws_opensearchservice/default.ts-fixture index de5a6b7d22adc..c42bafd5f482a 100644 --- a/packages/aws-cdk-lib/rosetta/aws_opensearchservice/default.ts-fixture +++ b/packages/aws-cdk-lib/rosetta/aws_opensearchservice/default.ts-fixture @@ -1,7 +1,7 @@ // Fixture with packages imported, but nothing else import { Construct } from 'constructs'; import { RemovalPolicy, Stack, Fn } from 'aws-cdk-lib'; -import { Domain, DomainProps, EngineVersion } from 'aws-cdk-lib/aws-opensearchservice'; +import { Domain, DomainProps, EngineVersion, IpAddressType } from 'aws-cdk-lib/aws-opensearchservice'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as ec2 from 'aws-cdk-lib/aws-ec2'; import * as iam from 'aws-cdk-lib/aws-iam'; diff --git a/packages/aws-cdk-lib/rosetta/default.ts-fixture b/packages/aws-cdk-lib/rosetta/default.ts-fixture index 4b594b61d4233..8e6da2abe5cee 100644 --- a/packages/aws-cdk-lib/rosetta/default.ts-fixture +++ b/packages/aws-cdk-lib/rosetta/default.ts-fixture @@ -12,6 +12,7 @@ import * as sqs from 'aws-cdk-lib/aws-sqs'; import * as s3 from 'aws-cdk-lib/aws-s3'; import { Annotations, + ArnFormat, App, Aws, CfnCondition, @@ -57,7 +58,7 @@ declare const construct: Construct; declare const constructA: Construct; declare const constructB: Construct; declare const constructC: Construct; -declare const functionProps: lambda.FunctionProps; +declare const functionProps: lambda.SingletonFunctionProps; declare const isCompleteHandler: lambda.Function; declare const myBucket: s3.IBucket; declare const myFunction: lambda.IFunction; diff --git a/packages/aws-cdk/LICENSE b/packages/aws-cdk/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/aws-cdk/LICENSE +++ b/packages/aws-cdk/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/aws-cdk/NOTICE b/packages/aws-cdk/NOTICE index c99af884575a8..677411a318476 100644 --- a/packages/aws-cdk/NOTICE +++ b/packages/aws-cdk/NOTICE @@ -1,5 +1,5 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/aws-cdk/lib/api/deploy-stack.ts b/packages/aws-cdk/lib/api/deploy-stack.ts index 02d1d7b0f0324..390320b04baae 100644 --- a/packages/aws-cdk/lib/api/deploy-stack.ts +++ b/packages/aws-cdk/lib/api/deploy-stack.ts @@ -478,16 +478,24 @@ class FullCloudFormationDeployment { const startTime = new Date(); if (this.update) { - await this.cfn.updateStack({ - StackName: this.stackName, - ClientRequestToken: `update${this.uuid}`, - ...this.commonPrepareOptions(), - ...this.commonExecuteOptions(), - }).promise(); - - const ret = await this.monitorDeployment(startTime, undefined); await this.updateTerminationProtection(); - return ret; + + try { + await this.cfn.updateStack({ + StackName: this.stackName, + ClientRequestToken: `update${this.uuid}`, + ...this.commonPrepareOptions(), + ...this.commonExecuteOptions(), + }).promise(); + } catch (err: any) { + if (err.message === 'No updates are to be performed.') { + debug('No updates are to be performed for stack %s', this.stackName); + return { noOp: true, outputs: this.cloudFormationStack.outputs, stackArn: this.cloudFormationStack.stackId }; + } + throw err; + } + + return this.monitorDeployment(startTime, undefined); } else { // Take advantage of the fact that we can set termination protection during create const terminationProtection = this.stackArtifact.terminationProtection ?? false; diff --git a/packages/aws-cdk/test/api/deploy-stack.test.ts b/packages/aws-cdk/test/api/deploy-stack.test.ts index 440d95cbff8b2..666d4f43410ec 100644 --- a/packages/aws-cdk/test/api/deploy-stack.test.ts +++ b/packages/aws-cdk/test/api/deploy-stack.test.ts @@ -206,6 +206,25 @@ test('call UpdateStack when method=direct and the stack exists already', async ( expect(cfnMocks.updateStack).toHaveBeenCalled(); }); +test('method=direct and no updates to be performed', async () => { + cfnMocks.updateStack?.mockRejectedValueOnce({ + code: 'ValidationError', + message: 'No updates are to be performed.', + } as never); + + // WHEN + givenStackExists(); + + const ret = await deployStack({ + ...standardDeployStackArguments(), + deploymentMethod: { method: 'direct' }, + force: true, + }); + + // THEN + expect(ret).toEqual(expect.objectContaining({ noOp: true })); +}); + test("does not call tryHotswapDeployment() if 'hotswap' is false", async () => { // WHEN await deployStack({ diff --git a/packages/awslint/LICENSE b/packages/awslint/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/awslint/LICENSE +++ b/packages/awslint/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/awslint/NOTICE b/packages/awslint/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/awslint/NOTICE +++ b/packages/awslint/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/cdk-assets/LICENSE b/packages/cdk-assets/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/cdk-assets/LICENSE +++ b/packages/cdk-assets/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/cdk-assets/NOTICE b/packages/cdk-assets/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/cdk-assets/NOTICE +++ b/packages/cdk-assets/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/cdk/LICENSE b/packages/cdk/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/packages/cdk/LICENSE +++ b/packages/cdk/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/cdk/NOTICE b/packages/cdk/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/packages/cdk/NOTICE +++ b/packages/cdk/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/tools/@aws-cdk/cdk-build-tools/LICENSE b/tools/@aws-cdk/cdk-build-tools/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/tools/@aws-cdk/cdk-build-tools/LICENSE +++ b/tools/@aws-cdk/cdk-build-tools/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/tools/@aws-cdk/cdk-build-tools/NOTICE b/tools/@aws-cdk/cdk-build-tools/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/tools/@aws-cdk/cdk-build-tools/NOTICE +++ b/tools/@aws-cdk/cdk-build-tools/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/tools/@aws-cdk/cdk-release/LICENSE b/tools/@aws-cdk/cdk-release/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/tools/@aws-cdk/cdk-release/LICENSE +++ b/tools/@aws-cdk/cdk-release/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/tools/@aws-cdk/cdk-release/NOTICE b/tools/@aws-cdk/cdk-release/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/tools/@aws-cdk/cdk-release/NOTICE +++ b/tools/@aws-cdk/cdk-release/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/tools/@aws-cdk/eslint-plugin/LICENSE b/tools/@aws-cdk/eslint-plugin/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/tools/@aws-cdk/eslint-plugin/LICENSE +++ b/tools/@aws-cdk/eslint-plugin/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/tools/@aws-cdk/eslint-plugin/NOTICE b/tools/@aws-cdk/eslint-plugin/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/tools/@aws-cdk/eslint-plugin/NOTICE +++ b/tools/@aws-cdk/eslint-plugin/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/tools/@aws-cdk/pkglint/NOTICE b/tools/@aws-cdk/pkglint/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/tools/@aws-cdk/pkglint/NOTICE +++ b/tools/@aws-cdk/pkglint/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/tools/@aws-cdk/pkgtools/LICENSE b/tools/@aws-cdk/pkgtools/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/tools/@aws-cdk/pkgtools/LICENSE +++ b/tools/@aws-cdk/pkgtools/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/tools/@aws-cdk/pkgtools/NOTICE b/tools/@aws-cdk/pkgtools/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/tools/@aws-cdk/pkgtools/NOTICE +++ b/tools/@aws-cdk/pkgtools/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/tools/@aws-cdk/prlint/LICENSE b/tools/@aws-cdk/prlint/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/tools/@aws-cdk/prlint/LICENSE +++ b/tools/@aws-cdk/prlint/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/tools/@aws-cdk/prlint/NOTICE b/tools/@aws-cdk/prlint/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/tools/@aws-cdk/prlint/NOTICE +++ b/tools/@aws-cdk/prlint/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/tools/@aws-cdk/prlint/lint.ts b/tools/@aws-cdk/prlint/lint.ts index a3ded02249f4c..81b4cbddff495 100644 --- a/tools/@aws-cdk/prlint/lint.ts +++ b/tools/@aws-cdk/prlint/lint.ts @@ -494,12 +494,12 @@ export class PullRequestLinter { /** * Trusted community reviewers is derived from the source of truth at this wiki: - * https://github.com/aws/aws-cdk/wiki/Introducing-CDK-Community-PR-Reviews + * https://github.com/aws/aws-cdk/wiki/CDK-Community-PR-Reviews */ private getTrustedCommunityMembers(): string[] { if (this.trustedCommunity.length > 0) { return this.trustedCommunity; } - const wiki = execSync('curl https://raw.githubusercontent.com/wiki/aws/aws-cdk/Introducing-CDK-Community-PR-Reviews.md', { encoding: 'utf-8' }).toString(); + const wiki = execSync('curl https://raw.githubusercontent.com/wiki/aws/aws-cdk/CDK-Community-PR-Reviews.md', { encoding: 'utf-8' }).toString(); const rawMdTable = wiki.split('')[1].split('\n').filter(l => l !== ''); for (let i = 2; i < rawMdTable.length; i++) { this.trustedCommunity.push(rawMdTable[i].split('|')[1].trim()); diff --git a/tools/@aws-cdk/spec2cdk/LICENSE b/tools/@aws-cdk/spec2cdk/LICENSE index 9b722c65c5481..dcf28b52a83af 100644 --- a/tools/@aws-cdk/spec2cdk/LICENSE +++ b/tools/@aws-cdk/spec2cdk/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/tools/@aws-cdk/spec2cdk/NOTICE b/tools/@aws-cdk/spec2cdk/NOTICE index a27b7dd317649..c0b1f046c881a 100644 --- a/tools/@aws-cdk/spec2cdk/NOTICE +++ b/tools/@aws-cdk/spec2cdk/NOTICE @@ -1,2 +1,2 @@ AWS Cloud Development Kit (AWS CDK) -Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-lambda-function.json b/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-lambda-function.json deleted file mode 100644 index 3ea4aac85560f..0000000000000 --- a/tools/@aws-cdk/spec2cdk/temporary-schemas/us-east-1/aws-lambda-function.json +++ /dev/null @@ -1,546 +0,0 @@ -{ - "tagging": { - "taggable": true, - "tagOnCreate": true, - "tagUpdatable": true, - "tagProperty": "/properties/Tags", - "cloudFormationSystemTags": true - }, - "handlers": { - "read": { - "permissions": [ - "lambda:GetFunction", - "lambda:GetFunctionCodeSigningConfig" - ] - }, - "create": { - "permissions": [ - "lambda:CreateFunction", - "lambda:GetFunction", - "lambda:PutFunctionConcurrency", - "iam:PassRole", - "s3:GetObject", - "s3:GetObjectVersion", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "elasticfilesystem:DescribeMountTargets", - "kms:CreateGrant", - "kms:Decrypt", - "kms:Encrypt", - "kms:GenerateDataKey", - "lambda:GetCodeSigningConfig", - "lambda:GetFunctionCodeSigningConfig", - "lambda:GetLayerVersion", - "lambda:GetRuntimeManagementConfig", - "lambda:PutRuntimeManagementConfig", - "lambda:TagResource", - "lambda:GetPolicy", - "lambda:AddPermission", - "lambda:RemovePermission", - "lambda:GetResourcePolicy", - "lambda:PutResourcePolicy" - ] - }, - "update": { - "permissions": [ - "lambda:DeleteFunctionConcurrency", - "lambda:GetFunction", - "lambda:PutFunctionConcurrency", - "lambda:ListTags", - "lambda:TagResource", - "lambda:UntagResource", - "lambda:UpdateFunctionConfiguration", - "lambda:UpdateFunctionCode", - "iam:PassRole", - "s3:GetObject", - "s3:GetObjectVersion", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "elasticfilesystem:DescribeMountTargets", - "kms:CreateGrant", - "kms:Decrypt", - "kms:GenerateDataKey", - "lambda:GetRuntimeManagementConfig", - "lambda:PutRuntimeManagementConfig", - "lambda:PutFunctionCodeSigningConfig", - "lambda:DeleteFunctionCodeSigningConfig", - "lambda:GetCodeSigningConfig", - "lambda:GetFunctionCodeSigningConfig", - "lambda:GetPolicy", - "lambda:AddPermission", - "lambda:RemovePermission", - "lambda:GetResourcePolicy", - "lambda:PutResourcePolicy", - "lambda:DeleteResourcePolicy" - ] - }, - "list": { - "permissions": [ - "lambda:ListFunctions" - ] - }, - "delete": { - "permissions": [ - "lambda:DeleteFunction", - "ec2:DescribeNetworkInterfaces" - ] - } - }, - "typeName": "AWS::Lambda::Function", - "readOnlyProperties": [ - "/properties/SnapStartResponse", - "/properties/SnapStartResponse/ApplyOn", - "/properties/SnapStartResponse/OptimizationStatus", - "/properties/Arn" - ], - "description": "Resource Type definition for AWS::Lambda::Function in region", - "writeOnlyProperties": [ - "/properties/SnapStart", - "/properties/SnapStart/ApplyOn", - "/properties/Code", - "/properties/Code/ImageUri", - "/properties/Code/S3Bucket", - "/properties/Code/S3Key", - "/properties/Code/S3ObjectVersion", - "/properties/Code/ZipFile", - "/properties/Policy" - ], - "createOnlyProperties": [ - "/properties/FunctionName" - ], - "additionalProperties": false, - "primaryIdentifier": [ - "/properties/FunctionName" - ], - "definitions": { - "ImageConfig": { - "additionalProperties": false, - "type": "object", - "properties": { - "WorkingDirectory": { - "description": "WorkingDirectory.", - "type": "string" - }, - "Command": { - "maxItems": 1500, - "uniqueItems": true, - "description": "Command.", - "type": "array", - "items": { - "type": "string" - } - }, - "EntryPoint": { - "maxItems": 1500, - "uniqueItems": true, - "description": "EntryPoint.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "TracingConfig": { - "description": "The function's AWS X-Ray tracing configuration. To sample and record incoming requests, set Mode to Active.", - "additionalProperties": false, - "type": "object", - "properties": { - "Mode": { - "description": "The tracing mode.", - "type": "string", - "enum": [ - "Active", - "PassThrough" - ] - } - } - }, - "VpcConfig": { - "description": "The VPC security groups and subnets that are attached to a Lambda function. When you connect a function to a VPC, Lambda creates an elastic network interface for each combination of security group and subnet in the function's VPC configuration. The function can only access resources and the internet through that VPC.", - "additionalProperties": false, - "type": "object", - "properties": { - "Ipv6AllowedForDualStack": { - "description": "A boolean indicating whether IPv6 protocols will be allowed for dual stack subnets", - "type": "boolean" - }, - "SecurityGroupIds": { - "maxItems": 5, - "uniqueItems": false, - "description": "A list of VPC security groups IDs.", - "type": "array", - "items": { - "type": "string" - } - }, - "SubnetIds": { - "maxItems": 16, - "uniqueItems": false, - "description": "A list of VPC subnet IDs.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "DeadLetterConfig": { - "description": "The dead-letter queue for failed asynchronous invocations.", - "additionalProperties": false, - "type": "object", - "properties": { - "TargetArn": { - "pattern": "^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$", - "description": "The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.", - "type": "string" - } - } - }, - "RuntimeManagementConfig": { - "additionalProperties": false, - "type": "object", - "properties": { - "UpdateRuntimeOn": { - "description": "Trigger for runtime update", - "type": "string", - "enum": [ - "Auto", - "FunctionUpdate", - "Manual" - ] - }, - "RuntimeVersionArn": { - "description": "Unique identifier for a runtime version arn", - "type": "string" - } - }, - "required": [ - "UpdateRuntimeOn" - ] - }, - "SnapStart": { - "description": "The function's SnapStart setting. When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.", - "additionalProperties": false, - "type": "object", - "properties": { - "ApplyOn": { - "description": "Applying SnapStart setting on function resource type.", - "type": "string", - "enum": [ - "PublishedVersions", - "None" - ] - } - }, - "required": [ - "ApplyOn" - ] - }, - "SnapStartResponse": { - "description": "The function's SnapStart Response. When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.", - "additionalProperties": false, - "type": "object", - "properties": { - "OptimizationStatus": { - "description": "Indicates whether SnapStart is activated for the specified function version.", - "type": "string", - "enum": [ - "On", - "Off" - ] - }, - "ApplyOn": { - "description": "Applying SnapStart setting on function resource type.", - "type": "string", - "enum": [ - "PublishedVersions", - "None" - ] - } - } - }, - "Code": { - "additionalProperties": false, - "type": "object", - "properties": { - "S3ObjectVersion": { - "minLength": 1, - "description": "For versioned objects, the version of the deployment package object to use.", - "type": "string", - "maxLength": 1024 - }, - "S3Bucket": { - "minLength": 3, - "pattern": "^[0-9A-Za-z\\.\\-_]*(?