@gradientedge/cdk-utils 8.89.0 → 8.90.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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/src/lib/common/construct.d.ts +4 -4
- package/dist/src/lib/common/construct.js +1 -1
- package/dist/src/lib/common/index.d.ts +1 -0
- package/dist/src/lib/common/index.js +1 -0
- package/dist/src/lib/common/stack.d.ts +1 -1
- package/dist/src/lib/common/types.d.ts +22 -0
- package/dist/src/lib/common/types.js +2 -0
- package/dist/src/lib/{helper/api-to-eventbridge-target-rest-api.d.ts → construct/api-to-eventbridge-target/api.d.ts} +2 -2
- package/dist/src/lib/{helper/api-to-eventbridge-target-event.d.ts → construct/api-to-eventbridge-target/event.d.ts} +2 -2
- package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +3 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/index.js +3 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +5 -5
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +4 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/types.d.ts +112 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/types.js +2 -0
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +3 -3
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/index.d.ts +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/index.js +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +7 -6
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +3 -3
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/types.d.ts +26 -0
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/types.js +2 -0
- package/dist/src/lib/{helper/api-to-lambda-target-rest-api.d.ts → construct/api-to-lambda-target/api.d.ts} +2 -2
- package/dist/src/lib/construct/api-to-lambda-target/index.d.ts +2 -0
- package/dist/src/lib/construct/api-to-lambda-target/index.js +2 -0
- package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +4 -4
- package/dist/src/lib/construct/api-to-lambda-target/main.js +2 -2
- package/dist/src/lib/construct/api-to-lambda-target/types.d.ts +68 -0
- package/dist/src/lib/construct/api-to-lambda-target/types.js +2 -0
- package/dist/src/lib/construct/graphql-api-lambda/index.d.ts +1 -0
- package/dist/src/lib/construct/graphql-api-lambda/index.js +1 -0
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +1 -1
- package/dist/src/lib/construct/graphql-api-lambda/types.d.ts +30 -0
- package/dist/src/lib/construct/graphql-api-lambda/types.js +2 -0
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/index.d.ts +1 -0
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/index.js +1 -0
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +1 -1
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/types.d.ts +15 -0
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/types.js +2 -0
- package/dist/src/lib/construct/lambda-with-iam-access/types.d.ts +2 -1
- package/dist/src/lib/construct/rest-api-lambda/index.d.ts +1 -0
- package/dist/src/lib/construct/rest-api-lambda/index.js +1 -0
- package/dist/src/lib/construct/rest-api-lambda/main.d.ts +1 -1
- package/dist/src/lib/construct/rest-api-lambda/types.d.ts +28 -0
- package/dist/src/lib/construct/rest-api-lambda/types.js +2 -0
- package/dist/src/lib/construct/rest-api-lambda-with-cache/index.d.ts +1 -0
- package/dist/src/lib/construct/rest-api-lambda-with-cache/index.js +1 -0
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +1 -1
- package/dist/src/lib/construct/rest-api-lambda-with-cache/types.d.ts +14 -0
- package/dist/src/lib/construct/rest-api-lambda-with-cache/types.js +2 -0
- package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts +1 -0
- package/dist/src/lib/construct/site-with-ecs-backend/index.js +1 -0
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +1 -1
- package/dist/src/lib/construct/site-with-ecs-backend/types.d.ts +30 -0
- package/dist/src/lib/construct/site-with-ecs-backend/types.js +2 -0
- package/dist/src/lib/construct/static-asset-deployment/types.d.ts +2 -1
- package/dist/src/lib/construct/static-site/index.d.ts +1 -0
- package/dist/src/lib/construct/static-site/index.js +1 -0
- package/dist/src/lib/construct/static-site/main.d.ts +1 -1
- package/dist/src/lib/construct/static-site/types.d.ts +26 -0
- package/dist/src/lib/construct/static-site/types.js +2 -0
- package/dist/src/lib/index.d.ts +5 -0
- package/dist/src/lib/index.js +21 -0
- package/dist/src/lib/services/aws/api-gateway/index.d.ts +2 -0
- package/dist/src/lib/{helper → services/aws/api-gateway}/index.js +2 -3
- package/dist/src/lib/{manager/aws/api-manager.d.ts → services/aws/api-gateway/main.d.ts} +14 -14
- package/dist/src/lib/{manager/aws/api-manager.js → services/aws/api-gateway/main.js} +13 -10
- package/dist/src/lib/services/aws/api-gateway/types.d.ts +9 -0
- package/dist/src/lib/services/aws/api-gateway/types.js +2 -0
- package/dist/src/lib/services/aws/appconfig/constants.d.ts +18 -0
- package/dist/src/lib/services/aws/appconfig/constants.js +60 -0
- package/dist/src/lib/services/aws/appconfig/index.d.ts +3 -0
- package/dist/src/lib/services/aws/appconfig/index.js +19 -0
- package/dist/src/lib/{manager/aws/app-config-manager.d.ts → services/aws/appconfig/main.d.ts} +18 -18
- package/dist/src/lib/services/aws/appconfig/main.js +135 -0
- package/dist/src/lib/services/aws/appconfig/types.d.ts +13 -0
- package/dist/src/lib/services/aws/appconfig/types.js +2 -0
- package/dist/src/lib/services/aws/certificate-manager/index.d.ts +2 -0
- package/dist/src/lib/services/aws/certificate-manager/index.js +18 -0
- package/dist/src/lib/{manager/aws/acm-manager.d.ts → services/aws/certificate-manager/main.d.ts} +7 -7
- package/dist/src/lib/{manager/aws/acm-manager.js → services/aws/certificate-manager/main.js} +5 -5
- package/dist/src/lib/services/aws/certificate-manager/types.d.ts +13 -0
- package/dist/src/lib/services/aws/certificate-manager/types.js +2 -0
- package/dist/src/lib/services/aws/cloudfront/index.d.ts +2 -0
- package/dist/src/lib/services/aws/cloudfront/index.js +18 -0
- package/dist/src/lib/{manager/aws/cloudfront-manager.d.ts → services/aws/cloudfront/main.d.ts} +24 -23
- package/dist/src/lib/{manager/aws/cloudfront-manager.js → services/aws/cloudfront/main.js} +16 -16
- package/dist/src/lib/services/aws/cloudfront/types.d.ts +25 -0
- package/dist/src/lib/services/aws/cloudfront/types.js +2 -0
- package/dist/src/lib/services/aws/cloudtrail/index.d.ts +2 -0
- package/dist/src/lib/services/aws/cloudtrail/index.js +18 -0
- package/dist/src/lib/{manager/aws/cloudtrail-manager.d.ts → services/aws/cloudtrail/main.d.ts} +9 -9
- package/dist/src/lib/{manager/aws/cloudtrail-manager.js → services/aws/cloudtrail/main.js} +7 -7
- package/dist/src/lib/services/aws/cloudtrail/types.d.ts +7 -0
- package/dist/src/lib/services/aws/cloudtrail/types.js +2 -0
- package/dist/src/lib/services/aws/cloudwatch/index.d.ts +3 -0
- package/dist/src/lib/services/aws/cloudwatch/index.js +19 -0
- package/dist/src/lib/{manager/aws/log-manager.d.ts → services/aws/cloudwatch/logs.d.ts} +15 -15
- package/dist/src/lib/{manager/aws/log-manager.js → services/aws/cloudwatch/logs.js} +11 -11
- package/dist/src/lib/services/aws/cloudwatch/main.d.ts +211 -0
- package/dist/src/lib/{manager/aws/cloudwatch-manager.js → services/aws/cloudwatch/main.js} +48 -48
- package/dist/src/lib/services/aws/cloudwatch/types.d.ts +111 -0
- package/dist/src/lib/services/aws/cloudwatch/types.js +2 -0
- package/dist/src/lib/services/aws/codebuild/index.d.ts +1 -0
- package/dist/src/lib/services/aws/codebuild/index.js +17 -0
- package/dist/src/lib/{manager/aws/codebuild-manager.d.ts → services/aws/codebuild/main.d.ts} +7 -7
- package/dist/src/lib/{manager/aws/codebuild-manager.js → services/aws/codebuild/main.js} +4 -4
- package/dist/src/lib/services/aws/dynamodb/index.d.ts +2 -0
- package/dist/src/lib/services/aws/dynamodb/index.js +18 -0
- package/dist/src/lib/{manager/aws/dynamodb-manager.d.ts → services/aws/dynamodb/main.d.ts} +7 -7
- package/dist/src/lib/{manager/aws/dynamodb-manager.js → services/aws/dynamodb/main.js} +5 -5
- package/dist/src/lib/services/aws/dynamodb/types.d.ts +9 -0
- package/dist/src/lib/services/aws/dynamodb/types.js +2 -0
- package/dist/src/lib/services/aws/elastic-container-registry/index.d.ts +1 -0
- package/dist/src/lib/services/aws/elastic-container-registry/index.js +17 -0
- package/dist/src/lib/{manager/aws/ecr-manager.d.ts → services/aws/elastic-container-registry/main.d.ts} +7 -7
- package/dist/src/lib/{manager/aws/ecr-manager.js → services/aws/elastic-container-registry/main.js} +6 -6
- package/dist/src/lib/services/aws/elastic-container-service/index.d.ts +2 -0
- package/dist/src/lib/services/aws/elastic-container-service/index.js +18 -0
- package/dist/src/lib/{manager/aws/ecs-manager.d.ts → services/aws/elastic-container-service/main.d.ts} +15 -15
- package/dist/src/lib/{manager/aws/ecs-manager.js → services/aws/elastic-container-service/main.js} +11 -11
- package/dist/src/lib/services/aws/elastic-container-service/types.d.ts +46 -0
- package/dist/src/lib/services/aws/elastic-container-service/types.js +2 -0
- package/dist/src/lib/services/aws/elastic-file-system/index.d.ts +2 -0
- package/dist/src/lib/services/aws/elastic-file-system/index.js +18 -0
- package/dist/src/lib/{manager/aws/efs-manager.d.ts → services/aws/elastic-file-system/main.d.ts} +10 -10
- package/dist/src/lib/{manager/aws/efs-manager.js → services/aws/elastic-file-system/main.js} +8 -8
- package/dist/src/lib/services/aws/elastic-file-system/types.d.ts +19 -0
- package/dist/src/lib/services/aws/elastic-file-system/types.js +2 -0
- package/dist/src/lib/services/aws/elastic-kubernetes-service/index.d.ts +2 -0
- package/dist/src/lib/services/aws/elastic-kubernetes-service/index.js +18 -0
- package/dist/src/lib/{manager/aws/eks-manager.d.ts → services/aws/elastic-kubernetes-service/main.d.ts} +9 -9
- package/dist/src/lib/{manager/aws/eks-manager.js → services/aws/elastic-kubernetes-service/main.js} +7 -7
- package/dist/src/lib/services/aws/elastic-kubernetes-service/types.d.ts +9 -0
- package/dist/src/lib/services/aws/elastic-kubernetes-service/types.js +2 -0
- package/dist/src/lib/services/aws/elasticache/index.d.ts +2 -0
- package/dist/src/lib/services/aws/elasticache/index.js +18 -0
- package/dist/src/lib/services/aws/elasticache/main.d.ts +51 -0
- package/dist/src/lib/{manager/aws/elasticache-manager.js → services/aws/elasticache/main.js} +11 -12
- package/dist/src/lib/services/aws/elasticache/types.d.ts +13 -0
- package/dist/src/lib/services/aws/elasticache/types.js +2 -0
- package/dist/src/lib/services/aws/eventbridge/index.d.ts +3 -0
- package/dist/src/lib/services/aws/eventbridge/index.js +19 -0
- package/dist/src/lib/{manager/aws/event-manager.d.ts → services/aws/eventbridge/main.d.ts} +20 -20
- package/dist/src/lib/{manager/aws/event-manager.js → services/aws/eventbridge/main.js} +21 -15
- package/dist/src/lib/{manager/aws/event-target-manager.d.ts → services/aws/eventbridge/target.d.ts} +7 -7
- package/dist/src/lib/{manager/aws/event-target-manager.js → services/aws/eventbridge/target.js} +5 -5
- package/dist/src/lib/services/aws/eventbridge/types.d.ts +35 -0
- package/dist/src/lib/services/aws/eventbridge/types.js +2 -0
- package/dist/src/lib/services/aws/evidently/index.d.ts +2 -0
- package/dist/src/lib/services/aws/evidently/index.js +18 -0
- package/dist/src/lib/{manager/aws/evidently-manager.d.ts → services/aws/evidently/main.d.ts} +16 -16
- package/dist/src/lib/{manager/aws/evidently-manager.js → services/aws/evidently/main.js} +10 -10
- package/dist/src/lib/services/aws/evidently/types.d.ts +31 -0
- package/dist/src/lib/services/aws/evidently/types.js +2 -0
- package/dist/src/lib/services/aws/identity-access-management/index.d.ts +1 -0
- package/dist/src/lib/services/aws/identity-access-management/index.js +17 -0
- package/dist/src/lib/{manager/aws/iam-manager.d.ts → services/aws/identity-access-management/main.d.ts} +39 -40
- package/dist/src/lib/{manager/aws/iam-manager.js → services/aws/identity-access-management/main.js} +22 -23
- package/dist/src/lib/services/aws/index.d.ts +28 -0
- package/dist/src/lib/services/aws/index.js +44 -0
- package/dist/src/lib/services/aws/key-management-service/index.d.ts +2 -0
- package/dist/src/lib/services/aws/key-management-service/index.js +18 -0
- package/dist/src/lib/{manager/aws/kms-manager.d.ts → services/aws/key-management-service/main.d.ts} +7 -7
- package/dist/src/lib/{manager/aws/kms-manager.js → services/aws/key-management-service/main.js} +5 -5
- package/dist/src/lib/services/aws/key-management-service/types.d.ts +7 -0
- package/dist/src/lib/services/aws/key-management-service/types.js +2 -0
- package/dist/src/lib/services/aws/lambda/index.d.ts +2 -0
- package/dist/src/lib/services/aws/lambda/index.js +18 -0
- package/dist/src/lib/{manager/aws/lambda-manager.d.ts → services/aws/lambda/main.d.ts} +22 -21
- package/dist/src/lib/{manager/aws/lambda-manager.js → services/aws/lambda/main.js} +21 -21
- package/dist/src/lib/services/aws/lambda/types.d.ts +52 -0
- package/dist/src/lib/services/aws/lambda/types.js +2 -0
- package/dist/src/lib/services/aws/route53/index.d.ts +2 -0
- package/dist/src/lib/services/aws/route53/index.js +18 -0
- package/dist/src/lib/{manager/aws/route53-manager.d.ts → services/aws/route53/main.d.ts} +17 -17
- package/dist/src/lib/{manager/aws/route53-manager.js → services/aws/route53/main.js} +11 -11
- package/dist/src/lib/services/aws/route53/types.d.ts +8 -0
- package/dist/src/lib/services/aws/route53/types.js +2 -0
- package/dist/src/lib/services/aws/secrets-manager/index.d.ts +1 -0
- package/dist/src/lib/services/aws/secrets-manager/index.js +17 -0
- package/dist/src/lib/{manager/aws/secrets-manager.d.ts → services/aws/secrets-manager/main.d.ts} +8 -8
- package/dist/src/lib/{manager/aws/secrets-manager.js → services/aws/secrets-manager/main.js} +6 -6
- package/dist/src/lib/services/aws/simple-notification-service/index.d.ts +2 -0
- package/dist/src/lib/services/aws/simple-notification-service/index.js +18 -0
- package/dist/src/lib/{manager/aws/sns-manager.d.ts → services/aws/simple-notification-service/main.d.ts} +13 -13
- package/dist/src/lib/{manager/aws/sns-manager.js → services/aws/simple-notification-service/main.js} +10 -10
- package/dist/src/lib/services/aws/simple-notification-service/types.d.ts +7 -0
- package/dist/src/lib/services/aws/simple-notification-service/types.js +2 -0
- package/dist/src/lib/services/aws/simple-queue-service/index.d.ts +2 -0
- package/dist/src/lib/services/aws/simple-queue-service/index.js +18 -0
- package/dist/src/lib/services/aws/simple-queue-service/main.d.ts +50 -0
- package/dist/src/lib/{manager/aws/sqs-manager.js → services/aws/simple-queue-service/main.js} +11 -11
- package/dist/src/lib/services/aws/simple-queue-service/types.d.ts +17 -0
- package/dist/src/lib/services/aws/simple-queue-service/types.js +2 -0
- package/dist/src/lib/services/aws/simple-storage-service/index.d.ts +2 -0
- package/dist/src/lib/services/aws/simple-storage-service/index.js +18 -0
- package/dist/src/lib/{manager/aws/s3-manager.d.ts → services/aws/simple-storage-service/main.d.ts} +23 -23
- package/dist/src/lib/{manager/aws/s3-manager.js → services/aws/simple-storage-service/main.js} +15 -16
- package/dist/src/lib/services/aws/simple-storage-service/types.d.ts +31 -0
- package/dist/src/lib/services/aws/simple-storage-service/types.js +2 -0
- package/dist/src/lib/services/aws/step-function/index.d.ts +2 -0
- package/dist/src/lib/services/aws/step-function/index.js +18 -0
- package/dist/src/lib/services/aws/step-function/main.d.ts +157 -0
- package/dist/src/lib/{manager/aws/sfn-manager.js → services/aws/step-function/main.js} +35 -35
- package/dist/src/lib/services/aws/step-function/types.d.ts +120 -0
- package/dist/src/lib/services/aws/step-function/types.js +2 -0
- package/dist/src/lib/services/aws/systems-manager/index.d.ts +2 -0
- package/dist/src/lib/services/aws/systems-manager/index.js +18 -0
- package/dist/src/lib/{manager/aws/ssm-manager.d.ts → services/aws/systems-manager/main.d.ts} +13 -13
- package/dist/src/lib/{manager/aws/ssm-manager.js → services/aws/systems-manager/main.js} +8 -8
- package/dist/src/lib/services/aws/systems-manager/types.d.ts +8 -0
- package/dist/src/lib/services/aws/systems-manager/types.js +2 -0
- package/dist/src/lib/services/aws/virtual-private-cloud/index.d.ts +1 -0
- package/dist/src/lib/services/aws/virtual-private-cloud/index.js +17 -0
- package/dist/src/lib/{manager/aws/vpc-manager.d.ts → services/aws/virtual-private-cloud/main.d.ts} +11 -11
- package/dist/src/lib/{manager/aws/vpc-manager.js → services/aws/virtual-private-cloud/main.js} +8 -8
- package/dist/src/lib/services/aws/web-application-firewall/index.d.ts +1 -0
- package/dist/src/lib/services/aws/web-application-firewall/index.js +17 -0
- package/dist/src/lib/services/aws/web-application-firewall/main.d.ts +39 -0
- package/dist/src/lib/{manager/aws/waf-manager.js → services/aws/web-application-firewall/main.js} +9 -9
- package/dist/src/lib/services/aws/web-application-firewall/types.d.ts +13 -0
- package/dist/src/lib/services/aws/web-application-firewall/types.js +2 -0
- package/dist/src/lib/types/aws/index.d.ts +0 -921
- package/index.ts +1 -1
- package/package.json +1 -1
- package/src/lib/common/construct.ts +4 -4
- package/src/lib/common/index.ts +1 -0
- package/src/lib/common/stack.ts +1 -1
- package/src/lib/common/types.ts +23 -0
- package/src/lib/{helper/api-to-eventbridge-target-rest-api.ts → construct/api-to-eventbridge-target/api.ts} +2 -2
- package/src/lib/{helper/api-to-eventbridge-target-event.ts → construct/api-to-eventbridge-target/event.ts} +2 -2
- package/src/lib/construct/api-to-eventbridge-target/index.ts +3 -0
- package/src/lib/construct/api-to-eventbridge-target/main.ts +13 -8
- package/src/lib/construct/api-to-eventbridge-target/types.ts +126 -0
- package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +3 -3
- package/src/lib/construct/api-to-eventbridge-target-with-sns/index.ts +1 -0
- package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +15 -9
- package/src/lib/construct/api-to-eventbridge-target-with-sns/types.ts +28 -0
- package/src/lib/{helper/api-to-lambda-target-rest-api.ts → construct/api-to-lambda-target/api.ts} +2 -2
- package/src/lib/construct/api-to-lambda-target/index.ts +2 -0
- package/src/lib/construct/api-to-lambda-target/main.ts +6 -6
- package/src/lib/construct/api-to-lambda-target/types.ts +78 -0
- package/src/lib/construct/graphql-api-lambda/index.ts +1 -0
- package/src/lib/construct/graphql-api-lambda/main.ts +1 -1
- package/src/lib/construct/graphql-api-lambda/types.ts +31 -0
- package/src/lib/construct/graphql-api-lambda-with-cache/index.ts +1 -0
- package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +1 -1
- package/src/lib/construct/graphql-api-lambda-with-cache/types.ts +16 -0
- package/src/lib/construct/lambda-with-iam-access/types.ts +2 -1
- package/src/lib/construct/rest-api-lambda/index.ts +1 -0
- package/src/lib/construct/rest-api-lambda/main.ts +1 -1
- package/src/lib/construct/rest-api-lambda/types.ts +29 -0
- package/src/lib/construct/rest-api-lambda-with-cache/index.ts +1 -0
- package/src/lib/construct/rest-api-lambda-with-cache/main.ts +1 -1
- package/src/lib/construct/rest-api-lambda-with-cache/types.ts +15 -0
- package/src/lib/construct/site-with-ecs-backend/index.ts +1 -0
- package/src/lib/construct/site-with-ecs-backend/main.ts +1 -1
- package/src/lib/construct/site-with-ecs-backend/types.ts +42 -0
- package/src/lib/construct/static-asset-deployment/types.ts +2 -1
- package/src/lib/construct/static-site/index.ts +1 -0
- package/src/lib/construct/static-site/main.ts +1 -1
- package/src/lib/construct/static-site/types.ts +27 -0
- package/src/lib/index.ts +5 -0
- package/src/lib/services/aws/api-gateway/index.ts +2 -0
- package/src/lib/{manager/aws/api-manager.ts → services/aws/api-gateway/main.ts} +20 -17
- package/src/lib/services/aws/api-gateway/types.ts +10 -0
- package/src/lib/services/aws/appconfig/constants.ts +58 -0
- package/src/lib/services/aws/appconfig/index.ts +3 -0
- package/src/lib/services/aws/appconfig/main.ts +130 -0
- package/src/lib/services/aws/appconfig/types.ts +20 -0
- package/src/lib/services/aws/certificate-manager/index.ts +2 -0
- package/src/lib/{manager/aws/acm-manager.ts → services/aws/certificate-manager/main.ts} +9 -9
- package/src/lib/services/aws/certificate-manager/types.ts +14 -0
- package/src/lib/services/aws/cloudfront/index.ts +2 -0
- package/src/lib/{manager/aws/cloudfront-manager.ts → services/aws/cloudfront/main.ts} +29 -29
- package/src/lib/services/aws/cloudfront/types.ts +28 -0
- package/src/lib/services/aws/cloudtrail/index.ts +2 -0
- package/src/lib/{manager/aws/cloudtrail-manager.ts → services/aws/cloudtrail/main.ts} +11 -11
- package/src/lib/services/aws/cloudtrail/types.ts +7 -0
- package/src/lib/services/aws/cloudwatch/index.ts +3 -0
- package/src/lib/{manager/aws/log-manager.ts → services/aws/cloudwatch/logs.ts} +16 -21
- package/src/lib/{manager/aws/cloudwatch-manager.ts → services/aws/cloudwatch/main.ts} +86 -112
- package/src/lib/services/aws/cloudwatch/types.ts +121 -0
- package/src/lib/services/aws/codebuild/index.ts +1 -0
- package/src/lib/{manager/aws/codebuild-manager.ts → services/aws/codebuild/main.ts} +7 -7
- package/src/lib/services/aws/dynamodb/index.ts +2 -0
- package/src/lib/{manager/aws/dynamodb-manager.ts → services/aws/dynamodb/main.ts} +8 -8
- package/src/lib/services/aws/dynamodb/types.ts +10 -0
- package/src/lib/services/aws/elastic-container-registry/index.ts +1 -0
- package/src/lib/{manager/aws/ecr-manager.ts → services/aws/elastic-container-registry/main.ts} +8 -8
- package/src/lib/services/aws/elastic-container-service/index.ts +2 -0
- package/src/lib/{manager/aws/ecs-manager.ts → services/aws/elastic-container-service/main.ts} +18 -18
- package/src/lib/services/aws/elastic-container-service/types.ts +51 -0
- package/src/lib/services/aws/elastic-file-system/index.ts +2 -0
- package/src/lib/{manager/aws/efs-manager.ts → services/aws/elastic-file-system/main.ts} +13 -13
- package/src/lib/services/aws/elastic-file-system/types.ts +20 -0
- package/src/lib/services/aws/elastic-kubernetes-service/index.ts +2 -0
- package/src/lib/{manager/aws/eks-manager.ts → services/aws/elastic-kubernetes-service/main.ts} +11 -11
- package/src/lib/services/aws/elastic-kubernetes-service/types.ts +10 -0
- package/src/lib/services/aws/elasticache/index.ts +2 -0
- package/src/lib/{manager/aws/elasticache-manager.ts → services/aws/elasticache/main.ts} +18 -20
- package/src/lib/services/aws/elasticache/types.ts +13 -0
- package/src/lib/services/aws/eventbridge/index.ts +3 -0
- package/src/lib/{manager/aws/event-manager.ts → services/aws/eventbridge/main.ts} +32 -26
- package/src/lib/{manager/aws/event-target-manager.ts → services/aws/eventbridge/target.ts} +7 -7
- package/src/lib/services/aws/eventbridge/types.ts +38 -0
- package/src/lib/services/aws/evidently/index.ts +2 -0
- package/src/lib/{manager/aws/evidently-manager.ts → services/aws/evidently/main.ts} +23 -18
- package/src/lib/services/aws/evidently/types.ts +37 -0
- package/src/lib/services/aws/identity-access-management/index.ts +1 -0
- package/src/lib/{manager/aws/iam-manager.ts → services/aws/identity-access-management/main.ts} +40 -51
- package/src/lib/services/aws/index.ts +28 -0
- package/src/lib/services/aws/key-management-service/index.ts +2 -0
- package/src/lib/{manager/aws/kms-manager.ts → services/aws/key-management-service/main.ts} +8 -8
- package/src/lib/services/aws/key-management-service/types.ts +7 -0
- package/src/lib/services/aws/lambda/index.ts +2 -0
- package/src/lib/{manager/aws/lambda-manager.ts → services/aws/lambda/main.ts} +30 -30
- package/src/lib/services/aws/lambda/types.ts +57 -0
- package/src/lib/services/aws/route53/index.ts +2 -0
- package/src/lib/{manager/aws/route53-manager.ts → services/aws/route53/main.ts} +18 -18
- package/src/lib/services/aws/route53/types.ts +9 -0
- package/src/lib/services/aws/secrets-manager/index.ts +1 -0
- package/src/lib/{manager/aws/secrets-manager.ts → services/aws/secrets-manager/main.ts} +9 -14
- package/src/lib/services/aws/simple-notification-service/index.ts +2 -0
- package/src/lib/{manager/aws/sns-manager.ts → services/aws/simple-notification-service/main.ts} +16 -16
- package/src/lib/services/aws/simple-notification-service/types.ts +7 -0
- package/src/lib/services/aws/simple-queue-service/index.ts +2 -0
- package/src/lib/{manager/aws/sqs-manager.ts → services/aws/simple-queue-service/main.ts} +18 -17
- package/src/lib/services/aws/simple-queue-service/types.ts +18 -0
- package/src/lib/services/aws/simple-storage-service/index.ts +2 -0
- package/src/lib/{manager/aws/s3-manager.ts → services/aws/simple-storage-service/main.ts} +26 -27
- package/src/lib/services/aws/simple-storage-service/types.ts +34 -0
- package/src/lib/services/aws/step-function/index.ts +2 -0
- package/src/lib/{manager/aws/sfn-manager.ts → services/aws/step-function/main.ts} +76 -61
- package/src/lib/services/aws/step-function/types.ts +152 -0
- package/src/lib/services/aws/systems-manager/index.ts +2 -0
- package/src/lib/{manager/aws/ssm-manager.ts → services/aws/systems-manager/main.ts} +15 -19
- package/src/lib/services/aws/systems-manager/types.ts +8 -0
- package/src/lib/services/aws/virtual-private-cloud/index.ts +1 -0
- package/src/lib/{manager/aws/vpc-manager.ts → services/aws/virtual-private-cloud/main.ts} +12 -12
- package/src/lib/services/aws/web-application-firewall/index.ts +1 -0
- package/src/lib/{manager/aws/waf-manager.ts → services/aws/web-application-firewall/main.ts} +13 -13
- package/src/lib/services/aws/web-application-firewall/types.ts +13 -0
- package/src/lib/types/aws/index.ts +0 -984
- package/dist/src/lib/helper/index.d.ts +0 -3
- package/dist/src/lib/manager/aws/app-config-manager.js +0 -191
- package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts +0 -211
- package/dist/src/lib/manager/aws/elasticache-manager.d.ts +0 -52
- package/dist/src/lib/manager/aws/index.d.ts +0 -30
- package/dist/src/lib/manager/aws/index.js +0 -46
- package/dist/src/lib/manager/aws/sfn-manager.d.ts +0 -157
- package/dist/src/lib/manager/aws/sqs-manager.d.ts +0 -49
- package/dist/src/lib/manager/aws/waf-manager.d.ts +0 -39
- package/src/lib/helper/index.ts +0 -3
- package/src/lib/manager/aws/app-config-manager.ts +0 -192
- package/src/lib/manager/aws/index.ts +0 -30
- /package/dist/src/lib/{helper/api-to-eventbridge-target-rest-api.js → construct/api-to-eventbridge-target/api.js} +0 -0
- /package/dist/src/lib/{helper/api-to-eventbridge-target-event.js → construct/api-to-eventbridge-target/event.js} +0 -0
- /package/dist/src/lib/{helper/api-to-lambda-target-rest-api.js → construct/api-to-lambda-target/api.js} +0 -0
- /package/dist/src/lib/{manager → services}/aws/constants.d.ts +0 -0
- /package/dist/src/lib/{manager → services}/aws/constants.js +0 -0
- /package/dist/src/lib/{manager → services}/index.d.ts +0 -0
- /package/dist/src/lib/{manager → services}/index.js +0 -0
- /package/src/lib/{manager → services}/aws/constants.ts +0 -0
- /package/src/lib/{manager → services}/index.ts +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AcmProps, LambdaEnvironment, LambdaProps } from '../../services'
|
|
2
|
+
import { CommonStackProps } from '../../common'
|
|
3
|
+
import { LambdaRestApiProps } from 'aws-cdk-lib/aws-apigateway'
|
|
4
|
+
import { AssetCode } from 'aws-cdk-lib/aws-lambda'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @category cdk-utils.rest-api-lambda
|
|
8
|
+
* @subcategory Types
|
|
9
|
+
*/
|
|
10
|
+
export interface RestApiLambdaEnvironment extends LambdaEnvironment {}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @category cdk-utils.rest-api-lambda
|
|
14
|
+
* @subcategory Properties
|
|
15
|
+
*/
|
|
16
|
+
export interface RestApiLambdaProps extends CommonStackProps {
|
|
17
|
+
apiRootPaths?: string[]
|
|
18
|
+
apiSubDomain: string
|
|
19
|
+
restApiCertificate: AcmProps
|
|
20
|
+
restApi: LambdaRestApiProps
|
|
21
|
+
restApiLambdaLayerSources?: AssetCode[]
|
|
22
|
+
restApiHandler: string
|
|
23
|
+
restApiSource: AssetCode
|
|
24
|
+
restApiLambda: LambdaProps
|
|
25
|
+
useExistingHostedZone: boolean
|
|
26
|
+
nodeEnv: string
|
|
27
|
+
logLevel: string
|
|
28
|
+
timezone: string
|
|
29
|
+
}
|
|
@@ -4,7 +4,7 @@ import * as elasticache from 'aws-cdk-lib/aws-elasticache'
|
|
|
4
4
|
import * as iam from 'aws-cdk-lib/aws-iam'
|
|
5
5
|
import { Construct } from 'constructs'
|
|
6
6
|
import { RestApiLambda } from '..'
|
|
7
|
-
import { RestApiLambdaWithCacheProps } from '
|
|
7
|
+
import { RestApiLambdaWithCacheProps } from './types'
|
|
8
8
|
import * as utils from '../../utils'
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RestApiLambdaProps } from '../rest-api-lambda'
|
|
2
|
+
import { VpcProps } from 'aws-cdk-lib/aws-ec2'
|
|
3
|
+
import { ReplicatedElastiCacheProps } from '../../services'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @category cdk-utils.rest-api-lambda-with-cache
|
|
7
|
+
* @subcategory Properties
|
|
8
|
+
*/
|
|
9
|
+
export interface RestApiLambdaWithCacheProps extends RestApiLambdaProps {
|
|
10
|
+
restApiVpc: VpcProps
|
|
11
|
+
restApiCache: ReplicatedElastiCacheProps
|
|
12
|
+
securityGroupExportName: string
|
|
13
|
+
useExistingVpc: boolean
|
|
14
|
+
vpcName?: string
|
|
15
|
+
}
|
|
@@ -13,7 +13,7 @@ import * as s3 from 'aws-cdk-lib/aws-s3'
|
|
|
13
13
|
import * as efs from 'aws-cdk-lib/aws-efs'
|
|
14
14
|
import { Construct } from 'constructs'
|
|
15
15
|
import { CommonConstruct } from '../../common'
|
|
16
|
-
import { SiteWithEcsBackendProps } from '
|
|
16
|
+
import { SiteWithEcsBackendProps } from './types'
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @stability stable
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CommonStackProps } from '../../common'
|
|
2
|
+
import {
|
|
3
|
+
AcmProps,
|
|
4
|
+
CloudfrontFunctionProps,
|
|
5
|
+
DistributionProps,
|
|
6
|
+
EcsApplicationLoadBalancedFargateServiceProps,
|
|
7
|
+
EcsClusterProps,
|
|
8
|
+
EfsAccessPointOptions,
|
|
9
|
+
EfsFileSystemProps,
|
|
10
|
+
HealthCheck,
|
|
11
|
+
LogProps,
|
|
12
|
+
S3BucketProps,
|
|
13
|
+
} from '../../services'
|
|
14
|
+
import { VpcProps } from 'aws-cdk-lib/aws-ec2'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @category cdk-utils.site-with-ecs-backend
|
|
18
|
+
* @subcategory Properties
|
|
19
|
+
*/
|
|
20
|
+
export interface SiteWithEcsBackendProps extends CommonStackProps {
|
|
21
|
+
siteCacheInvalidationDockerFilePath?: string
|
|
22
|
+
siteHealthCheck: HealthCheck
|
|
23
|
+
siteCertificate: AcmProps
|
|
24
|
+
siteRegionalCertificate: AcmProps
|
|
25
|
+
siteCluster: EcsClusterProps
|
|
26
|
+
siteDistribution: DistributionProps
|
|
27
|
+
siteCloudfrontFunctionProps?: CloudfrontFunctionProps
|
|
28
|
+
siteFunctionFilePath?: string
|
|
29
|
+
siteEcsContainerImagePath: string
|
|
30
|
+
siteLog: LogProps
|
|
31
|
+
siteLogBucket: S3BucketProps
|
|
32
|
+
siteRecordName?: string
|
|
33
|
+
siteSubDomain: string
|
|
34
|
+
siteTask: EcsApplicationLoadBalancedFargateServiceProps
|
|
35
|
+
siteVpc: VpcProps
|
|
36
|
+
siteFileSystem?: EfsFileSystemProps
|
|
37
|
+
siteFileSystemAccessPoints?: EfsAccessPointOptions[]
|
|
38
|
+
useExistingHostedZone: boolean
|
|
39
|
+
nodeEnv: string
|
|
40
|
+
logLevel: string
|
|
41
|
+
timezone: string
|
|
42
|
+
}
|
|
@@ -5,7 +5,7 @@ import * as route53 from 'aws-cdk-lib/aws-route53'
|
|
|
5
5
|
import * as s3 from 'aws-cdk-lib/aws-s3'
|
|
6
6
|
import { Construct } from 'constructs'
|
|
7
7
|
import { CommonConstruct } from '../../common'
|
|
8
|
-
import { StaticSiteProps } from '
|
|
8
|
+
import { StaticSiteProps } from './types'
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @stability stable
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CommonStackProps } from '../../common'
|
|
2
|
+
import { AcmProps, CloudfrontFunctionProps, DistributionProps, S3BucketProps } from '../../services'
|
|
3
|
+
import { ISource } from 'aws-cdk-lib/aws-s3-deployment'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @category cdk-utils.static-site
|
|
7
|
+
* @subcategory Properties
|
|
8
|
+
*/
|
|
9
|
+
export interface StaticSiteProps extends CommonStackProps {
|
|
10
|
+
siteCacheInvalidationDockerFilePath?: string
|
|
11
|
+
siteCreateAltARecord: boolean
|
|
12
|
+
siteCertificate: AcmProps
|
|
13
|
+
siteBucket: S3BucketProps
|
|
14
|
+
siteLogBucket: S3BucketProps
|
|
15
|
+
siteDistribution?: DistributionProps
|
|
16
|
+
siteCloudfrontFunctionProps?: CloudfrontFunctionProps
|
|
17
|
+
siteFunctionFilePath?: string
|
|
18
|
+
siteSource: ISource
|
|
19
|
+
siteHostedZoneDomainName?: string
|
|
20
|
+
siteRecordName?: string
|
|
21
|
+
siteSubDomain?: string
|
|
22
|
+
siteAliases?: string[]
|
|
23
|
+
useExistingHostedZone: boolean
|
|
24
|
+
nodeEnv: string
|
|
25
|
+
logLevel: string
|
|
26
|
+
timezone: string
|
|
27
|
+
}
|
package/src/lib/index.ts
ADDED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import * as apig from 'aws-cdk-lib/aws-apigateway'
|
|
2
2
|
import * as acm from 'aws-cdk-lib/aws-certificatemanager'
|
|
3
3
|
import * as lambda from 'aws-cdk-lib/aws-lambda'
|
|
4
|
-
import * as
|
|
5
|
-
import * as utils from '../../utils'
|
|
4
|
+
import * as utils from '../../../utils'
|
|
6
5
|
import * as cdk from 'aws-cdk-lib'
|
|
7
|
-
import
|
|
6
|
+
import { LambdaRestApiProps } from './types'
|
|
7
|
+
import { CommonConstruct } from '../../../common'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @stability stable
|
|
11
11
|
* @category cdk-utils.api-manager
|
|
12
12
|
* @subcategory Construct
|
|
13
13
|
* @classdesc Provides operations on AWS API Gateway.
|
|
14
|
-
* - A new instance of this class is injected into {@link
|
|
15
|
-
* - If a custom construct extends {@link
|
|
14
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
15
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
16
16
|
* @example
|
|
17
|
-
* import {
|
|
17
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
18
18
|
*
|
|
19
|
-
* class CustomConstruct extends
|
|
19
|
+
* class CustomConstruct extends CommonConstruct {
|
|
20
20
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
21
21
|
* super(parent, id, props)
|
|
22
22
|
* this.props = props
|
|
@@ -31,14 +31,14 @@ export class ApiManager {
|
|
|
31
31
|
/**
|
|
32
32
|
* @summary Method to create a Rest API with Lambda backend/target
|
|
33
33
|
* @param {string} id scoped id of the resource
|
|
34
|
-
* @param {
|
|
34
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
35
35
|
* @param {AcmProps} props lambda rest restApi props
|
|
36
36
|
* @param lambdaFunction
|
|
37
37
|
*/
|
|
38
38
|
public createLambdaRestApi(
|
|
39
39
|
id: string,
|
|
40
|
-
scope:
|
|
41
|
-
props:
|
|
40
|
+
scope: CommonConstruct,
|
|
41
|
+
props: LambdaRestApiProps,
|
|
42
42
|
lambdaFunction: lambda.IFunction
|
|
43
43
|
) {
|
|
44
44
|
if (!props) throw `Api props undefined for ${id}`
|
|
@@ -96,11 +96,11 @@ export class ApiManager {
|
|
|
96
96
|
/**
|
|
97
97
|
* @summary Method to create custom restApi domain
|
|
98
98
|
* @param {string} id scoped id of the resource
|
|
99
|
-
* @param {
|
|
99
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
100
100
|
* @param domainName the domain name to use
|
|
101
101
|
* @param certificate the certificate used for custom restApi domain
|
|
102
102
|
*/
|
|
103
|
-
public createApiDomain(id: string, scope:
|
|
103
|
+
public createApiDomain(id: string, scope: CommonConstruct, domainName: string, certificate: acm.ICertificate) {
|
|
104
104
|
const apiDomain = new apig.DomainName(scope, `${id}`, {
|
|
105
105
|
domainName: domainName,
|
|
106
106
|
certificate: certificate,
|
|
@@ -116,7 +116,7 @@ export class ApiManager {
|
|
|
116
116
|
/**
|
|
117
117
|
* @summary Method to create an API gateway resource
|
|
118
118
|
* @param {string} id
|
|
119
|
-
* @param {
|
|
119
|
+
* @param {CommonConstruct} scope
|
|
120
120
|
* @param {apig.IResource} parent
|
|
121
121
|
* @param {string} path
|
|
122
122
|
* @param {apig.Integration} integration
|
|
@@ -130,7 +130,7 @@ export class ApiManager {
|
|
|
130
130
|
*/
|
|
131
131
|
public createApiResource(
|
|
132
132
|
id: string,
|
|
133
|
-
scope:
|
|
133
|
+
scope: CommonConstruct,
|
|
134
134
|
parent: apig.IResource,
|
|
135
135
|
path: string,
|
|
136
136
|
integration: apig.Integration,
|
|
@@ -152,7 +152,10 @@ export class ApiManager {
|
|
|
152
152
|
},
|
|
153
153
|
})
|
|
154
154
|
methods.forEach(method =>
|
|
155
|
-
resource.addMethod(method, integration, {
|
|
155
|
+
resource.addMethod(method, integration, {
|
|
156
|
+
authorizer,
|
|
157
|
+
requestParameters: methodRequestParameters,
|
|
158
|
+
})
|
|
156
159
|
)
|
|
157
160
|
utils.createCfnOutput(`${id}-${path}ResourceId`, scope, resource.resourceId)
|
|
158
161
|
|
|
@@ -180,10 +183,10 @@ export class ApiManager {
|
|
|
180
183
|
/**
|
|
181
184
|
* @summary Method to create an api deployment
|
|
182
185
|
* @param {string} id
|
|
183
|
-
* @param {
|
|
186
|
+
* @param {CommonConstruct} scope
|
|
184
187
|
* @param {apig.IRestApi} restApi
|
|
185
188
|
*/
|
|
186
|
-
public createApiDeployment(id: string, scope:
|
|
189
|
+
public createApiDeployment(id: string, scope: CommonConstruct, restApi: apig.IRestApi) {
|
|
187
190
|
new apig.Deployment(scope, `${id}`, {
|
|
188
191
|
api: restApi,
|
|
189
192
|
retainDeployments: false,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TagProps } from '../../../types'
|
|
2
|
+
import * as apig from 'aws-cdk-lib/aws-apigateway'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @category cdk-utils.api-manager
|
|
6
|
+
* @subcategory Properties
|
|
7
|
+
*/
|
|
8
|
+
export interface LambdaRestApiProps extends apig.LambdaRestApiProps {
|
|
9
|
+
tags?: TagProps[]
|
|
10
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @stability stable
|
|
3
|
+
* @category cdk-utils.app-config-manager
|
|
4
|
+
* @subcategory Construct
|
|
5
|
+
* @returns { Map<string, string> } AppConfig extension ARN by region for x84
|
|
6
|
+
*/
|
|
7
|
+
export const ArnsByRegionForX86_64: { [region: string]: string } = {
|
|
8
|
+
'us-east-1': 'arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension:110',
|
|
9
|
+
'us-east-2': 'arn:aws:lambda:us-east-2:728743619870:layer:AWS-AppConfig-Extension:79',
|
|
10
|
+
'us-west-1': 'arn:aws:lambda:us-west-1:958113053741:layer:AWS-AppConfig-Extension:121',
|
|
11
|
+
'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension:143',
|
|
12
|
+
'ca-central-1': 'arn:aws:lambda:ca-central-1:039592058896:layer:AWS-AppConfig-Extension:79',
|
|
13
|
+
'eu-central-1': 'arn:aws:lambda:eu-central-1:066940009817:layer:AWS-AppConfig-Extension:91',
|
|
14
|
+
'eu-central-2': 'arn:aws:lambda:eu-central-2:758369105281:layer:AWS-AppConfig-Extension:29',
|
|
15
|
+
'eu-west-1': 'arn:aws:lambda:eu-west-1:434848589818:layer:AWS-AppConfig-Extension:108',
|
|
16
|
+
'eu-west-2': 'arn:aws:lambda:eu-west-2:282860088358:layer:AWS-AppConfig-Extension:79',
|
|
17
|
+
'eu-west-3': 'arn:aws:lambda:eu-west-3:493207061005:layer:AWS-AppConfig-Extension:80',
|
|
18
|
+
'eu-north-1': 'arn:aws:lambda:eu-north-1:646970417810:layer:AWS-AppConfig-Extension:139',
|
|
19
|
+
'eu-south-1': 'arn:aws:lambda:eu-south-1:203683718741:layer:AWS-AppConfig-Extension:71',
|
|
20
|
+
'eu-south-2': 'arn:aws:lambda:eu-south-2:586093569114:layer:AWS-AppConfig-Extension:26',
|
|
21
|
+
'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:615057806174:layer:AWS-AppConfig-Extension:66',
|
|
22
|
+
'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:615084187847:layer:AWS-AppConfig-Extension:66',
|
|
23
|
+
'ap-east-1': 'arn:aws:lambda:ap-east-1:630222743974:layer:AWS-AppConfig-Extension:71',
|
|
24
|
+
'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:980059726660:layer:AWS-AppConfig-Extension:82',
|
|
25
|
+
'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:826293736237:layer:AWS-AppConfig-Extension:91',
|
|
26
|
+
'ap-northeast-3': 'arn:aws:lambda:ap-northeast-3:706869817123:layer:AWS-AppConfig-Extension:84',
|
|
27
|
+
'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:421114256042:layer:AWS-AppConfig-Extension:89',
|
|
28
|
+
'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:080788657173:layer:AWS-AppConfig-Extension:91',
|
|
29
|
+
'ap-southeast-3': 'arn:aws:lambda:ap-southeast-3:418787028745:layer:AWS-AppConfig-Extension:60',
|
|
30
|
+
'ap-southeast-4': 'arn:aws:lambda:ap-southeast-4:307021474294:layer:AWS-AppConfig-Extension:2',
|
|
31
|
+
'ap-south-1': 'arn:aws:lambda:ap-south-1:554480029851:layer:AWS-AppConfig-Extension:92',
|
|
32
|
+
'ap-south-2': 'arn:aws:lambda:ap-south-2:489524808438:layer:AWS-AppConfig-Extension:29',
|
|
33
|
+
'sa-east-1': 'arn:aws:lambda:sa-east-1:000010852771:layer:AWS-AppConfig-Extension:110',
|
|
34
|
+
'af-south-1': 'arn:aws:lambda:af-south-1:574348263942:layer:AWS-AppConfig-Extension:71',
|
|
35
|
+
'me-central-1': 'arn:aws:lambda:me-central-1:662846165436:layer:AWS-AppConfig-Extension:31',
|
|
36
|
+
'me-south-1': 'arn:aws:lambda:me-south-1:559955524753:layer:AWS-AppConfig-Extension:71',
|
|
37
|
+
'us-gov-east-1': 'arn:aws-us-gov:lambda:us-gov-east-1:946561847325:layer:AWS-AppConfig-Extension:44',
|
|
38
|
+
'us-gov-west-1': 'arn:aws-us-gov:lambda:us-gov-west-1:946746059096:layer:AWS-AppConfig-Extension:44',
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @stability stable
|
|
43
|
+
* @category cdk-utils.app-config-manager
|
|
44
|
+
* @subcategory Construct
|
|
45
|
+
* @returns { Map<string, string> } AppConfig extension ARN by region for arm64
|
|
46
|
+
*/
|
|
47
|
+
export const ArnsByRegionForArm64: { [region: string]: string } = {
|
|
48
|
+
'us-east-1': 'arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension-Arm64:43',
|
|
49
|
+
'us-east-2': 'arn:aws:lambda:us-east-2:728743619870:layer:AWS-AppConfig-Extension-Arm64:31',
|
|
50
|
+
'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension-Arm64:45',
|
|
51
|
+
'eu-central-1': 'arn:aws:lambda:eu-central-1:066940009817:layer:AWS-AppConfig-Extension-Arm64:34',
|
|
52
|
+
'eu-west-1': 'arn:aws:lambda:eu-west-1:434848589818:layer:AWS-AppConfig-Extension-Arm64:46',
|
|
53
|
+
'eu-west-2': 'arn:aws:lambda:eu-west-2:282860088358:layer:AWS-AppConfig-Extension-Arm64:31',
|
|
54
|
+
'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:980059726660:layer:AWS-AppConfig-Extension-Arm64:35',
|
|
55
|
+
'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:421114256042:layer:AWS-AppConfig-Extension-Arm64:41',
|
|
56
|
+
'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:080788657173:layer:AWS-AppConfig-Extension-Arm64:34',
|
|
57
|
+
'ap-south-1': 'arn:aws:lambda:ap-south-1:554480029851:layer:AWS-AppConfig-Extension-Arm64:34',
|
|
58
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as cdk from 'aws-cdk-lib'
|
|
2
|
+
import * as appconfig from 'aws-cdk-lib/aws-appconfig'
|
|
3
|
+
import * as utils from '../../../utils'
|
|
4
|
+
import { Architecture } from '../constants'
|
|
5
|
+
import { AppConfigProps } from './types'
|
|
6
|
+
import { ArnsByRegionForArm64, ArnsByRegionForX86_64 } from './constants'
|
|
7
|
+
import { CommonConstruct } from '../../../common'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @category cdk-utils.app-config-manager
|
|
11
|
+
* @subcategory Construct
|
|
12
|
+
* @classdesc Provides operations on AWS AppConfig.
|
|
13
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
14
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
15
|
+
* @example
|
|
16
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
17
|
+
*
|
|
18
|
+
* class CustomConstruct extends CommonConstruct {
|
|
19
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
20
|
+
* super(parent, id, props)
|
|
21
|
+
* this.props = props
|
|
22
|
+
* this.appConfigManager.createApplication('MyApplication', this)
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* @see [CDK AppConfig Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig-readme.html}
|
|
27
|
+
*/
|
|
28
|
+
export class AppConfigManager {
|
|
29
|
+
/**
|
|
30
|
+
* Method to get static ARNs for AppConfig extensions
|
|
31
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
32
|
+
* @param {Architecture} type type of the architecture
|
|
33
|
+
*/
|
|
34
|
+
public getArnForAppConfigExtension(scope: CommonConstruct, type: Architecture) {
|
|
35
|
+
switch (type) {
|
|
36
|
+
case Architecture.ARM_64:
|
|
37
|
+
return ArnsByRegionForArm64[scope.props.region]
|
|
38
|
+
case Architecture.X86_64:
|
|
39
|
+
return ArnsByRegionForX86_64[scope.props.region]
|
|
40
|
+
default:
|
|
41
|
+
throw `Invalid type ${type} specified`
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @summary Method to create an AppConfig Application
|
|
47
|
+
* @param {string} id scoped id of the resource
|
|
48
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
49
|
+
* @param {AppConfigProps} props
|
|
50
|
+
* @returns {appconfig.CfnApplication}
|
|
51
|
+
*/
|
|
52
|
+
public createApplication(id: string, scope: CommonConstruct, props: AppConfigProps): appconfig.CfnApplication {
|
|
53
|
+
if (!props) throw `AppConfig props undefined for ${id}`
|
|
54
|
+
|
|
55
|
+
const application = new appconfig.CfnApplication(scope, `${id}`, {
|
|
56
|
+
name: `${props.application.name}-${scope.props.stage}`,
|
|
57
|
+
description: props.application.description,
|
|
58
|
+
tags: props.application.tags,
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
utils.createCfnOutput(`${id}-ApplicationId`, scope, cdk.Fn.ref(application.logicalId))
|
|
62
|
+
utils.createCfnOutput(`${id}-ApplicationName`, scope, application.name)
|
|
63
|
+
|
|
64
|
+
return application
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @summary Method to create an AppConfig Environment for a given application
|
|
69
|
+
* @param {string} id scoped id of the resource
|
|
70
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
71
|
+
* @param {string} applicationId id of the application
|
|
72
|
+
* @param {AppConfigProps} props
|
|
73
|
+
* @returns {appconfig.CfnEnvironment}
|
|
74
|
+
*/
|
|
75
|
+
public createEnvironment(
|
|
76
|
+
id: string,
|
|
77
|
+
scope: CommonConstruct,
|
|
78
|
+
applicationId: string,
|
|
79
|
+
props: AppConfigProps
|
|
80
|
+
): appconfig.CfnEnvironment {
|
|
81
|
+
if (!props) throw `AppConfig props undefined for ${id}`
|
|
82
|
+
|
|
83
|
+
const environment = new appconfig.CfnEnvironment(scope, `${id}`, {
|
|
84
|
+
applicationId: applicationId,
|
|
85
|
+
name: props.environment.name ?? scope.props.stage,
|
|
86
|
+
description: props.environment.description,
|
|
87
|
+
monitors: props.environment.monitors,
|
|
88
|
+
tags: props.environment.tags,
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
utils.createCfnOutput(`${id}-configurationEnvironmentId`, scope, cdk.Fn.ref(environment.logicalId))
|
|
92
|
+
utils.createCfnOutput(`${id}-configurationEnvironmentName`, scope, environment.name)
|
|
93
|
+
|
|
94
|
+
return environment
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @summary Method to create an AppConfig Configuration Profile for a given application
|
|
99
|
+
* - <p>⚠ The <b>locationUri</b> is defaulted to <i>hosted</i> if undefined</p>
|
|
100
|
+
* @param {string} id scoped id of the resource
|
|
101
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
102
|
+
* @param {string} applicationId id of the application
|
|
103
|
+
* @param {AppConfigProps} props
|
|
104
|
+
* @returns {appconfig.CfnConfigurationProfile}
|
|
105
|
+
*/
|
|
106
|
+
public createConfigurationProfile(
|
|
107
|
+
id: string,
|
|
108
|
+
scope: CommonConstruct,
|
|
109
|
+
applicationId: string,
|
|
110
|
+
props: AppConfigProps
|
|
111
|
+
): appconfig.CfnConfigurationProfile {
|
|
112
|
+
if (!props) throw `AppConfig props undefined for ${id}`
|
|
113
|
+
|
|
114
|
+
const profile = new appconfig.CfnConfigurationProfile(scope, `${id}`, {
|
|
115
|
+
applicationId: applicationId,
|
|
116
|
+
locationUri: props.configurationProfile.locationUri || 'hosted',
|
|
117
|
+
name: `${props.configurationProfile.name}-${scope.props.stage}`,
|
|
118
|
+
description: props.configurationProfile.description,
|
|
119
|
+
retrievalRoleArn: props.configurationProfile.retrievalRoleArn,
|
|
120
|
+
tags: props.configurationProfile.tags,
|
|
121
|
+
type: props.configurationProfile.type,
|
|
122
|
+
validators: props.configurationProfile.validators,
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
utils.createCfnOutput(`${id}-configurationProfileId`, scope, cdk.Fn.ref(profile.logicalId))
|
|
126
|
+
utils.createCfnOutput(`${id}-configurationProfileName`, scope, profile.name)
|
|
127
|
+
|
|
128
|
+
return profile
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CfnApplicationProps,
|
|
3
|
+
CfnConfigurationProfileProps,
|
|
4
|
+
CfnDeploymentProps,
|
|
5
|
+
CfnDeploymentStrategyProps,
|
|
6
|
+
CfnEnvironmentProps,
|
|
7
|
+
} from 'aws-cdk-lib/aws-appconfig'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @category cdk-utils.app-config-manager
|
|
11
|
+
* @subcategory Properties
|
|
12
|
+
*/
|
|
13
|
+
export interface AppConfigProps {
|
|
14
|
+
id: string
|
|
15
|
+
application: CfnApplicationProps
|
|
16
|
+
configurationProfile: CfnConfigurationProfileProps
|
|
17
|
+
deployment: CfnDeploymentProps
|
|
18
|
+
deploymentStrategy: CfnDeploymentStrategyProps
|
|
19
|
+
environment: CfnEnvironmentProps
|
|
20
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as cdk from 'aws-cdk-lib'
|
|
2
2
|
import * as acm from 'aws-cdk-lib/aws-certificatemanager'
|
|
3
3
|
import * as route53 from 'aws-cdk-lib/aws-route53'
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import * as utils from '../../../utils'
|
|
5
|
+
import { AcmProps } from './types'
|
|
6
|
+
import { CommonConstruct } from '../../../common'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @stability stable
|
|
10
10
|
* @category cdk-utils.acm-manager
|
|
11
11
|
* @subcategory Construct
|
|
12
12
|
* @classdesc Provides operations on AWS Certificates.
|
|
13
|
-
* - A new instance of this class is injected into {@link
|
|
14
|
-
* - If a custom construct extends {@link
|
|
13
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
14
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
15
15
|
* @example
|
|
16
16
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
17
17
|
*
|
|
@@ -29,8 +29,8 @@ export class AcmManager {
|
|
|
29
29
|
/**
|
|
30
30
|
* @summary Method to create/import a certificate
|
|
31
31
|
* @param {string} id scoped id of the resource
|
|
32
|
-
* @param {
|
|
33
|
-
* @param {
|
|
32
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
33
|
+
* @param {AcmProps} props certificate props
|
|
34
34
|
* @param {route53.HostedZone?} hostedZone optional hosted zone to perform DNS validation
|
|
35
35
|
* @returns {acm.ICertificate}
|
|
36
36
|
*
|
|
@@ -47,8 +47,8 @@ export class AcmManager {
|
|
|
47
47
|
*/
|
|
48
48
|
public resolveCertificate(
|
|
49
49
|
id: string,
|
|
50
|
-
scope:
|
|
51
|
-
props:
|
|
50
|
+
scope: CommonConstruct,
|
|
51
|
+
props: AcmProps,
|
|
52
52
|
hostedZone?: route53.IHostedZone
|
|
53
53
|
): acm.ICertificate {
|
|
54
54
|
if (!props) throw `Certificate props undefined for ${id}`
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as acm from 'aws-cdk-lib/aws-certificatemanager'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @category cdk-utils.acm-manager
|
|
5
|
+
* @subcategory Properties
|
|
6
|
+
*/
|
|
7
|
+
export interface AcmProps extends acm.CertificateProps {
|
|
8
|
+
certificateSsmName?: string
|
|
9
|
+
certificateAccount?: string
|
|
10
|
+
certificateRegion?: string
|
|
11
|
+
certificateId?: string
|
|
12
|
+
certificateArn?: string
|
|
13
|
+
useExistingCertificate: boolean
|
|
14
|
+
}
|