@gradientedge/cdk-utils 9.84.0 → 9.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-commit +4 -0
- package/app/api-destined-function/node_modules/.bin/rimraf +2 -2
- package/app/api-destined-function/node_modules/.bin/uuid +4 -4
- package/app/api-destined-function/package.json +5 -4
- package/babel.config.mjs +16 -0
- package/dist/app/api-destined-function/src/lib/lambda.js +4 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -17
- package/dist/lib/lambda.js +4 -8
- package/dist/lib/lambda.js.map +1 -1
- package/dist/src/lib/aws/common/construct.d.ts +3 -3
- package/dist/src/lib/aws/common/construct.js +41 -45
- package/dist/src/lib/aws/common/index.d.ts +4 -4
- package/dist/src/lib/aws/common/index.js +4 -20
- package/dist/src/lib/aws/common/resource-name-formatter.d.ts +1 -1
- package/dist/src/lib/aws/common/resource-name-formatter.js +12 -14
- package/dist/src/lib/aws/common/stack.d.ts +2 -2
- package/dist/src/lib/aws/common/stack.js +22 -29
- package/dist/src/lib/aws/common/types.d.ts +1 -1
- package/dist/src/lib/aws/common/types.js +1 -2
- package/dist/src/lib/aws/construct/api-to-any-target/index.d.ts +3 -3
- package/dist/src/lib/aws/construct/api-to-any-target/index.js +3 -19
- package/dist/src/lib/aws/construct/api-to-any-target/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/api-to-any-target/main.js +19 -23
- package/dist/src/lib/aws/construct/api-to-any-target/target.d.ts +1 -1
- package/dist/src/lib/aws/construct/api-to-any-target/target.js +1 -5
- package/dist/src/lib/aws/construct/api-to-any-target/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/api-to-any-target/types.js +1 -2
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/api.d.ts +1 -1
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/api.js +1 -5
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/event.d.ts +1 -1
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/event.js +1 -5
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/index.d.ts +4 -4
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/index.js +4 -20
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/main.js +40 -44
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/types.js +1 -2
- package/dist/src/lib/aws/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +1 -1
- package/dist/src/lib/aws/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.js +1 -5
- package/dist/src/lib/aws/construct/api-to-eventbridge-target-with-sns/index.d.ts +3 -3
- package/dist/src/lib/aws/construct/api-to-eventbridge-target-with-sns/index.js +3 -19
- package/dist/src/lib/aws/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -3
- package/dist/src/lib/aws/construct/api-to-eventbridge-target-with-sns/main.js +45 -49
- package/dist/src/lib/aws/construct/api-to-eventbridge-target-with-sns/types.d.ts +1 -1
- package/dist/src/lib/aws/construct/api-to-eventbridge-target-with-sns/types.js +1 -2
- package/dist/src/lib/aws/construct/api-to-lambda-target/api.d.ts +1 -1
- package/dist/src/lib/aws/construct/api-to-lambda-target/api.js +1 -5
- package/dist/src/lib/aws/construct/api-to-lambda-target/index.d.ts +3 -3
- package/dist/src/lib/aws/construct/api-to-lambda-target/index.js +3 -19
- package/dist/src/lib/aws/construct/api-to-lambda-target/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/api-to-lambda-target/main.js +17 -21
- package/dist/src/lib/aws/construct/api-to-lambda-target/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/api-to-lambda-target/types.js +1 -2
- package/dist/src/lib/aws/construct/application-configuration/index.d.ts +2 -2
- package/dist/src/lib/aws/construct/application-configuration/index.js +2 -18
- package/dist/src/lib/aws/construct/application-configuration/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/application-configuration/main.js +22 -26
- package/dist/src/lib/aws/construct/application-configuration/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/application-configuration/types.js +1 -2
- package/dist/src/lib/aws/construct/event-handler/handler.d.ts +1 -1
- package/dist/src/lib/aws/construct/event-handler/handler.js +1 -5
- package/dist/src/lib/aws/construct/event-handler/index.d.ts +3 -3
- package/dist/src/lib/aws/construct/event-handler/index.js +3 -19
- package/dist/src/lib/aws/construct/event-handler/main.d.ts +3 -3
- package/dist/src/lib/aws/construct/event-handler/main.js +22 -29
- package/dist/src/lib/aws/construct/event-handler/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/event-handler/types.js +1 -2
- package/dist/src/lib/aws/construct/index.d.ts +14 -14
- package/dist/src/lib/aws/construct/index.js +14 -30
- package/dist/src/lib/aws/construct/lambda-with-iam-access/index.d.ts +2 -2
- package/dist/src/lib/aws/construct/lambda-with-iam-access/index.js +2 -18
- package/dist/src/lib/aws/construct/lambda-with-iam-access/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/lambda-with-iam-access/main.js +22 -29
- package/dist/src/lib/aws/construct/lambda-with-iam-access/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/lambda-with-iam-access/types.js +1 -2
- package/dist/src/lib/aws/construct/piped-event-handler/index.d.ts +2 -2
- package/dist/src/lib/aws/construct/piped-event-handler/index.js +2 -18
- package/dist/src/lib/aws/construct/piped-event-handler/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/piped-event-handler/main.js +8 -15
- package/dist/src/lib/aws/construct/piped-event-handler/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/piped-event-handler/types.js +1 -2
- package/dist/src/lib/aws/construct/rest-api-lambda/index.d.ts +2 -2
- package/dist/src/lib/aws/construct/rest-api-lambda/index.js +2 -18
- package/dist/src/lib/aws/construct/rest-api-lambda/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/rest-api-lambda/main.js +11 -18
- package/dist/src/lib/aws/construct/rest-api-lambda/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/rest-api-lambda/types.js +1 -2
- package/dist/src/lib/aws/construct/rest-api-lambda-with-cache/index.d.ts +2 -2
- package/dist/src/lib/aws/construct/rest-api-lambda-with-cache/index.js +2 -18
- package/dist/src/lib/aws/construct/rest-api-lambda-with-cache/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/rest-api-lambda-with-cache/main.js +14 -21
- package/dist/src/lib/aws/construct/rest-api-lambda-with-cache/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/rest-api-lambda-with-cache/types.js +1 -2
- package/dist/src/lib/aws/construct/site-with-ecs-backend/constants.js +2 -5
- package/dist/src/lib/aws/construct/site-with-ecs-backend/index.d.ts +3 -3
- package/dist/src/lib/aws/construct/site-with-ecs-backend/index.js +3 -19
- package/dist/src/lib/aws/construct/site-with-ecs-backend/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/site-with-ecs-backend/main.js +31 -38
- package/dist/src/lib/aws/construct/site-with-ecs-backend/types.d.ts +3 -3
- package/dist/src/lib/aws/construct/site-with-ecs-backend/types.js +1 -2
- package/dist/src/lib/aws/construct/site-with-lambda-backend/constants.js +3 -6
- package/dist/src/lib/aws/construct/site-with-lambda-backend/index.d.ts +3 -3
- package/dist/src/lib/aws/construct/site-with-lambda-backend/index.js +3 -19
- package/dist/src/lib/aws/construct/site-with-lambda-backend/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/site-with-lambda-backend/main.js +31 -38
- package/dist/src/lib/aws/construct/site-with-lambda-backend/types.d.ts +3 -3
- package/dist/src/lib/aws/construct/site-with-lambda-backend/types.js +1 -2
- package/dist/src/lib/aws/construct/static-asset-deployment/index.d.ts +2 -2
- package/dist/src/lib/aws/construct/static-asset-deployment/index.js +2 -18
- package/dist/src/lib/aws/construct/static-asset-deployment/main.d.ts +2 -2
- package/dist/src/lib/aws/construct/static-asset-deployment/main.js +13 -20
- package/dist/src/lib/aws/construct/static-asset-deployment/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/static-asset-deployment/types.js +1 -2
- package/dist/src/lib/aws/construct/static-site/index.d.ts +2 -2
- package/dist/src/lib/aws/construct/static-site/index.js +2 -18
- package/dist/src/lib/aws/construct/static-site/main.d.ts +2 -5
- package/dist/src/lib/aws/construct/static-site/main.js +5 -15
- package/dist/src/lib/aws/construct/static-site/types.d.ts +2 -2
- package/dist/src/lib/aws/construct/static-site/types.js +1 -2
- package/dist/src/lib/aws/index.d.ts +5 -5
- package/dist/src/lib/aws/index.js +5 -21
- package/dist/src/lib/aws/services/api-gateway/index.d.ts +2 -2
- package/dist/src/lib/aws/services/api-gateway/index.js +2 -18
- package/dist/src/lib/aws/services/api-gateway/main.d.ts +2 -2
- package/dist/src/lib/aws/services/api-gateway/main.js +27 -34
- package/dist/src/lib/aws/services/api-gateway/types.d.ts +1 -1
- package/dist/src/lib/aws/services/api-gateway/types.js +1 -2
- package/dist/src/lib/aws/services/appconfig/constants.js +2 -5
- package/dist/src/lib/aws/services/appconfig/index.d.ts +3 -3
- package/dist/src/lib/aws/services/appconfig/index.js +3 -19
- package/dist/src/lib/aws/services/appconfig/main.d.ts +3 -3
- package/dist/src/lib/aws/services/appconfig/main.js +23 -27
- package/dist/src/lib/aws/services/appconfig/types.js +1 -2
- package/dist/src/lib/aws/services/certificate-manager/index.d.ts +2 -2
- package/dist/src/lib/aws/services/certificate-manager/index.js +2 -18
- package/dist/src/lib/aws/services/certificate-manager/main.d.ts +2 -2
- package/dist/src/lib/aws/services/certificate-manager/main.js +10 -14
- package/dist/src/lib/aws/services/certificate-manager/types.js +1 -2
- package/dist/src/lib/aws/services/cloudfront/index.d.ts +2 -2
- package/dist/src/lib/aws/services/cloudfront/index.js +2 -18
- package/dist/src/lib/aws/services/cloudfront/main.d.ts +7 -20
- package/dist/src/lib/aws/services/cloudfront/main.js +54 -141
- package/dist/src/lib/aws/services/cloudfront/types.d.ts +2 -7
- package/dist/src/lib/aws/services/cloudfront/types.js +1 -2
- package/dist/src/lib/aws/services/cloudtrail/index.d.ts +2 -2
- package/dist/src/lib/aws/services/cloudtrail/index.js +2 -18
- package/dist/src/lib/aws/services/cloudtrail/main.d.ts +2 -2
- package/dist/src/lib/aws/services/cloudtrail/main.js +6 -10
- package/dist/src/lib/aws/services/cloudtrail/types.js +1 -2
- package/dist/src/lib/aws/services/cloudwatch/index.d.ts +3 -3
- package/dist/src/lib/aws/services/cloudwatch/index.js +3 -19
- package/dist/src/lib/aws/services/cloudwatch/logs.d.ts +2 -2
- package/dist/src/lib/aws/services/cloudwatch/logs.js +9 -49
- package/dist/src/lib/aws/services/cloudwatch/main.d.ts +2 -2
- package/dist/src/lib/aws/services/cloudwatch/main.js +8 -48
- package/dist/src/lib/aws/services/cloudwatch/types.d.ts +1 -1
- package/dist/src/lib/aws/services/cloudwatch/types.js +1 -2
- package/dist/src/lib/aws/services/codebuild/index.d.ts +1 -1
- package/dist/src/lib/aws/services/codebuild/index.js +1 -17
- package/dist/src/lib/aws/services/codebuild/main.d.ts +1 -1
- package/dist/src/lib/aws/services/codebuild/main.js +8 -12
- package/dist/src/lib/aws/services/constants.js +2 -5
- package/dist/src/lib/aws/services/dynamodb/index.d.ts +2 -2
- package/dist/src/lib/aws/services/dynamodb/index.js +2 -18
- package/dist/src/lib/aws/services/dynamodb/main.d.ts +2 -2
- package/dist/src/lib/aws/services/dynamodb/main.js +19 -24
- package/dist/src/lib/aws/services/dynamodb/types.d.ts +1 -1
- package/dist/src/lib/aws/services/dynamodb/types.js +1 -2
- package/dist/src/lib/aws/services/elastic-container-registry/index.d.ts +1 -1
- package/dist/src/lib/aws/services/elastic-container-registry/index.js +1 -17
- package/dist/src/lib/aws/services/elastic-container-registry/main.d.ts +1 -1
- package/dist/src/lib/aws/services/elastic-container-registry/main.js +5 -9
- package/dist/src/lib/aws/services/elastic-container-service/index.d.ts +2 -2
- package/dist/src/lib/aws/services/elastic-container-service/index.js +2 -18
- package/dist/src/lib/aws/services/elastic-container-service/main.d.ts +2 -2
- package/dist/src/lib/aws/services/elastic-container-service/main.js +29 -36
- package/dist/src/lib/aws/services/elastic-container-service/types.d.ts +1 -1
- package/dist/src/lib/aws/services/elastic-container-service/types.js +1 -2
- package/dist/src/lib/aws/services/elastic-file-system/index.d.ts +2 -2
- package/dist/src/lib/aws/services/elastic-file-system/index.js +2 -18
- package/dist/src/lib/aws/services/elastic-file-system/main.d.ts +2 -2
- package/dist/src/lib/aws/services/elastic-file-system/main.js +19 -26
- package/dist/src/lib/aws/services/elastic-file-system/types.js +1 -2
- package/dist/src/lib/aws/services/elastic-kubernetes-service/index.d.ts +2 -2
- package/dist/src/lib/aws/services/elastic-kubernetes-service/index.js +2 -18
- package/dist/src/lib/aws/services/elastic-kubernetes-service/main.d.ts +2 -2
- package/dist/src/lib/aws/services/elastic-kubernetes-service/main.js +9 -13
- package/dist/src/lib/aws/services/elastic-kubernetes-service/types.js +1 -2
- package/dist/src/lib/aws/services/elasticache/index.d.ts +2 -2
- package/dist/src/lib/aws/services/elasticache/index.js +2 -18
- package/dist/src/lib/aws/services/elasticache/main.d.ts +2 -2
- package/dist/src/lib/aws/services/elasticache/main.js +14 -21
- package/dist/src/lib/aws/services/elasticache/types.js +1 -2
- package/dist/src/lib/aws/services/eventbridge/index.d.ts +3 -3
- package/dist/src/lib/aws/services/eventbridge/index.js +3 -19
- package/dist/src/lib/aws/services/eventbridge/main.d.ts +2 -2
- package/dist/src/lib/aws/services/eventbridge/main.js +39 -46
- package/dist/src/lib/aws/services/eventbridge/target.d.ts +1 -1
- package/dist/src/lib/aws/services/eventbridge/target.js +7 -12
- package/dist/src/lib/aws/services/eventbridge/types.d.ts +1 -1
- package/dist/src/lib/aws/services/eventbridge/types.js +1 -2
- package/dist/src/lib/aws/services/evidently/index.d.ts +2 -2
- package/dist/src/lib/aws/services/evidently/index.js +2 -18
- package/dist/src/lib/aws/services/evidently/main.d.ts +2 -2
- package/dist/src/lib/aws/services/evidently/main.js +18 -22
- package/dist/src/lib/aws/services/evidently/types.js +1 -2
- package/dist/src/lib/aws/services/identity-access-management/index.d.ts +1 -1
- package/dist/src/lib/aws/services/identity-access-management/index.js +1 -17
- package/dist/src/lib/aws/services/identity-access-management/main.d.ts +1 -1
- package/dist/src/lib/aws/services/identity-access-management/main.js +112 -116
- package/dist/src/lib/aws/services/index.d.ts +28 -28
- package/dist/src/lib/aws/services/index.js +28 -44
- package/dist/src/lib/aws/services/key-management-service/index.d.ts +2 -2
- package/dist/src/lib/aws/services/key-management-service/index.js +2 -18
- package/dist/src/lib/aws/services/key-management-service/main.d.ts +2 -2
- package/dist/src/lib/aws/services/key-management-service/main.js +6 -10
- package/dist/src/lib/aws/services/key-management-service/types.js +1 -2
- package/dist/src/lib/aws/services/lambda/index.d.ts +2 -2
- package/dist/src/lib/aws/services/lambda/index.js +2 -18
- package/dist/src/lib/aws/services/lambda/main.d.ts +4 -3
- package/dist/src/lib/aws/services/lambda/main.js +48 -57
- package/dist/src/lib/aws/services/lambda/types.d.ts +4 -3
- package/dist/src/lib/aws/services/lambda/types.js +1 -2
- package/dist/src/lib/aws/services/route53/index.d.ts +2 -2
- package/dist/src/lib/aws/services/route53/index.js +2 -18
- package/dist/src/lib/aws/services/route53/main.d.ts +2 -2
- package/dist/src/lib/aws/services/route53/main.js +21 -25
- package/dist/src/lib/aws/services/route53/types.js +1 -2
- package/dist/src/lib/aws/services/secrets-manager/index.d.ts +2 -2
- package/dist/src/lib/aws/services/secrets-manager/index.js +2 -18
- package/dist/src/lib/aws/services/secrets-manager/main.d.ts +2 -2
- package/dist/src/lib/aws/services/secrets-manager/main.js +12 -16
- package/dist/src/lib/aws/services/secrets-manager/types.js +1 -2
- package/dist/src/lib/aws/services/simple-notification-service/index.d.ts +2 -2
- package/dist/src/lib/aws/services/simple-notification-service/index.js +2 -18
- package/dist/src/lib/aws/services/simple-notification-service/main.d.ts +2 -2
- package/dist/src/lib/aws/services/simple-notification-service/main.js +14 -21
- package/dist/src/lib/aws/services/simple-notification-service/types.js +1 -2
- package/dist/src/lib/aws/services/simple-queue-service/index.d.ts +2 -2
- package/dist/src/lib/aws/services/simple-queue-service/index.js +2 -18
- package/dist/src/lib/aws/services/simple-queue-service/main.d.ts +3 -3
- package/dist/src/lib/aws/services/simple-queue-service/main.js +18 -25
- package/dist/src/lib/aws/services/simple-queue-service/types.d.ts +1 -1
- package/dist/src/lib/aws/services/simple-queue-service/types.js +1 -2
- package/dist/src/lib/aws/services/simple-storage-service/index.d.ts +2 -2
- package/dist/src/lib/aws/services/simple-storage-service/index.js +2 -18
- package/dist/src/lib/aws/services/simple-storage-service/main.d.ts +2 -2
- package/dist/src/lib/aws/services/simple-storage-service/main.js +35 -42
- package/dist/src/lib/aws/services/simple-storage-service/types.d.ts +1 -1
- package/dist/src/lib/aws/services/simple-storage-service/types.js +1 -2
- package/dist/src/lib/aws/services/step-function/index.d.ts +2 -2
- package/dist/src/lib/aws/services/step-function/index.js +2 -18
- package/dist/src/lib/aws/services/step-function/main.d.ts +2 -2
- package/dist/src/lib/aws/services/step-function/main.js +45 -52
- package/dist/src/lib/aws/services/step-function/types.js +1 -2
- package/dist/src/lib/aws/services/systems-manager/index.d.ts +2 -2
- package/dist/src/lib/aws/services/systems-manager/index.js +2 -18
- package/dist/src/lib/aws/services/systems-manager/main.d.ts +2 -2
- package/dist/src/lib/aws/services/systems-manager/main.js +11 -16
- package/dist/src/lib/aws/services/systems-manager/types.js +1 -2
- package/dist/src/lib/aws/services/virtual-private-cloud/index.d.ts +2 -2
- package/dist/src/lib/aws/services/virtual-private-cloud/index.js +2 -18
- package/dist/src/lib/aws/services/virtual-private-cloud/ipv6.d.ts +2 -2
- package/dist/src/lib/aws/services/virtual-private-cloud/ipv6.js +12 -19
- package/dist/src/lib/aws/services/virtual-private-cloud/main.d.ts +2 -2
- package/dist/src/lib/aws/services/virtual-private-cloud/main.js +19 -26
- package/dist/src/lib/aws/services/virtual-private-cloud/types.js +1 -2
- package/dist/src/lib/aws/services/web-application-firewall/index.d.ts +2 -2
- package/dist/src/lib/aws/services/web-application-firewall/index.js +2 -18
- package/dist/src/lib/aws/services/web-application-firewall/main.d.ts +2 -2
- package/dist/src/lib/aws/services/web-application-firewall/main.js +9 -13
- package/dist/src/lib/aws/services/web-application-firewall/types.js +1 -2
- package/dist/src/lib/aws/types/index.js +1 -2
- package/dist/src/lib/aws/utils/index.d.ts +1 -1
- package/dist/src/lib/aws/utils/index.js +11 -20
- package/dist/src/lib/azure/.gen/providers/azapi/provider/index.js +4 -43
- package/dist/src/lib/azure/common/constants.js +3 -6
- package/dist/src/lib/azure/common/construct.d.ts +3 -3
- package/dist/src/lib/azure/common/construct.js +37 -41
- package/dist/src/lib/azure/common/index.d.ts +6 -6
- package/dist/src/lib/azure/common/index.js +6 -22
- package/dist/src/lib/azure/common/resource-name-formatter.d.ts +1 -2
- package/dist/src/lib/azure/common/resource-name-formatter.js +2 -6
- package/dist/src/lib/azure/common/stack.d.ts +2 -2
- package/dist/src/lib/azure/common/stack.js +20 -27
- package/dist/src/lib/azure/common/tagging.js +5 -9
- package/dist/src/lib/azure/common/types.d.ts +3 -3
- package/dist/src/lib/azure/common/types.js +1 -2
- package/dist/src/lib/azure/index.d.ts +4 -4
- package/dist/src/lib/azure/index.js +4 -20
- package/dist/src/lib/azure/services/api-management/index.d.ts +2 -2
- package/dist/src/lib/azure/services/api-management/index.js +2 -18
- package/dist/src/lib/azure/services/api-management/main.d.ts +9 -9
- package/dist/src/lib/azure/services/api-management/main.js +41 -48
- package/dist/src/lib/azure/services/api-management/types.d.ts +6 -6
- package/dist/src/lib/azure/services/api-management/types.js +1 -2
- package/dist/src/lib/azure/services/app-configuration/index.d.ts +2 -2
- package/dist/src/lib/azure/services/app-configuration/index.js +2 -18
- package/dist/src/lib/azure/services/app-configuration/main.d.ts +3 -3
- package/dist/src/lib/azure/services/app-configuration/main.js +9 -13
- package/dist/src/lib/azure/services/app-configuration/types.d.ts +1 -1
- package/dist/src/lib/azure/services/app-configuration/types.js +1 -2
- package/dist/src/lib/azure/services/app-service/index.d.ts +2 -2
- package/dist/src/lib/azure/services/app-service/index.js +2 -18
- package/dist/src/lib/azure/services/app-service/main.d.ts +4 -4
- package/dist/src/lib/azure/services/app-service/main.js +16 -20
- package/dist/src/lib/azure/services/app-service/types.d.ts +2 -2
- package/dist/src/lib/azure/services/app-service/types.js +1 -2
- package/dist/src/lib/azure/services/application-insights/index.d.ts +2 -2
- package/dist/src/lib/azure/services/application-insights/index.js +2 -18
- package/dist/src/lib/azure/services/application-insights/main.d.ts +3 -3
- package/dist/src/lib/azure/services/application-insights/main.js +9 -13
- package/dist/src/lib/azure/services/application-insights/types.d.ts +1 -1
- package/dist/src/lib/azure/services/application-insights/types.js +1 -2
- package/dist/src/lib/azure/services/cosmosdb/index.d.ts +2 -2
- package/dist/src/lib/azure/services/cosmosdb/index.js +2 -18
- package/dist/src/lib/azure/services/cosmosdb/main.d.ts +5 -5
- package/dist/src/lib/azure/services/cosmosdb/main.js +21 -25
- package/dist/src/lib/azure/services/cosmosdb/types.d.ts +3 -3
- package/dist/src/lib/azure/services/cosmosdb/types.js +1 -2
- package/dist/src/lib/azure/services/dns/index.d.ts +2 -2
- package/dist/src/lib/azure/services/dns/index.js +2 -18
- package/dist/src/lib/azure/services/dns/main.d.ts +6 -6
- package/dist/src/lib/azure/services/dns/main.js +24 -28
- package/dist/src/lib/azure/services/dns/types.d.ts +4 -4
- package/dist/src/lib/azure/services/dns/types.js +1 -2
- package/dist/src/lib/azure/services/eventgrid/index.d.ts +2 -2
- package/dist/src/lib/azure/services/eventgrid/index.js +2 -18
- package/dist/src/lib/azure/services/eventgrid/main.d.ts +6 -6
- package/dist/src/lib/azure/services/eventgrid/main.js +34 -38
- package/dist/src/lib/azure/services/eventgrid/types.d.ts +3 -3
- package/dist/src/lib/azure/services/eventgrid/types.js +1 -2
- package/dist/src/lib/azure/services/function/index.d.ts +2 -2
- package/dist/src/lib/azure/services/function/index.js +2 -18
- package/dist/src/lib/azure/services/function/main.d.ts +5 -5
- package/dist/src/lib/azure/services/function/main.js +17 -21
- package/dist/src/lib/azure/services/function/types.d.ts +3 -3
- package/dist/src/lib/azure/services/function/types.js +1 -2
- package/dist/src/lib/azure/services/index.d.ts +15 -15
- package/dist/src/lib/azure/services/index.js +15 -31
- package/dist/src/lib/azure/services/key-vault/index.d.ts +2 -2
- package/dist/src/lib/azure/services/key-vault/index.js +2 -18
- package/dist/src/lib/azure/services/key-vault/main.d.ts +3 -3
- package/dist/src/lib/azure/services/key-vault/main.js +9 -13
- package/dist/src/lib/azure/services/key-vault/types.d.ts +1 -1
- package/dist/src/lib/azure/services/key-vault/types.js +1 -2
- package/dist/src/lib/azure/services/log-analytics-workspace/index.d.ts +2 -2
- package/dist/src/lib/azure/services/log-analytics-workspace/index.js +2 -18
- package/dist/src/lib/azure/services/log-analytics-workspace/main.d.ts +3 -3
- package/dist/src/lib/azure/services/log-analytics-workspace/main.js +9 -13
- package/dist/src/lib/azure/services/log-analytics-workspace/types.d.ts +1 -1
- package/dist/src/lib/azure/services/log-analytics-workspace/types.js +1 -2
- package/dist/src/lib/azure/services/monitor/index.d.ts +2 -2
- package/dist/src/lib/azure/services/monitor/index.js +2 -18
- package/dist/src/lib/azure/services/monitor/main.d.ts +3 -3
- package/dist/src/lib/azure/services/monitor/main.js +7 -11
- package/dist/src/lib/azure/services/monitor/types.d.ts +1 -1
- package/dist/src/lib/azure/services/monitor/types.js +1 -2
- package/dist/src/lib/azure/services/redis/index.d.ts +2 -2
- package/dist/src/lib/azure/services/redis/index.js +2 -18
- package/dist/src/lib/azure/services/redis/main.d.ts +3 -3
- package/dist/src/lib/azure/services/redis/main.js +9 -13
- package/dist/src/lib/azure/services/redis/types.d.ts +1 -1
- package/dist/src/lib/azure/services/redis/types.js +1 -2
- package/dist/src/lib/azure/services/resource-group/index.d.ts +2 -2
- package/dist/src/lib/azure/services/resource-group/index.js +2 -18
- package/dist/src/lib/azure/services/resource-group/main.d.ts +3 -3
- package/dist/src/lib/azure/services/resource-group/main.js +7 -11
- package/dist/src/lib/azure/services/resource-group/types.d.ts +1 -1
- package/dist/src/lib/azure/services/resource-group/types.js +1 -2
- package/dist/src/lib/azure/services/servicebus/index.d.ts +2 -2
- package/dist/src/lib/azure/services/servicebus/index.js +2 -18
- package/dist/src/lib/azure/services/servicebus/main.d.ts +7 -7
- package/dist/src/lib/azure/services/servicebus/main.js +29 -33
- package/dist/src/lib/azure/services/servicebus/types.d.ts +5 -5
- package/dist/src/lib/azure/services/servicebus/types.js +1 -2
- package/dist/src/lib/azure/services/storage/index.d.ts +2 -2
- package/dist/src/lib/azure/services/storage/index.js +2 -18
- package/dist/src/lib/azure/services/storage/main.d.ts +6 -6
- package/dist/src/lib/azure/services/storage/main.js +27 -31
- package/dist/src/lib/azure/services/storage/types.d.ts +5 -5
- package/dist/src/lib/azure/services/storage/types.js +1 -2
- package/dist/src/lib/azure/types/index.js +1 -2
- package/dist/src/lib/azure/utils/index.d.ts +1 -1
- package/dist/src/lib/azure/utils/index.js +5 -12
- package/dist/src/lib/cloudflare/common/constants.js +2 -5
- package/dist/src/lib/cloudflare/common/construct.d.ts +4 -4
- package/dist/src/lib/cloudflare/common/construct.js +32 -36
- package/dist/src/lib/cloudflare/common/index.d.ts +4 -4
- package/dist/src/lib/cloudflare/common/index.js +4 -20
- package/dist/src/lib/cloudflare/common/stack.d.ts +2 -2
- package/dist/src/lib/cloudflare/common/stack.js +18 -25
- package/dist/src/lib/cloudflare/common/types.d.ts +3 -3
- package/dist/src/lib/cloudflare/common/types.js +1 -2
- package/dist/src/lib/cloudflare/construct/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/construct/index.js +2 -18
- package/dist/src/lib/cloudflare/construct/pages-static-site/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/construct/pages-static-site/index.js +2 -18
- package/dist/src/lib/cloudflare/construct/pages-static-site/main.d.ts +7 -7
- package/dist/src/lib/cloudflare/construct/pages-static-site/main.js +12 -16
- package/dist/src/lib/cloudflare/construct/pages-static-site/types.d.ts +2 -2
- package/dist/src/lib/cloudflare/construct/pages-static-site/types.js +1 -2
- package/dist/src/lib/cloudflare/construct/worker-site/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/construct/worker-site/index.js +2 -18
- package/dist/src/lib/cloudflare/construct/worker-site/main.d.ts +5 -5
- package/dist/src/lib/cloudflare/construct/worker-site/main.js +15 -19
- package/dist/src/lib/cloudflare/construct/worker-site/types.d.ts +2 -2
- package/dist/src/lib/cloudflare/construct/worker-site/types.js +1 -2
- package/dist/src/lib/cloudflare/index.d.ts +5 -5
- package/dist/src/lib/cloudflare/index.js +5 -21
- package/dist/src/lib/cloudflare/services/access/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/access/index.js +2 -18
- package/dist/src/lib/cloudflare/services/access/main.d.ts +13 -13
- package/dist/src/lib/cloudflare/services/access/main.js +45 -49
- package/dist/src/lib/cloudflare/services/access/types.d.ts +11 -11
- package/dist/src/lib/cloudflare/services/access/types.js +1 -2
- package/dist/src/lib/cloudflare/services/api-shield/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/api-shield/index.js +2 -18
- package/dist/src/lib/cloudflare/services/api-shield/main.d.ts +7 -7
- package/dist/src/lib/cloudflare/services/api-shield/main.js +22 -26
- package/dist/src/lib/cloudflare/services/api-shield/types.d.ts +5 -5
- package/dist/src/lib/cloudflare/services/api-shield/types.js +1 -2
- package/dist/src/lib/cloudflare/services/argo/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/argo/index.js +2 -18
- package/dist/src/lib/cloudflare/services/argo/main.d.ts +4 -4
- package/dist/src/lib/cloudflare/services/argo/main.js +10 -14
- package/dist/src/lib/cloudflare/services/argo/types.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/argo/types.js +1 -2
- package/dist/src/lib/cloudflare/services/filter/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/filter/index.js +2 -18
- package/dist/src/lib/cloudflare/services/filter/main.d.ts +3 -3
- package/dist/src/lib/cloudflare/services/filter/main.js +6 -10
- package/dist/src/lib/cloudflare/services/filter/types.d.ts +1 -1
- package/dist/src/lib/cloudflare/services/filter/types.js +1 -2
- package/dist/src/lib/cloudflare/services/firewall/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/firewall/index.js +2 -18
- package/dist/src/lib/cloudflare/services/firewall/main.d.ts +3 -3
- package/dist/src/lib/cloudflare/services/firewall/main.js +6 -10
- package/dist/src/lib/cloudflare/services/firewall/types.d.ts +1 -1
- package/dist/src/lib/cloudflare/services/firewall/types.js +1 -2
- package/dist/src/lib/cloudflare/services/index.d.ts +10 -10
- package/dist/src/lib/cloudflare/services/index.js +10 -26
- package/dist/src/lib/cloudflare/services/page/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/page/index.js +2 -18
- package/dist/src/lib/cloudflare/services/page/main.d.ts +5 -5
- package/dist/src/lib/cloudflare/services/page/main.js +17 -21
- package/dist/src/lib/cloudflare/services/page/types.d.ts +3 -3
- package/dist/src/lib/cloudflare/services/page/types.js +1 -2
- package/dist/src/lib/cloudflare/services/record/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/record/index.js +2 -18
- package/dist/src/lib/cloudflare/services/record/main.d.ts +3 -3
- package/dist/src/lib/cloudflare/services/record/main.js +6 -10
- package/dist/src/lib/cloudflare/services/record/types.d.ts +1 -1
- package/dist/src/lib/cloudflare/services/record/types.js +1 -2
- package/dist/src/lib/cloudflare/services/rule-set/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/rule-set/index.js +2 -18
- package/dist/src/lib/cloudflare/services/rule-set/main.d.ts +3 -3
- package/dist/src/lib/cloudflare/services/rule-set/main.js +6 -10
- package/dist/src/lib/cloudflare/services/rule-set/types.d.ts +1 -1
- package/dist/src/lib/cloudflare/services/rule-set/types.js +1 -2
- package/dist/src/lib/cloudflare/services/worker/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/worker/index.js +2 -18
- package/dist/src/lib/cloudflare/services/worker/main.d.ts +8 -8
- package/dist/src/lib/cloudflare/services/worker/main.js +26 -30
- package/dist/src/lib/cloudflare/services/worker/types.d.ts +6 -6
- package/dist/src/lib/cloudflare/services/worker/types.js +1 -2
- package/dist/src/lib/cloudflare/services/zone/index.d.ts +2 -2
- package/dist/src/lib/cloudflare/services/zone/index.js +2 -18
- package/dist/src/lib/cloudflare/services/zone/main.d.ts +11 -11
- package/dist/src/lib/cloudflare/services/zone/main.js +36 -40
- package/dist/src/lib/cloudflare/services/zone/types.d.ts +9 -9
- package/dist/src/lib/cloudflare/services/zone/types.js +1 -2
- package/dist/src/lib/cloudflare/types/index.js +1 -2
- package/dist/src/lib/cloudflare/utils/index.d.ts +1 -1
- package/dist/src/lib/cloudflare/utils/index.js +5 -12
- package/dist/src/lib/common/construct.d.ts +1 -1
- package/dist/src/lib/common/construct.js +2 -6
- package/dist/src/lib/common/index.d.ts +4 -4
- package/dist/src/lib/common/index.js +7 -28
- package/dist/src/lib/common/stack.d.ts +1 -1
- package/dist/src/lib/common/stack.js +2 -6
- package/dist/src/lib/common/types.js +1 -2
- package/dist/src/lib/common/utils.d.ts +15 -4
- package/dist/src/lib/common/utils.js +18 -13
- package/dist/src/lib/index.d.ts +4 -4
- package/dist/src/lib/index.js +4 -20
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.mjs +60 -2
- package/index.ts +1 -1
- package/package.json +63 -55
- package/setup.js +3 -2
- package/src/lib/aws/common/construct.ts +5 -5
- package/src/lib/aws/common/index.ts +4 -4
- package/src/lib/aws/common/resource-name-formatter.ts +14 -9
- package/src/lib/aws/common/stack.ts +4 -4
- package/src/lib/aws/common/types.ts +1 -1
- package/src/lib/aws/construct/api-to-any-target/index.ts +3 -3
- package/src/lib/aws/construct/api-to-any-target/main.ts +3 -3
- package/src/lib/aws/construct/api-to-any-target/target.ts +1 -1
- package/src/lib/aws/construct/api-to-any-target/types.ts +2 -2
- package/src/lib/aws/construct/api-to-eventbridge-target/api.ts +1 -1
- package/src/lib/aws/construct/api-to-eventbridge-target/event.ts +1 -1
- package/src/lib/aws/construct/api-to-eventbridge-target/index.ts +4 -4
- package/src/lib/aws/construct/api-to-eventbridge-target/main.ts +4 -4
- package/src/lib/aws/construct/api-to-eventbridge-target/types.ts +2 -2
- package/src/lib/aws/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +1 -1
- package/src/lib/aws/construct/api-to-eventbridge-target-with-sns/index.ts +3 -3
- package/src/lib/aws/construct/api-to-eventbridge-target-with-sns/main.ts +4 -4
- package/src/lib/aws/construct/api-to-eventbridge-target-with-sns/types.ts +1 -1
- package/src/lib/aws/construct/api-to-lambda-target/api.ts +1 -1
- package/src/lib/aws/construct/api-to-lambda-target/index.ts +3 -3
- package/src/lib/aws/construct/api-to-lambda-target/main.ts +3 -3
- package/src/lib/aws/construct/api-to-lambda-target/types.ts +2 -2
- package/src/lib/aws/construct/application-configuration/index.ts +2 -2
- package/src/lib/aws/construct/application-configuration/main.ts +2 -2
- package/src/lib/aws/construct/application-configuration/types.ts +2 -2
- package/src/lib/aws/construct/event-handler/handler.ts +1 -1
- package/src/lib/aws/construct/event-handler/index.ts +3 -3
- package/src/lib/aws/construct/event-handler/main.ts +3 -3
- package/src/lib/aws/construct/event-handler/types.ts +9 -2
- package/src/lib/aws/construct/index.ts +14 -14
- package/src/lib/aws/construct/lambda-with-iam-access/index.ts +2 -2
- package/src/lib/aws/construct/lambda-with-iam-access/main.ts +3 -3
- package/src/lib/aws/construct/lambda-with-iam-access/types.ts +2 -2
- package/src/lib/aws/construct/piped-event-handler/index.ts +2 -2
- package/src/lib/aws/construct/piped-event-handler/main.ts +2 -2
- package/src/lib/aws/construct/piped-event-handler/types.ts +2 -2
- package/src/lib/aws/construct/rest-api-lambda/index.ts +2 -2
- package/src/lib/aws/construct/rest-api-lambda/main.ts +2 -2
- package/src/lib/aws/construct/rest-api-lambda/types.ts +2 -2
- package/src/lib/aws/construct/rest-api-lambda-with-cache/index.ts +2 -2
- package/src/lib/aws/construct/rest-api-lambda-with-cache/main.ts +3 -3
- package/src/lib/aws/construct/rest-api-lambda-with-cache/types.ts +2 -2
- package/src/lib/aws/construct/site-with-ecs-backend/index.ts +3 -3
- package/src/lib/aws/construct/site-with-ecs-backend/main.ts +2 -2
- package/src/lib/aws/construct/site-with-ecs-backend/types.ts +3 -3
- package/src/lib/aws/construct/site-with-lambda-backend/index.ts +3 -3
- package/src/lib/aws/construct/site-with-lambda-backend/main.ts +3 -3
- package/src/lib/aws/construct/site-with-lambda-backend/types.ts +4 -5
- package/src/lib/aws/construct/static-asset-deployment/index.ts +2 -2
- package/src/lib/aws/construct/static-asset-deployment/main.ts +2 -2
- package/src/lib/aws/construct/static-asset-deployment/types.ts +2 -2
- package/src/lib/aws/construct/static-site/index.ts +2 -2
- package/src/lib/aws/construct/static-site/main.ts +2 -10
- package/src/lib/aws/construct/static-site/types.ts +2 -2
- package/src/lib/aws/index.ts +5 -5
- package/src/lib/aws/services/api-gateway/index.ts +2 -2
- package/src/lib/aws/services/api-gateway/main.ts +3 -3
- package/src/lib/aws/services/api-gateway/types.ts +2 -2
- package/src/lib/aws/services/appconfig/index.ts +3 -3
- package/src/lib/aws/services/appconfig/main.ts +5 -5
- package/src/lib/aws/services/appconfig/types.ts +0 -2
- package/src/lib/aws/services/certificate-manager/index.ts +2 -2
- package/src/lib/aws/services/certificate-manager/main.ts +3 -3
- package/src/lib/aws/services/cloudfront/index.ts +2 -2
- package/src/lib/aws/services/cloudfront/main.ts +21 -81
- package/src/lib/aws/services/cloudfront/types.ts +2 -13
- package/src/lib/aws/services/cloudtrail/index.ts +2 -2
- package/src/lib/aws/services/cloudtrail/main.ts +3 -3
- package/src/lib/aws/services/cloudtrail/types.ts +0 -1
- package/src/lib/aws/services/cloudwatch/index.ts +3 -3
- package/src/lib/aws/services/cloudwatch/logs.ts +3 -3
- package/src/lib/aws/services/cloudwatch/main.ts +3 -3
- package/src/lib/aws/services/cloudwatch/types.ts +1 -1
- package/src/lib/aws/services/codebuild/index.ts +1 -1
- package/src/lib/aws/services/codebuild/main.ts +1 -1
- package/src/lib/aws/services/dynamodb/index.ts +2 -2
- package/src/lib/aws/services/dynamodb/main.ts +6 -4
- package/src/lib/aws/services/dynamodb/types.ts +1 -2
- package/src/lib/aws/services/elastic-container-registry/index.ts +1 -1
- package/src/lib/aws/services/elastic-container-registry/main.ts +2 -2
- package/src/lib/aws/services/elastic-container-service/index.ts +2 -2
- package/src/lib/aws/services/elastic-container-service/main.ts +3 -3
- package/src/lib/aws/services/elastic-container-service/types.ts +1 -2
- package/src/lib/aws/services/elastic-file-system/index.ts +2 -2
- package/src/lib/aws/services/elastic-file-system/main.ts +3 -3
- package/src/lib/aws/services/elastic-file-system/types.ts +0 -1
- package/src/lib/aws/services/elastic-kubernetes-service/index.ts +2 -2
- package/src/lib/aws/services/elastic-kubernetes-service/main.ts +3 -3
- package/src/lib/aws/services/elastic-kubernetes-service/types.ts +0 -1
- package/src/lib/aws/services/elasticache/index.ts +2 -2
- package/src/lib/aws/services/elasticache/main.ts +3 -3
- package/src/lib/aws/services/elasticache/types.ts +0 -1
- package/src/lib/aws/services/eventbridge/index.ts +3 -3
- package/src/lib/aws/services/eventbridge/main.ts +3 -3
- package/src/lib/aws/services/eventbridge/target.ts +1 -1
- package/src/lib/aws/services/eventbridge/types.ts +1 -2
- package/src/lib/aws/services/evidently/index.ts +2 -2
- package/src/lib/aws/services/evidently/main.ts +3 -3
- package/src/lib/aws/services/evidently/types.ts +0 -1
- package/src/lib/aws/services/identity-access-management/index.ts +1 -1
- package/src/lib/aws/services/identity-access-management/main.ts +2 -2
- package/src/lib/aws/services/index.ts +28 -28
- package/src/lib/aws/services/key-management-service/index.ts +2 -2
- package/src/lib/aws/services/key-management-service/main.ts +3 -3
- package/src/lib/aws/services/key-management-service/types.ts +0 -1
- package/src/lib/aws/services/lambda/index.ts +2 -2
- package/src/lib/aws/services/lambda/main.ts +10 -15
- package/src/lib/aws/services/lambda/types.ts +4 -4
- package/src/lib/aws/services/route53/index.ts +2 -2
- package/src/lib/aws/services/route53/main.ts +3 -3
- package/src/lib/aws/services/secrets-manager/index.ts +2 -2
- package/src/lib/aws/services/secrets-manager/main.ts +3 -3
- package/src/lib/aws/services/secrets-manager/types.ts +0 -1
- package/src/lib/aws/services/simple-notification-service/index.ts +2 -2
- package/src/lib/aws/services/simple-notification-service/main.ts +3 -3
- package/src/lib/aws/services/simple-notification-service/types.ts +0 -1
- package/src/lib/aws/services/simple-queue-service/index.ts +2 -2
- package/src/lib/aws/services/simple-queue-service/main.ts +4 -4
- package/src/lib/aws/services/simple-queue-service/types.ts +1 -2
- package/src/lib/aws/services/simple-storage-service/index.ts +2 -2
- package/src/lib/aws/services/simple-storage-service/main.ts +3 -3
- package/src/lib/aws/services/simple-storage-service/types.ts +1 -2
- package/src/lib/aws/services/step-function/index.ts +2 -2
- package/src/lib/aws/services/step-function/main.ts +3 -3
- package/src/lib/aws/services/step-function/types.ts +0 -1
- package/src/lib/aws/services/systems-manager/index.ts +2 -2
- package/src/lib/aws/services/systems-manager/main.ts +3 -3
- package/src/lib/aws/services/systems-manager/types.ts +0 -1
- package/src/lib/aws/services/virtual-private-cloud/index.ts +2 -2
- package/src/lib/aws/services/virtual-private-cloud/ipv6.ts +2 -2
- package/src/lib/aws/services/virtual-private-cloud/main.ts +4 -4
- package/src/lib/aws/services/virtual-private-cloud/types.ts +0 -1
- package/src/lib/aws/services/web-application-firewall/index.ts +2 -2
- package/src/lib/aws/services/web-application-firewall/main.ts +3 -3
- package/src/lib/aws/services/web-application-firewall/types.ts +0 -1
- package/src/lib/aws/utils/index.ts +1 -1
- package/src/lib/azure/common/construct.ts +16 -16
- package/src/lib/azure/common/index.ts +6 -6
- package/src/lib/azure/common/resource-name-formatter.ts +1 -2
- package/src/lib/azure/common/stack.ts +5 -5
- package/src/lib/azure/common/tagging.ts +1 -1
- package/src/lib/azure/common/types.ts +3 -3
- package/src/lib/azure/index.ts +4 -4
- package/src/lib/azure/services/api-management/index.ts +2 -2
- package/src/lib/azure/services/api-management/main.ts +20 -20
- package/src/lib/azure/services/api-management/types.ts +6 -6
- package/src/lib/azure/services/app-configuration/index.ts +2 -2
- package/src/lib/azure/services/app-configuration/main.ts +5 -5
- package/src/lib/azure/services/app-configuration/types.ts +1 -1
- package/src/lib/azure/services/app-service/index.ts +2 -2
- package/src/lib/azure/services/app-service/main.ts +6 -6
- package/src/lib/azure/services/app-service/types.ts +2 -2
- package/src/lib/azure/services/application-insights/index.ts +2 -2
- package/src/lib/azure/services/application-insights/main.ts +5 -5
- package/src/lib/azure/services/application-insights/types.ts +1 -1
- package/src/lib/azure/services/cosmosdb/index.ts +2 -2
- package/src/lib/azure/services/cosmosdb/main.ts +7 -7
- package/src/lib/azure/services/cosmosdb/types.ts +3 -3
- package/src/lib/azure/services/dns/index.ts +2 -2
- package/src/lib/azure/services/dns/main.ts +8 -8
- package/src/lib/azure/services/dns/types.ts +4 -4
- package/src/lib/azure/services/eventgrid/index.ts +2 -2
- package/src/lib/azure/services/eventgrid/main.ts +10 -10
- package/src/lib/azure/services/eventgrid/types.ts +3 -3
- package/src/lib/azure/services/function/index.ts +2 -2
- package/src/lib/azure/services/function/main.ts +7 -7
- package/src/lib/azure/services/function/types.ts +3 -3
- package/src/lib/azure/services/index.ts +15 -15
- package/src/lib/azure/services/key-vault/index.ts +2 -2
- package/src/lib/azure/services/key-vault/main.ts +5 -5
- package/src/lib/azure/services/key-vault/types.ts +1 -1
- package/src/lib/azure/services/log-analytics-workspace/index.ts +2 -2
- package/src/lib/azure/services/log-analytics-workspace/main.ts +5 -5
- package/src/lib/azure/services/log-analytics-workspace/types.ts +1 -1
- package/src/lib/azure/services/monitor/index.ts +2 -2
- package/src/lib/azure/services/monitor/main.ts +4 -4
- package/src/lib/azure/services/monitor/types.ts +1 -1
- package/src/lib/azure/services/redis/index.ts +2 -2
- package/src/lib/azure/services/redis/main.ts +5 -5
- package/src/lib/azure/services/redis/types.ts +1 -1
- package/src/lib/azure/services/resource-group/index.ts +2 -2
- package/src/lib/azure/services/resource-group/main.ts +4 -4
- package/src/lib/azure/services/resource-group/types.ts +1 -1
- package/src/lib/azure/services/servicebus/index.ts +2 -2
- package/src/lib/azure/services/servicebus/main.ts +12 -12
- package/src/lib/azure/services/servicebus/types.ts +5 -5
- package/src/lib/azure/services/storage/index.ts +2 -2
- package/src/lib/azure/services/storage/main.ts +11 -11
- package/src/lib/azure/services/storage/types.ts +6 -7
- package/src/lib/azure/utils/index.ts +1 -1
- package/src/lib/cloudflare/common/construct.ts +7 -7
- package/src/lib/cloudflare/common/index.ts +4 -4
- package/src/lib/cloudflare/common/stack.ts +3 -3
- package/src/lib/cloudflare/common/types.ts +3 -3
- package/src/lib/cloudflare/construct/index.ts +2 -2
- package/src/lib/cloudflare/construct/pages-static-site/index.ts +2 -2
- package/src/lib/cloudflare/construct/pages-static-site/main.ts +11 -11
- package/src/lib/cloudflare/construct/pages-static-site/types.ts +2 -2
- package/src/lib/cloudflare/construct/worker-site/index.ts +2 -2
- package/src/lib/cloudflare/construct/worker-site/main.ts +10 -10
- package/src/lib/cloudflare/construct/worker-site/types.ts +8 -2
- package/src/lib/cloudflare/index.ts +5 -5
- package/src/lib/cloudflare/services/access/index.ts +2 -2
- package/src/lib/cloudflare/services/access/main.ts +17 -17
- package/src/lib/cloudflare/services/access/types.ts +11 -11
- package/src/lib/cloudflare/services/api-shield/index.ts +2 -2
- package/src/lib/cloudflare/services/api-shield/main.ts +8 -8
- package/src/lib/cloudflare/services/api-shield/types.ts +6 -7
- package/src/lib/cloudflare/services/argo/index.ts +2 -2
- package/src/lib/cloudflare/services/argo/main.ts +5 -6
- package/src/lib/cloudflare/services/argo/types.ts +2 -2
- package/src/lib/cloudflare/services/filter/index.ts +2 -2
- package/src/lib/cloudflare/services/filter/main.ts +4 -4
- package/src/lib/cloudflare/services/filter/types.ts +1 -1
- package/src/lib/cloudflare/services/firewall/index.ts +2 -2
- package/src/lib/cloudflare/services/firewall/main.ts +4 -4
- package/src/lib/cloudflare/services/firewall/types.ts +1 -1
- package/src/lib/cloudflare/services/index.ts +10 -10
- package/src/lib/cloudflare/services/page/index.ts +2 -2
- package/src/lib/cloudflare/services/page/main.ts +6 -6
- package/src/lib/cloudflare/services/page/types.ts +3 -3
- package/src/lib/cloudflare/services/record/index.ts +2 -2
- package/src/lib/cloudflare/services/record/main.ts +4 -4
- package/src/lib/cloudflare/services/record/types.ts +1 -1
- package/src/lib/cloudflare/services/rule-set/index.ts +2 -2
- package/src/lib/cloudflare/services/rule-set/main.ts +4 -5
- package/src/lib/cloudflare/services/rule-set/types.ts +1 -1
- package/src/lib/cloudflare/services/worker/index.ts +2 -2
- package/src/lib/cloudflare/services/worker/main.ts +9 -9
- package/src/lib/cloudflare/services/worker/types.ts +6 -6
- package/src/lib/cloudflare/services/zone/index.ts +2 -2
- package/src/lib/cloudflare/services/zone/main.ts +12 -12
- package/src/lib/cloudflare/services/zone/types.ts +9 -9
- package/src/lib/cloudflare/utils/index.ts +1 -1
- package/src/lib/common/construct.ts +1 -1
- package/src/lib/common/index.ts +4 -4
- package/src/lib/common/stack.ts +1 -1
- package/src/lib/common/utils.ts +17 -4
- package/src/lib/index.ts +4 -4
- package/vitest.config.ts +38 -0
|
@@ -1,50 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.CloudFrontManager = void 0;
|
|
40
|
-
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
41
|
-
const cf = __importStar(require("aws-cdk-lib/aws-cloudfront"));
|
|
42
|
-
const aws_cloudfront_1 = require("aws-cdk-lib/aws-cloudfront");
|
|
43
|
-
const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
|
|
44
|
-
const custom_resources_1 = require("aws-cdk-lib/custom-resources");
|
|
45
|
-
const common_1 = require("../../common");
|
|
46
|
-
const utils_1 = require("../../utils");
|
|
47
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
1
|
+
import { Duration, RemovalPolicy, Tags } from 'aws-cdk-lib';
|
|
2
|
+
import * as cf from 'aws-cdk-lib/aws-cloudfront';
|
|
3
|
+
import { Distribution, Function, FunctionCode, HttpVersion, OriginAccessIdentity, PriceClass, SecurityPolicyProtocol, } from 'aws-cdk-lib/aws-cloudfront';
|
|
4
|
+
import { S3BucketOrigin } from 'aws-cdk-lib/aws-cloudfront-origins';
|
|
5
|
+
import { FileSystem } from 'aws-cdk-lib/aws-lambda';
|
|
6
|
+
import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId } from 'aws-cdk-lib/custom-resources';
|
|
7
|
+
import _ from 'lodash';
|
|
8
|
+
import { CommonStack } from '../../common/index.js';
|
|
9
|
+
import { createCfnOutput } from '../../utils/index.js';
|
|
48
10
|
/**
|
|
49
11
|
* @classdesc Provides operations on AWS
|
|
50
12
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -68,73 +30,20 @@ const lodash_1 = __importDefault(require("lodash"));
|
|
|
68
30
|
* }
|
|
69
31
|
* @see [CDK CloudFront Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront-readme.html}
|
|
70
32
|
*/
|
|
71
|
-
class CloudFrontManager {
|
|
33
|
+
export class CloudFrontManager {
|
|
72
34
|
createOriginAccessIdentity(id, scope, accessBucket) {
|
|
73
|
-
const oai = new
|
|
35
|
+
const oai = new OriginAccessIdentity(scope, `${id}`, {
|
|
74
36
|
comment: `${id} - ${scope.props.stage} stage`,
|
|
75
37
|
});
|
|
76
38
|
if (accessBucket)
|
|
77
39
|
accessBucket.grantRead(oai);
|
|
78
40
|
return oai;
|
|
79
41
|
}
|
|
80
|
-
/**
|
|
81
|
-
* @summary Method to create a cloudfront distribution
|
|
82
|
-
* @param id scoped id of the resource
|
|
83
|
-
* @param scope scope in which this resource is defined
|
|
84
|
-
* @param props distribution properties
|
|
85
|
-
* @param siteBucket
|
|
86
|
-
* @param logBucket
|
|
87
|
-
* @param oai
|
|
88
|
-
* @param certificate
|
|
89
|
-
* @param aliases
|
|
90
|
-
*/
|
|
91
|
-
createCloudFrontDistribution(id, scope, props, siteBucket, logBucket, oai, certificate, aliases) {
|
|
92
|
-
if (!siteBucket)
|
|
93
|
-
throw `SiteBucket not defined for ${id}`;
|
|
94
|
-
if (!certificate)
|
|
95
|
-
throw `Certificate not defined for ${id}`;
|
|
96
|
-
if (!props)
|
|
97
|
-
throw `CloudFront props undefined for ${id}`;
|
|
98
|
-
const distribution = new aws_cloudfront_1.CloudFrontWebDistribution(scope, `${id}`, {
|
|
99
|
-
...props,
|
|
100
|
-
comment: `${id} - ${scope.props.stage} stage`,
|
|
101
|
-
enabled: props.enabled ?? true,
|
|
102
|
-
httpVersion: props.httpVersion ?? aws_cloudfront_1.HttpVersion.HTTP2,
|
|
103
|
-
loggingConfig: {
|
|
104
|
-
bucket: logBucket,
|
|
105
|
-
prefix: 'cloudfront/',
|
|
106
|
-
},
|
|
107
|
-
originConfigs: [
|
|
108
|
-
{
|
|
109
|
-
behaviors: [{ isDefaultBehavior: true }],
|
|
110
|
-
s3OriginSource: {
|
|
111
|
-
originAccessIdentity: oai,
|
|
112
|
-
s3BucketSource: siteBucket,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
priceClass: props.priceClass ?? aws_cloudfront_1.PriceClass.PRICE_CLASS_ALL,
|
|
117
|
-
viewerCertificate: aws_cloudfront_1.ViewerCertificate.fromAcmCertificate(certificate, {
|
|
118
|
-
aliases: aliases,
|
|
119
|
-
securityPolicy: aws_cloudfront_1.SecurityPolicyProtocol.TLS_V1_2_2021,
|
|
120
|
-
sslMethod: aws_cloudfront_1.SSLMethod.SNI,
|
|
121
|
-
}),
|
|
122
|
-
});
|
|
123
|
-
if (props.tags && !lodash_1.default.isEmpty(props.tags)) {
|
|
124
|
-
lodash_1.default.forEach(props.tags, tag => {
|
|
125
|
-
aws_cdk_lib_1.Tags.of(distribution).add(tag.key, tag.value);
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
(0, utils_1.createCfnOutput)(`${id}-distributionId`, scope, distribution.distributionId);
|
|
129
|
-
(0, utils_1.createCfnOutput)(`${id}-distributionDomainName`, scope, distribution.distributionDomainName);
|
|
130
|
-
return distribution;
|
|
131
|
-
}
|
|
132
42
|
/**
|
|
133
43
|
* Method to create a CloudFront distribution with S3 Origin
|
|
134
44
|
* @param id scoped id of the resource
|
|
135
45
|
* @param scope scope in which this resource is defined
|
|
136
46
|
* @param props distribution properties
|
|
137
|
-
* @param origin
|
|
138
47
|
* @param siteBucket
|
|
139
48
|
* @param logBucket
|
|
140
49
|
* @param oai
|
|
@@ -142,33 +51,33 @@ class CloudFrontManager {
|
|
|
142
51
|
* @param aliases
|
|
143
52
|
* @param defaultFunctionAssociations
|
|
144
53
|
*/
|
|
145
|
-
createDistributionWithS3Origin(id, scope, props,
|
|
146
|
-
const distribution = new
|
|
54
|
+
createDistributionWithS3Origin(id, scope, props, siteBucket, logBucket, oai, certificate, aliases, defaultFunctionAssociations) {
|
|
55
|
+
const distribution = new Distribution(scope, `${id}`, {
|
|
147
56
|
...props,
|
|
148
57
|
certificate,
|
|
149
58
|
comment: `${id} - ${scope.props.stage} stage`,
|
|
150
59
|
defaultBehavior: {
|
|
151
60
|
...props.defaultBehavior,
|
|
152
61
|
functionAssociations: defaultFunctionAssociations ?? undefined,
|
|
153
|
-
origin,
|
|
62
|
+
origin: S3BucketOrigin.withOriginAccessIdentity(siteBucket, { originAccessIdentity: oai }),
|
|
154
63
|
},
|
|
155
64
|
domainNames: aliases,
|
|
156
65
|
enableLogging: props.enableLogging ?? true,
|
|
157
66
|
enabled: props.enabled ?? true,
|
|
158
|
-
httpVersion: props.httpVersion ??
|
|
67
|
+
httpVersion: props.httpVersion ?? HttpVersion.HTTP2,
|
|
159
68
|
logBucket,
|
|
160
69
|
logFilePrefix: props.logFilePrefix ?? `edge/`,
|
|
161
70
|
logIncludesCookies: props.logIncludesCookies ?? true,
|
|
162
|
-
minimumProtocolVersion: props.minimumProtocolVersion ??
|
|
163
|
-
priceClass: props.priceClass ??
|
|
71
|
+
minimumProtocolVersion: props.minimumProtocolVersion ?? SecurityPolicyProtocol.TLS_V1_2_2021,
|
|
72
|
+
priceClass: props.priceClass ?? PriceClass.PRICE_CLASS_ALL,
|
|
164
73
|
});
|
|
165
|
-
if (props.tags && !
|
|
166
|
-
|
|
167
|
-
|
|
74
|
+
if (props.tags && !_.isEmpty(props.tags)) {
|
|
75
|
+
_.forEach(props.tags, tag => {
|
|
76
|
+
Tags.of(distribution).add(tag.key, tag.value);
|
|
168
77
|
});
|
|
169
78
|
}
|
|
170
|
-
|
|
171
|
-
|
|
79
|
+
createCfnOutput(`${id}-distributionId`, scope, distribution.distributionId);
|
|
80
|
+
createCfnOutput(`${id}-distributionDomainName`, scope, distribution.distributionDomainName);
|
|
172
81
|
return distribution;
|
|
173
82
|
}
|
|
174
83
|
/**
|
|
@@ -184,7 +93,7 @@ class CloudFrontManager {
|
|
|
184
93
|
* @param responseHeadersPolicy
|
|
185
94
|
*/
|
|
186
95
|
createDistributionWithHttpOrigin(id, scope, props, origin, domainNames, logBucket, certificate, defaultFunctionAssociations, responseHeadersPolicy) {
|
|
187
|
-
const distribution = new
|
|
96
|
+
const distribution = new Distribution(scope, `${id}`, {
|
|
188
97
|
additionalBehaviors: props.additionalBehaviors,
|
|
189
98
|
certificate: certificate,
|
|
190
99
|
comment: `${id} - ${scope.props.stage} stage`,
|
|
@@ -204,21 +113,21 @@ class CloudFrontManager {
|
|
|
204
113
|
enabled: props.enabled ?? true,
|
|
205
114
|
errorResponses: props.errorResponses,
|
|
206
115
|
geoRestriction: props.geoRestriction,
|
|
207
|
-
httpVersion: props.httpVersion ??
|
|
116
|
+
httpVersion: props.httpVersion ?? HttpVersion.HTTP2,
|
|
208
117
|
logBucket: logBucket,
|
|
209
118
|
logFilePrefix: props.logFilePrefix ?? `edge/`,
|
|
210
119
|
logIncludesCookies: props.logIncludesCookies ?? true,
|
|
211
|
-
minimumProtocolVersion: props.minimumProtocolVersion ??
|
|
212
|
-
priceClass: props.priceClass ??
|
|
120
|
+
minimumProtocolVersion: props.minimumProtocolVersion ?? SecurityPolicyProtocol.TLS_V1_2_2021,
|
|
121
|
+
priceClass: props.priceClass ?? PriceClass.PRICE_CLASS_ALL,
|
|
213
122
|
webAclId: props.webAclId,
|
|
214
123
|
});
|
|
215
|
-
if (props.tags && !
|
|
216
|
-
|
|
217
|
-
|
|
124
|
+
if (props.tags && !_.isEmpty(props.tags)) {
|
|
125
|
+
_.forEach(props.tags, tag => {
|
|
126
|
+
Tags.of(distribution).add(tag.key, tag.value);
|
|
218
127
|
});
|
|
219
128
|
}
|
|
220
|
-
|
|
221
|
-
|
|
129
|
+
createCfnOutput(`${id}-distributionId`, scope, distribution.distributionId);
|
|
130
|
+
createCfnOutput(`${id}-distributionDomainName`, scope, distribution.distributionDomainName);
|
|
222
131
|
return distribution;
|
|
223
132
|
}
|
|
224
133
|
/**
|
|
@@ -240,34 +149,39 @@ class CloudFrontManager {
|
|
|
240
149
|
throw `EdgeFunction props undefined for ${id}`;
|
|
241
150
|
if (!props.functionName)
|
|
242
151
|
throw `EdgeFunction functionName undefined for ${id}`;
|
|
152
|
+
const functionName = scope.resourceNameFormatter.format(props.functionName, scope.props.resourceNameOptions?.cloudfront);
|
|
243
153
|
const edgeFunction = new cf.experimental.EdgeFunction(scope, `${id}`, {
|
|
244
154
|
code: code,
|
|
245
155
|
description: props.description,
|
|
246
156
|
environment: {
|
|
247
157
|
...environment,
|
|
248
158
|
},
|
|
249
|
-
filesystem: accessPoint ?
|
|
250
|
-
functionName
|
|
159
|
+
filesystem: accessPoint ? FileSystem.fromEfsAccessPoint(accessPoint, mountPath ?? '/mnt/msg') : undefined,
|
|
160
|
+
functionName,
|
|
251
161
|
handler: props.handler ?? 'index.handler',
|
|
252
162
|
layers: layers,
|
|
253
|
-
|
|
163
|
+
logGroup: scope.logManager.createLogGroup(`${id}-log-group`, scope, {
|
|
164
|
+
logGroupName: functionName,
|
|
165
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
166
|
+
retention: scope.props.logRetention,
|
|
167
|
+
}),
|
|
254
168
|
memorySize: props.memorySize,
|
|
255
169
|
reservedConcurrentExecutions: props.reservedConcurrentExecutions,
|
|
256
170
|
role: role,
|
|
257
|
-
runtime: props.runtime ?? scope.props.nodejsRuntime ??
|
|
171
|
+
runtime: props.runtime ?? scope.props.nodejsRuntime ?? CommonStack.NODEJS_RUNTIME,
|
|
258
172
|
securityGroups: securityGroups,
|
|
259
173
|
stackId: `${id}-stack-id-${scope.props.stage}`,
|
|
260
|
-
timeout: props.timeoutInSecs ?
|
|
174
|
+
timeout: props.timeoutInSecs ? Duration.seconds(props.timeoutInSecs) : Duration.minutes(1),
|
|
261
175
|
vpc: vpc,
|
|
262
176
|
});
|
|
263
|
-
if (props.tags && !
|
|
177
|
+
if (props.tags && !_.isEmpty(props.tags)) {
|
|
264
178
|
props.tags.forEach(tag => {
|
|
265
|
-
|
|
179
|
+
Tags.of(edgeFunction).add(tag.key, tag.value);
|
|
266
180
|
});
|
|
267
181
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
182
|
+
createCfnOutput(`${id}-edgeArn`, scope, edgeFunction.edgeArn);
|
|
183
|
+
createCfnOutput(`${id}-edgeFunctionArn`, scope, edgeFunction.functionArn);
|
|
184
|
+
createCfnOutput(`${id}-edgeFunctionName`, scope, edgeFunction.functionName);
|
|
271
185
|
return edgeFunction;
|
|
272
186
|
}
|
|
273
187
|
/**
|
|
@@ -279,16 +193,16 @@ class CloudFrontManager {
|
|
|
279
193
|
* @param paths
|
|
280
194
|
*/
|
|
281
195
|
invalidateCache(id, scope, dockerFilePath, distributionId, paths) {
|
|
282
|
-
new
|
|
196
|
+
new AwsCustomResource(scope, `${id}-trigger-codebuild-${new Date().getTime()}`, {
|
|
283
197
|
onCreate: {
|
|
284
198
|
action: 'startBuild',
|
|
285
199
|
parameters: {
|
|
286
200
|
projectName: scope.codeBuildManager.createProjectForCloudfrontInvalidation(id, scope, dockerFilePath, distributionId, paths).projectName,
|
|
287
201
|
},
|
|
288
|
-
physicalResourceId:
|
|
202
|
+
physicalResourceId: PhysicalResourceId.fromResponse('build.id'),
|
|
289
203
|
service: 'CodeBuild',
|
|
290
204
|
},
|
|
291
|
-
policy:
|
|
205
|
+
policy: AwsCustomResourcePolicy.fromSdkCalls({ resources: AwsCustomResourcePolicy.ANY_RESOURCE }),
|
|
292
206
|
});
|
|
293
207
|
}
|
|
294
208
|
/**
|
|
@@ -302,19 +216,18 @@ class CloudFrontManager {
|
|
|
302
216
|
throw `CloudFront Function props undefined for ${id}`;
|
|
303
217
|
if (!props.functionName)
|
|
304
218
|
throw `CloudFront Function functionName undefined for ${id}`;
|
|
305
|
-
const cloudfrontFunction = new
|
|
219
|
+
const cloudfrontFunction = new Function(scope, `${id}`, {
|
|
306
220
|
...props,
|
|
307
|
-
code:
|
|
221
|
+
code: FunctionCode.fromFile({
|
|
308
222
|
filePath: props.functionFilePath,
|
|
309
223
|
}),
|
|
310
224
|
functionName: scope.resourceNameFormatter.format(props.functionName, scope.props.resourceNameOptions?.cloudfront),
|
|
311
225
|
});
|
|
312
|
-
|
|
313
|
-
|
|
226
|
+
createCfnOutput(`${id}-functionArn`, scope, cloudfrontFunction.functionArn);
|
|
227
|
+
createCfnOutput(`${id}-functionName`, scope, cloudfrontFunction.functionName);
|
|
314
228
|
return cloudfrontFunction;
|
|
315
229
|
}
|
|
316
230
|
resolveDistribution(scope, props) {
|
|
317
|
-
return
|
|
231
|
+
return Distribution.fromDistributionAttributes(scope, `${scope.node.id}-sa-distribution`, props);
|
|
318
232
|
}
|
|
319
233
|
}
|
|
320
|
-
exports.CloudFrontManager = CloudFrontManager;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { DistributionProps as CfDistributionProps,
|
|
2
|
-
import { TagProps } from '../../types';
|
|
3
|
-
/**
|
|
4
|
-
*/
|
|
5
|
-
export interface CloudFrontProps extends CloudFrontWebDistributionProps {
|
|
6
|
-
tags?: TagProps[];
|
|
7
|
-
}
|
|
1
|
+
import { DistributionProps as CfDistributionProps, FunctionProps } from 'aws-cdk-lib/aws-cloudfront';
|
|
2
|
+
import { TagProps } from '../../types/index.js';
|
|
8
3
|
/**
|
|
9
4
|
*/
|
|
10
5
|
export interface DistributionProps extends CfDistributionProps {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './main';
|
|
2
|
-
export * from './types';
|
|
1
|
+
export * from './main.js';
|
|
2
|
+
export * from './types.js';
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./main"), exports);
|
|
18
|
-
__exportStar(require("./types"), exports);
|
|
1
|
+
export * from './main.js';
|
|
2
|
+
export * from './types.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CfnTrail } from 'aws-cdk-lib/aws-cloudtrail';
|
|
2
2
|
import { CfnLogGroup } from 'aws-cdk-lib/aws-logs';
|
|
3
3
|
import { CfnBucketPolicy, IBucket } from 'aws-cdk-lib/aws-s3';
|
|
4
|
-
import { CommonConstruct } from '../../common';
|
|
5
|
-
import { CloudTrailProps } from './types';
|
|
4
|
+
import { CommonConstruct } from '../../common/index.js';
|
|
5
|
+
import { CloudTrailProps } from './types.js';
|
|
6
6
|
/**
|
|
7
7
|
* @classdesc Provides operations on AWS CloudTrail.
|
|
8
8
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.CloudTrailManager = void 0;
|
|
4
|
-
const aws_cloudtrail_1 = require("aws-cdk-lib/aws-cloudtrail");
|
|
5
|
-
const utils_1 = require("../../utils");
|
|
1
|
+
import { CfnTrail } from 'aws-cdk-lib/aws-cloudtrail';
|
|
2
|
+
import { createCfnOutput } from '../../utils/index.js';
|
|
6
3
|
/**
|
|
7
4
|
* @classdesc Provides operations on AWS CloudTrail.
|
|
8
5
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -26,7 +23,7 @@ const utils_1 = require("../../utils");
|
|
|
26
23
|
* }
|
|
27
24
|
* @see [CDK CloudTrail Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudtrail-readme.html}
|
|
28
25
|
*/
|
|
29
|
-
class CloudTrailManager {
|
|
26
|
+
export class CloudTrailManager {
|
|
30
27
|
/**
|
|
31
28
|
* @summary Method to create a cloud trail
|
|
32
29
|
* @param id scoped id of the resource
|
|
@@ -43,7 +40,7 @@ class CloudTrailManager {
|
|
|
43
40
|
if (!props.trailName)
|
|
44
41
|
throw `CloudTrail trailName undefined for ${id}`;
|
|
45
42
|
const role = scope.iamManager.createRoleForCloudTrail(`${id}Role`, scope, logGroup);
|
|
46
|
-
const cloudTrail = new
|
|
43
|
+
const cloudTrail = new CfnTrail(scope, `${id}`, {
|
|
47
44
|
...props,
|
|
48
45
|
cloudWatchLogsLogGroupArn: logGroup.attrArn,
|
|
49
46
|
cloudWatchLogsRoleArn: role.attrArn,
|
|
@@ -67,9 +64,8 @@ class CloudTrailManager {
|
|
|
67
64
|
cloudTrail.addDependency(logBucketPolicy);
|
|
68
65
|
cloudTrail.addDependency(logGroup);
|
|
69
66
|
cloudTrail.addDependency(role);
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
createCfnOutput(`${id}-trailName`, scope, cloudTrail.trailName);
|
|
68
|
+
createCfnOutput(`${id}-trailArn`, scope, cloudTrail.attrArn);
|
|
72
69
|
return { cloudTrail, cloudTrailRole: role };
|
|
73
70
|
}
|
|
74
71
|
}
|
|
75
|
-
exports.CloudTrailManager = CloudTrailManager;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './logs';
|
|
2
|
-
export * from './main';
|
|
3
|
-
export * from './types';
|
|
1
|
+
export * from './logs.js';
|
|
2
|
+
export * from './main.js';
|
|
3
|
+
export * from './types.js';
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./logs"), exports);
|
|
18
|
-
__exportStar(require("./main"), exports);
|
|
19
|
-
__exportStar(require("./types"), exports);
|
|
1
|
+
export * from './logs.js';
|
|
2
|
+
export * from './main.js';
|
|
3
|
+
export * from './types.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as cdk from 'aws-cdk-lib';
|
|
2
2
|
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
3
|
-
import { CommonConstruct } from '../../common';
|
|
4
|
-
import { LogProps, MetricFilterProps } from './types';
|
|
3
|
+
import { CommonConstruct } from '../../common/index.js';
|
|
4
|
+
import { LogProps, MetricFilterProps } from './types.js';
|
|
5
5
|
/**
|
|
6
6
|
* @classdesc Provides operations on AWS CloudWatch.
|
|
7
7
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -1,46 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.LogManager = void 0;
|
|
40
|
-
const cdk = __importStar(require("aws-cdk-lib"));
|
|
41
|
-
const logs = __importStar(require("aws-cdk-lib/aws-logs"));
|
|
42
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
43
|
-
const utils = __importStar(require("../../utils"));
|
|
1
|
+
import * as cdk from 'aws-cdk-lib';
|
|
2
|
+
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
3
|
+
import _ from 'lodash';
|
|
4
|
+
import * as utils from '../../utils/index.js';
|
|
44
5
|
/**
|
|
45
6
|
* @classdesc Provides operations on AWS CloudWatch.
|
|
46
7
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -57,7 +18,7 @@ const utils = __importStar(require("../../utils"));
|
|
|
57
18
|
* }
|
|
58
19
|
* @see [CDK CloudWatch Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs-readme.html}
|
|
59
20
|
*/
|
|
60
|
-
class LogManager {
|
|
21
|
+
export class LogManager {
|
|
61
22
|
/**
|
|
62
23
|
* @summary Method to create a cloudwatch metric filter
|
|
63
24
|
* @param id scoped id of the resource
|
|
@@ -101,8 +62,8 @@ class LogManager {
|
|
|
101
62
|
logGroupName: props.logGroupName,
|
|
102
63
|
retentionInDays: props.retention,
|
|
103
64
|
});
|
|
104
|
-
if (props.tags && !
|
|
105
|
-
|
|
65
|
+
if (props.tags && !_.isEmpty(props.tags)) {
|
|
66
|
+
_.forEach(props.tags, tag => {
|
|
106
67
|
cdk.Tags.of(logGroup).add(tag.key, tag.value);
|
|
107
68
|
});
|
|
108
69
|
}
|
|
@@ -126,8 +87,8 @@ class LogManager {
|
|
|
126
87
|
removalPolicy: props.removalPolicy ?? cdk.RemovalPolicy.DESTROY,
|
|
127
88
|
retention: props.retention,
|
|
128
89
|
});
|
|
129
|
-
if (props.tags && !
|
|
130
|
-
|
|
90
|
+
if (props.tags && !_.isEmpty(props.tags)) {
|
|
91
|
+
_.forEach(props.tags, tag => {
|
|
131
92
|
cdk.Tags.of(logGroup).add(tag.key, tag.value);
|
|
132
93
|
});
|
|
133
94
|
}
|
|
@@ -135,4 +96,3 @@ class LogManager {
|
|
|
135
96
|
return logGroup;
|
|
136
97
|
}
|
|
137
98
|
}
|
|
138
|
-
exports.LogManager = LogManager;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as cdk from 'aws-cdk-lib';
|
|
2
2
|
import * as watch from 'aws-cdk-lib/aws-cloudwatch';
|
|
3
3
|
import { IMetric } from 'aws-cdk-lib/aws-cloudwatch';
|
|
4
|
-
import { CommonConstruct } from '../../common';
|
|
5
|
-
import { AlarmProps, AlarmStatusWidgetProps, DashboardProps, GraphWidgetProps, GuageWidgetProps, LogQueryWidgetProps, NumericWidgetProps, TextWidgetProps } from './types';
|
|
4
|
+
import { CommonConstruct } from '../../common/index.js';
|
|
5
|
+
import { AlarmProps, AlarmStatusWidgetProps, DashboardProps, GraphWidgetProps, GuageWidgetProps, LogQueryWidgetProps, NumericWidgetProps, TextWidgetProps } from './types.js';
|
|
6
6
|
/**
|
|
7
7
|
* @classdesc Provides operations on AWS CloudWatch.
|
|
8
8
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -1,46 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.CloudWatchManager = void 0;
|
|
40
|
-
const cdk = __importStar(require("aws-cdk-lib"));
|
|
41
|
-
const watch = __importStar(require("aws-cdk-lib/aws-cloudwatch"));
|
|
42
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
43
|
-
const utils = __importStar(require("../../utils"));
|
|
1
|
+
import * as cdk from 'aws-cdk-lib';
|
|
2
|
+
import * as watch from 'aws-cdk-lib/aws-cloudwatch';
|
|
3
|
+
import _ from 'lodash';
|
|
4
|
+
import * as utils from '../../utils/index.js';
|
|
44
5
|
/**
|
|
45
6
|
*/
|
|
46
7
|
var CloudWatchWidgetType;
|
|
@@ -68,7 +29,7 @@ var CloudWatchWidgetType;
|
|
|
68
29
|
* }
|
|
69
30
|
* @see [CDK CloudWatch Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch-readme.html}
|
|
70
31
|
*/
|
|
71
|
-
class CloudWatchManager {
|
|
32
|
+
export class CloudWatchManager {
|
|
72
33
|
/**
|
|
73
34
|
* @summary Method to create a cloudwatch alarm for a given expression
|
|
74
35
|
* @param id scoped id of the resource
|
|
@@ -83,7 +44,7 @@ class CloudWatchManager {
|
|
|
83
44
|
if (!props.metricProps)
|
|
84
45
|
throw `Could not find metricProps for Alarm props for id:${id}`;
|
|
85
46
|
const metrics = {};
|
|
86
|
-
|
|
47
|
+
_.map(this.determineMetrics(scope, props.metricProps), (metric, index) => {
|
|
87
48
|
metrics[`m${index}`] = metric;
|
|
88
49
|
});
|
|
89
50
|
const expression = new watch.MathExpression({
|
|
@@ -147,7 +108,7 @@ class CloudWatchManager {
|
|
|
147
108
|
if (!props || props.length == 0)
|
|
148
109
|
throw `Widget props undefined`;
|
|
149
110
|
const widgets = [];
|
|
150
|
-
|
|
111
|
+
_.forEach(props, (widgetProps) => {
|
|
151
112
|
widgets.push(this.createWidget(widgetProps.id, scope, widgetProps));
|
|
152
113
|
});
|
|
153
114
|
return widgets;
|
|
@@ -578,7 +539,7 @@ class CloudWatchManager {
|
|
|
578
539
|
determineAlarms(id, scope, alarmProps) {
|
|
579
540
|
const alarms = [];
|
|
580
541
|
if (alarmProps) {
|
|
581
|
-
|
|
542
|
+
_.forEach(alarmProps, (alarmProp) => {
|
|
582
543
|
if (!alarmProp.alarmName)
|
|
583
544
|
throw `Alarm name undefined for ${id}`;
|
|
584
545
|
const alarmArn = `arn:aws:cloudwatch:${cdk.Stack.of(scope).region}:${cdk.Stack.of(scope).account}:alarm:${alarmProp.alarmName}`;
|
|
@@ -589,4 +550,3 @@ class CloudWatchManager {
|
|
|
589
550
|
return alarms;
|
|
590
551
|
}
|
|
591
552
|
}
|
|
592
|
-
exports.CloudWatchManager = CloudWatchManager;
|