@gradientedge/cdk-utils 8.89.0 → 8.91.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 +27 -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 +2 -0
- package/dist/src/lib/services/aws/web-application-firewall/index.js +18 -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 +5 -5
- 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 +28 -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 +2 -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
package/src/lib/{manager/aws/ecr-manager.ts → services/aws/elastic-container-registry/main.ts}
RENAMED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as ecr from 'aws-cdk-lib/aws-ecr-assets'
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as utils from '../../../utils'
|
|
3
|
+
import { CommonConstruct } from '../../../common'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @stability stable
|
|
7
7
|
* @category cdk-utils.ecr-manager
|
|
8
8
|
* @subcategory Construct
|
|
9
9
|
* @classdesc Provides operations on AWS Elastic Container Registry.
|
|
10
|
-
* - A new instance of this class is injected into {@link
|
|
11
|
-
* - If a custom construct extends {@link
|
|
10
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
11
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
12
12
|
* @example
|
|
13
|
-
* import
|
|
13
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
14
14
|
*
|
|
15
|
-
* class CustomConstruct extends
|
|
15
|
+
* class CustomConstruct extends CommonConstruct {
|
|
16
16
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
17
17
|
* super(parent, id, props)
|
|
18
18
|
* this.props = props
|
|
@@ -26,10 +26,10 @@ export class EcrManager {
|
|
|
26
26
|
/**
|
|
27
27
|
* @summary Method to create a docker image in ecr
|
|
28
28
|
* @param {string} id scoped id of the resource
|
|
29
|
-
* @param {
|
|
29
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
30
30
|
* @param {string} dockerfilePath
|
|
31
31
|
*/
|
|
32
|
-
public createDockerImage(id: string, scope:
|
|
32
|
+
public createDockerImage(id: string, scope: CommonConstruct, dockerfilePath: string) {
|
|
33
33
|
const asset = new ecr.DockerImageAsset(scope, `${id}`, {
|
|
34
34
|
directory: dockerfilePath,
|
|
35
35
|
})
|
package/src/lib/{manager/aws/ecs-manager.ts → services/aws/elastic-container-service/main.ts}
RENAMED
|
@@ -4,21 +4,21 @@ import * as ecs from 'aws-cdk-lib/aws-ecs'
|
|
|
4
4
|
import * as ecsPatterns from 'aws-cdk-lib/aws-ecs-patterns'
|
|
5
5
|
import * as iam from 'aws-cdk-lib/aws-iam'
|
|
6
6
|
import * as logs from 'aws-cdk-lib/aws-logs'
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import * as utils from '../../../utils'
|
|
8
|
+
import { CommonConstruct } from '../../../common'
|
|
9
|
+
import { EcsApplicationLoadBalancedFargateServiceProps, EcsClusterProps, EcsTaskProps } from './types'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @stability stable
|
|
13
13
|
* @category cdk-utils.ecs-manager
|
|
14
14
|
* @subcategory Construct
|
|
15
15
|
* @classdesc Provides operations on AWS Elastic Container Service.
|
|
16
|
-
* - A new instance of this class is injected into {@link
|
|
17
|
-
* - If a custom construct extends {@link
|
|
16
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
17
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
18
18
|
* @example
|
|
19
|
-
* import
|
|
19
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
20
20
|
*
|
|
21
|
-
* class CustomConstruct extends
|
|
21
|
+
* class CustomConstruct extends CommonConstruct {
|
|
22
22
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
23
23
|
* super(parent, id, props)
|
|
24
24
|
* this.props = props
|
|
@@ -32,11 +32,11 @@ export class EcsManager {
|
|
|
32
32
|
/**
|
|
33
33
|
* @summary Method to create an ecs cluster
|
|
34
34
|
* @param {string} id scoped id of the resource
|
|
35
|
-
* @param {
|
|
36
|
-
* @param {
|
|
35
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
36
|
+
* @param {EcsClusterProps} props
|
|
37
37
|
* @param {ec2.IVpc} vpc
|
|
38
38
|
*/
|
|
39
|
-
public createEcsCluster(id: string, scope:
|
|
39
|
+
public createEcsCluster(id: string, scope: CommonConstruct, props: EcsClusterProps, vpc: ec2.IVpc) {
|
|
40
40
|
if (!props) throw `Ecs Cluster props undefined for ${id}`
|
|
41
41
|
|
|
42
42
|
const ecsCluster = new ecs.Cluster(scope, `${id}`, {
|
|
@@ -64,8 +64,8 @@ export class EcsManager {
|
|
|
64
64
|
/**
|
|
65
65
|
* @summary Method to create an ecs fargate task
|
|
66
66
|
* @param {string} id scoped id of the resource
|
|
67
|
-
* @param {
|
|
68
|
-
* @param {
|
|
67
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
68
|
+
* @param {EcsTaskProps} props
|
|
69
69
|
* @param {ecs.ICluster} cluster
|
|
70
70
|
* @param {iam.Role} role
|
|
71
71
|
* @param {logs.ILogGroup} logGroup
|
|
@@ -76,8 +76,8 @@ export class EcsManager {
|
|
|
76
76
|
*/
|
|
77
77
|
public createEcsFargateTask(
|
|
78
78
|
id: string,
|
|
79
|
-
scope:
|
|
80
|
-
props:
|
|
79
|
+
scope: CommonConstruct,
|
|
80
|
+
props: EcsTaskProps,
|
|
81
81
|
cluster: ecs.ICluster,
|
|
82
82
|
role: iam.Role,
|
|
83
83
|
logGroup: logs.ILogGroup,
|
|
@@ -140,15 +140,15 @@ export class EcsManager {
|
|
|
140
140
|
/**
|
|
141
141
|
* @summary Method to create an application loadbalanced ecs fargate task
|
|
142
142
|
* @param {string} id scoped id of the resource
|
|
143
|
-
* @param {
|
|
144
|
-
* @param {
|
|
143
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
144
|
+
* @param {EcsApplicationLoadBalancedFargateServiceProps} props
|
|
145
145
|
* @param {ecs.ICluster} cluster
|
|
146
146
|
* @param {logs.ILogGroup} logGroup
|
|
147
147
|
*/
|
|
148
148
|
public createLoadBalancedFargateService(
|
|
149
149
|
id: string,
|
|
150
|
-
scope:
|
|
151
|
-
props:
|
|
150
|
+
scope: CommonConstruct,
|
|
151
|
+
props: EcsApplicationLoadBalancedFargateServiceProps,
|
|
152
152
|
cluster: ecs.ICluster,
|
|
153
153
|
logGroup: logs.ILogGroup
|
|
154
154
|
) {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { TagProps } from '../../../types'
|
|
2
|
+
import { AwsLogDriverProps, ClusterProps, MountPoint, TaskDefinitionProps } from 'aws-cdk-lib/aws-ecs'
|
|
3
|
+
import { ScalingSchedule } from 'aws-cdk-lib/aws-applicationautoscaling'
|
|
4
|
+
import { ApplicationLoadBalancedFargateServiceProps } from 'aws-cdk-lib/aws-ecs-patterns'
|
|
5
|
+
import * as elb from 'aws-cdk-lib/aws-elasticloadbalancingv2'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @category cdk-utils.ecs-manager
|
|
9
|
+
* @subcategory Properties
|
|
10
|
+
*/
|
|
11
|
+
export interface EcsClusterProps extends ClusterProps {
|
|
12
|
+
tags?: TagProps[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @category cdk-utils.ecs-manager
|
|
17
|
+
* @subcategory Properties
|
|
18
|
+
*/
|
|
19
|
+
export interface EcsTaskProps extends TaskDefinitionProps {
|
|
20
|
+
logging?: AwsLogDriverProps
|
|
21
|
+
tags?: TagProps[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface EcsScalingProps {
|
|
25
|
+
minCapacity?: number
|
|
26
|
+
maxCapacity?: number
|
|
27
|
+
scaleOnCpuUtilization?: number
|
|
28
|
+
scaleOnMemoryUtilization?: number
|
|
29
|
+
scaleOnRequestsPerTarget?: number
|
|
30
|
+
scaleOnSchedule?: ScalingSchedule
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @category cdk-utils.site-with-ecs-backend
|
|
35
|
+
* @subcategory Properties
|
|
36
|
+
*/
|
|
37
|
+
export interface HealthCheck extends elb.HealthCheck {
|
|
38
|
+
intervalInSecs: number
|
|
39
|
+
timeoutInSecs: number
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @category cdk-utils.ecs-manager
|
|
44
|
+
* @subcategory Properties
|
|
45
|
+
*/
|
|
46
|
+
export interface EcsApplicationLoadBalancedFargateServiceProps extends ApplicationLoadBalancedFargateServiceProps {
|
|
47
|
+
healthCheck?: HealthCheck
|
|
48
|
+
logging?: AwsLogDriverProps
|
|
49
|
+
mountPoints?: MountPoint[]
|
|
50
|
+
siteScaling?: EcsScalingProps
|
|
51
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as common from '../../common'
|
|
2
|
-
import * as types from '../../types/aws'
|
|
3
1
|
import * as ec2 from 'aws-cdk-lib/aws-ec2'
|
|
4
2
|
import * as efs from 'aws-cdk-lib/aws-efs'
|
|
5
3
|
import * as cdk from 'aws-cdk-lib'
|
|
6
|
-
import * as utils from '
|
|
4
|
+
import * as utils from '../../../utils'
|
|
5
|
+
import { CommonConstruct } from '../../../common'
|
|
6
|
+
import { EfsAccessPointOptions, EfsFileSystemProps } from './types'
|
|
7
7
|
|
|
8
8
|
export const DEFAULT_CREATE_ACL = {
|
|
9
9
|
ownerUid: '1000',
|
|
@@ -21,12 +21,12 @@ export const DEFAULT_POSIX_USER = {
|
|
|
21
21
|
* @category cdk-utils.efs-manager
|
|
22
22
|
* @subcategory Construct
|
|
23
23
|
* @classdesc Provides operations on AWS Elastic File System.
|
|
24
|
-
* - A new instance of this class is injected into {@link
|
|
25
|
-
* - If a custom construct extends {@link
|
|
24
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
25
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
26
26
|
* @example
|
|
27
|
-
* import
|
|
27
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
28
28
|
*
|
|
29
|
-
* class CustomConstruct extends
|
|
29
|
+
* class CustomConstruct extends CommonConstruct {
|
|
30
30
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
31
31
|
* super(parent, id, props)
|
|
32
32
|
* this.props = props
|
|
@@ -40,19 +40,19 @@ export class EfsManager {
|
|
|
40
40
|
/**
|
|
41
41
|
* @summary Method to create an efs file system
|
|
42
42
|
* @param {string} id scoped id of the resource
|
|
43
|
-
* @param {
|
|
44
|
-
* @param {
|
|
43
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
44
|
+
* @param {EfsFileSystemProps} props the file system props
|
|
45
45
|
* @param {ec2.IVpc} vpc the vpc to use for the file system
|
|
46
|
-
* @param {
|
|
46
|
+
* @param {EfsAccessPointOptions[]} accessPointOptions optional access point configuration options for the file system
|
|
47
47
|
* @param {ec2.ISecurityGroup} securityGroup optional security groups to configure for the file system
|
|
48
48
|
* @param {ec2.SubnetSelection} vpcSubnets optional subnets to configure for the file system
|
|
49
49
|
*/
|
|
50
50
|
public createFileSystem(
|
|
51
51
|
id: string,
|
|
52
|
-
scope:
|
|
53
|
-
props:
|
|
52
|
+
scope: CommonConstruct,
|
|
53
|
+
props: EfsFileSystemProps,
|
|
54
54
|
vpc: ec2.IVpc,
|
|
55
|
-
accessPointOptions?:
|
|
55
|
+
accessPointOptions?: EfsAccessPointOptions[],
|
|
56
56
|
securityGroup?: ec2.ISecurityGroup,
|
|
57
57
|
vpcSubnets?: ec2.SubnetSelection
|
|
58
58
|
) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AccessPointOptions, FileSystemProps } from 'aws-cdk-lib/aws-efs'
|
|
2
|
+
import { AuthorizationConfig } from 'aws-cdk-lib/aws-ecs'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @category cdk-utils.efs-manager
|
|
6
|
+
* @subcategory Properties
|
|
7
|
+
*/
|
|
8
|
+
export interface EfsFileSystemProps extends FileSystemProps {
|
|
9
|
+
provisionNewOnDeployment?: boolean
|
|
10
|
+
rootDirectory?: string
|
|
11
|
+
transitEncryption?: string
|
|
12
|
+
transitEncryptionPort?: number
|
|
13
|
+
authorizationConfig?: AuthorizationConfig
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @category cdk-utils.efs-manager
|
|
18
|
+
* @subcategory Properties
|
|
19
|
+
*/
|
|
20
|
+
export interface EfsAccessPointOptions extends AccessPointOptions {}
|
package/src/lib/{manager/aws/eks-manager.ts → services/aws/elastic-kubernetes-service/main.ts}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as ec2 from 'aws-cdk-lib/aws-ec2'
|
|
2
2
|
import * as ecr from 'aws-cdk-lib/aws-ecr-assets'
|
|
3
3
|
import * as eks from 'aws-cdk-lib/aws-eks'
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import * as utils from '../../../utils'
|
|
5
|
+
import { CommonConstruct } from '../../../common'
|
|
6
|
+
import { EksClusterProps } from './types'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @stability stable
|
|
10
10
|
* @category cdk-utils.eks-manager
|
|
11
11
|
* @subcategory Construct
|
|
12
12
|
* @classdesc Provides operations on AWS Elastic Kubernetes Service.
|
|
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
|
-
* import
|
|
16
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
17
17
|
*
|
|
18
|
-
* class CustomConstruct extends
|
|
18
|
+
* class CustomConstruct extends CommonConstruct {
|
|
19
19
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
20
20
|
* super(parent, id, props)
|
|
21
21
|
* this.props = props
|
|
@@ -29,15 +29,15 @@ export class EksManager {
|
|
|
29
29
|
/**
|
|
30
30
|
* @summary Method to create an eks deployment
|
|
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 {EksClusterProps} props
|
|
34
34
|
* @param {ecr.DockerImageAsset} image
|
|
35
35
|
* @param {ec2.IVpc} vpc
|
|
36
36
|
*/
|
|
37
37
|
public createEksDeployment(
|
|
38
38
|
id: string,
|
|
39
|
-
scope:
|
|
40
|
-
props:
|
|
39
|
+
scope: CommonConstruct,
|
|
40
|
+
props: EksClusterProps,
|
|
41
41
|
image: ecr.DockerImageAsset,
|
|
42
42
|
vpc: ec2.IVpc
|
|
43
43
|
) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as elasticache from 'aws-cdk-lib/aws-elasticache'
|
|
2
|
-
import * as
|
|
3
|
-
import * as types from '../../types'
|
|
4
|
-
import * as utils from '../../utils'
|
|
2
|
+
import * as utils from '../../../utils'
|
|
5
3
|
import * as cdk from 'aws-cdk-lib'
|
|
4
|
+
import { CommonConstruct } from '../../../common'
|
|
5
|
+
import { ElastiCacheProps, ReplicatedElastiCacheProps } from './types'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @stability stable
|
|
9
9
|
* @category cdk-utils.elasticache-manager
|
|
10
10
|
* @subcategory Construct
|
|
11
11
|
* @summary Provides operations on AWS ElastiCache Service.
|
|
12
|
-
* - A new instance of scope class is injected into {@link
|
|
13
|
-
* - If a custom construct extends {@link
|
|
12
|
+
* - A new instance of scope class is injected into {@link CommonConstruct} constructor.
|
|
13
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
14
14
|
* @example
|
|
15
|
-
* import
|
|
15
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
16
16
|
*
|
|
17
|
-
* class CustomConstruct extends
|
|
17
|
+
* class CustomConstruct extends CommonConstruct {
|
|
18
18
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
19
19
|
* super(parent, id, props)
|
|
20
20
|
* this.props = props
|
|
@@ -28,10 +28,10 @@ export class ElastiCacheManager {
|
|
|
28
28
|
/**
|
|
29
29
|
* @summary Method to create an elasticache resource
|
|
30
30
|
* @param {string} id scoped id of the resource
|
|
31
|
-
* @param {
|
|
31
|
+
* @param {CommonConstruct} scope scope in which scope resource is defined
|
|
32
32
|
* @param {string[]} subnetIds
|
|
33
33
|
*/
|
|
34
|
-
public createElastiCacheSubnetGroup(id: string, scope:
|
|
34
|
+
public createElastiCacheSubnetGroup(id: string, scope: CommonConstruct, subnetIds: string[]) {
|
|
35
35
|
return new elasticache.CfnSubnetGroup(scope, `${id}`, {
|
|
36
36
|
cacheSubnetGroupName: `${id}-subnet-group-${scope.props.stage}`,
|
|
37
37
|
subnetIds: subnetIds,
|
|
@@ -42,16 +42,16 @@ export class ElastiCacheManager {
|
|
|
42
42
|
/**
|
|
43
43
|
* @summary Method to create an elasticache resource
|
|
44
44
|
* @param {string} id scoped id of the resource
|
|
45
|
-
* @param {
|
|
46
|
-
* @param {
|
|
45
|
+
* @param {CommonConstruct} scope scope in which scope resource is defined
|
|
46
|
+
* @param {ElastiCacheProps} props
|
|
47
47
|
* @param {string[]} subnetIds
|
|
48
48
|
* @param {string[]} securityGroupIds
|
|
49
49
|
* @param {string[]} logDeliveryConfigurations
|
|
50
50
|
*/
|
|
51
51
|
public createElastiCache(
|
|
52
52
|
id: string,
|
|
53
|
-
scope:
|
|
54
|
-
props:
|
|
53
|
+
scope: CommonConstruct,
|
|
54
|
+
props: ElastiCacheProps,
|
|
55
55
|
subnetIds: string[],
|
|
56
56
|
securityGroupIds: string[],
|
|
57
57
|
logDeliveryConfigurations?: any
|
|
@@ -100,19 +100,17 @@ export class ElastiCacheManager {
|
|
|
100
100
|
/**
|
|
101
101
|
* @summary Method to create an replicated elasticache resource
|
|
102
102
|
* @param {string} id scoped id of the resource
|
|
103
|
-
* @param {
|
|
104
|
-
* @param {
|
|
103
|
+
* @param {CommonConstruct} scope scope in which scope resource is defined
|
|
104
|
+
* @param {ReplicatedElastiCacheProps} props
|
|
105
105
|
* @param {string[]} subnetIds
|
|
106
106
|
* @param {string[]} securityGroupIds
|
|
107
|
-
* @param {string[]} logDeliveryConfigurations
|
|
108
107
|
*/
|
|
109
108
|
public createReplicatedElastiCache(
|
|
110
109
|
id: string,
|
|
111
|
-
scope:
|
|
112
|
-
props:
|
|
110
|
+
scope: CommonConstruct,
|
|
111
|
+
props: ReplicatedElastiCacheProps,
|
|
113
112
|
subnetIds: string[],
|
|
114
|
-
securityGroupIds: string[]
|
|
115
|
-
logDeliveryConfigurations?: any
|
|
113
|
+
securityGroupIds: string[]
|
|
116
114
|
) {
|
|
117
115
|
if (!props) throw `ElastiCache props undefined for ${id}`
|
|
118
116
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CfnCacheClusterProps, CfnReplicationGroupProps } from 'aws-cdk-lib/aws-elasticache'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @category cdk-utils.elasticache-manager
|
|
5
|
+
* @category Compute
|
|
6
|
+
*/
|
|
7
|
+
export interface ElastiCacheProps extends CfnCacheClusterProps {}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @category cdk-utils.elasticache-manager
|
|
11
|
+
* @category Compute
|
|
12
|
+
*/
|
|
13
|
+
export interface ReplicatedElastiCacheProps extends CfnReplicationGroupProps {}
|
|
@@ -2,25 +2,25 @@ import * as ecs from 'aws-cdk-lib/aws-ecs'
|
|
|
2
2
|
import * as events from 'aws-cdk-lib/aws-events'
|
|
3
3
|
import * as iam from 'aws-cdk-lib/aws-iam'
|
|
4
4
|
import * as lambda from 'aws-cdk-lib/aws-lambda'
|
|
5
|
-
import * as
|
|
6
|
-
import * as types from '../../types'
|
|
7
|
-
import * as utils from '../../utils'
|
|
5
|
+
import * as utils from '../../../utils'
|
|
8
6
|
import * as cdk from 'aws-cdk-lib'
|
|
9
7
|
import * as pipes from 'aws-cdk-lib/aws-pipes'
|
|
10
8
|
import * as sqs from 'aws-cdk-lib/aws-sqs'
|
|
11
9
|
import * as sfn from 'aws-cdk-lib/aws-stepfunctions'
|
|
10
|
+
import { CommonConstruct } from '../../../common'
|
|
11
|
+
import { EventBusProps, EventRuleProps, RuleProps, SqsToSfnPipeProps } from './types'
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @stability stable
|
|
15
15
|
* @category cdk-utils.event-manager
|
|
16
16
|
* @subcategory Construct
|
|
17
17
|
* @classdesc Provides operations on AWS EventBridge.
|
|
18
|
-
* - A new instance of this class is injected into {@link
|
|
19
|
-
* - If a custom construct extends {@link
|
|
18
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
19
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
20
20
|
* @example
|
|
21
|
-
* import
|
|
21
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
22
22
|
*
|
|
23
|
-
* class CustomConstruct extends
|
|
23
|
+
* class CustomConstruct extends CommonConstruct {
|
|
24
24
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
25
25
|
* super(parent, id, props)
|
|
26
26
|
* this.props = props
|
|
@@ -34,10 +34,10 @@ export class EventManager {
|
|
|
34
34
|
/**
|
|
35
35
|
* Method to create an event bus
|
|
36
36
|
* @param {string} id scoped id of the resource
|
|
37
|
-
* @param {
|
|
38
|
-
* @param {
|
|
37
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
38
|
+
* @param {EventBusProps} props event bus properties
|
|
39
39
|
*/
|
|
40
|
-
public createEventBus(id: string, scope:
|
|
40
|
+
public createEventBus(id: string, scope: CommonConstruct, props: EventBusProps) {
|
|
41
41
|
if (!props) throw `EventBus props undefined for ${id}`
|
|
42
42
|
|
|
43
43
|
const eventBus = new events.EventBus(scope, `${id}`, {
|
|
@@ -53,15 +53,15 @@ export class EventManager {
|
|
|
53
53
|
/**
|
|
54
54
|
* Method to create an event rule
|
|
55
55
|
* @param {string} id scoped id of the resource
|
|
56
|
-
* @param {
|
|
57
|
-
* @param {
|
|
56
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
57
|
+
* @param {EventRuleProps} props event rule properties
|
|
58
58
|
* @param {events.IEventBus?} eventBus optional custom event bus
|
|
59
59
|
* @param {events.IRuleTarget[]?} targets optional event targets
|
|
60
60
|
*/
|
|
61
61
|
public createRule(
|
|
62
62
|
id: string,
|
|
63
|
-
scope:
|
|
64
|
-
props:
|
|
63
|
+
scope: CommonConstruct,
|
|
64
|
+
props: EventRuleProps,
|
|
65
65
|
eventBus?: events.IEventBus,
|
|
66
66
|
targets?: events.IRuleTarget[]
|
|
67
67
|
) {
|
|
@@ -97,8 +97,8 @@ export class EventManager {
|
|
|
97
97
|
/**
|
|
98
98
|
* @summary Method to create an eventbridge rule with lambda target
|
|
99
99
|
* @param {string} id scoped id of the resource
|
|
100
|
-
* @param {
|
|
101
|
-
* @param {
|
|
100
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
101
|
+
* @param {RuleProps} props
|
|
102
102
|
* @param {lambda.Function} lambdaFunction
|
|
103
103
|
* @param {string} eventBusName
|
|
104
104
|
* @param {any} eventPattern
|
|
@@ -106,8 +106,8 @@ export class EventManager {
|
|
|
106
106
|
*/
|
|
107
107
|
public createLambdaRule(
|
|
108
108
|
id: string,
|
|
109
|
-
scope:
|
|
110
|
-
props:
|
|
109
|
+
scope: CommonConstruct,
|
|
110
|
+
props: RuleProps,
|
|
111
111
|
lambdaFunction: lambda.Function,
|
|
112
112
|
eventBusName?: string,
|
|
113
113
|
eventPattern?: any,
|
|
@@ -122,7 +122,13 @@ export class EventManager {
|
|
|
122
122
|
scheduleExpression: scheduleExpression,
|
|
123
123
|
name: `${props.name}-${scope.props.stage}`,
|
|
124
124
|
state: props.state,
|
|
125
|
-
targets: [
|
|
125
|
+
targets: [
|
|
126
|
+
{
|
|
127
|
+
arn: lambdaFunction.functionArn,
|
|
128
|
+
id: `${id}-${scope.props.stage}`,
|
|
129
|
+
input: props.input ?? undefined,
|
|
130
|
+
},
|
|
131
|
+
],
|
|
126
132
|
})
|
|
127
133
|
|
|
128
134
|
new lambda.CfnPermission(scope, `${id}LambdaPermission`, {
|
|
@@ -141,8 +147,8 @@ export class EventManager {
|
|
|
141
147
|
/**
|
|
142
148
|
* @summary Method to create an eventbridge rule with fargate task target
|
|
143
149
|
* @param {string} id scoped id of the resource
|
|
144
|
-
* @param {
|
|
145
|
-
* @param {
|
|
150
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
151
|
+
* @param {EventRuleProps} props
|
|
146
152
|
* @param {ecs.ICluster} cluster
|
|
147
153
|
* @param {ecs.ITaskDefinition} task
|
|
148
154
|
* @param {string[]} subnetIds
|
|
@@ -151,8 +157,8 @@ export class EventManager {
|
|
|
151
157
|
*/
|
|
152
158
|
public createFargateTaskRule(
|
|
153
159
|
id: string,
|
|
154
|
-
scope:
|
|
155
|
-
props:
|
|
160
|
+
scope: CommonConstruct,
|
|
161
|
+
props: RuleProps,
|
|
156
162
|
cluster: ecs.ICluster,
|
|
157
163
|
task: ecs.ITaskDefinition,
|
|
158
164
|
subnetIds: string[],
|
|
@@ -192,15 +198,15 @@ export class EventManager {
|
|
|
192
198
|
/**
|
|
193
199
|
* @summary Method to create an eventbridge pipe with sqs queue as source and step function as target
|
|
194
200
|
* @param {string} id scoped id of the resource
|
|
195
|
-
* @param {
|
|
201
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
196
202
|
* @param props the props for the pipe
|
|
197
203
|
* @param sourceQueue the source sqs queue
|
|
198
204
|
* @param targetStepFunction the target step function
|
|
199
205
|
*/
|
|
200
206
|
public createSqsToSfnCfnPipe(
|
|
201
207
|
id: string,
|
|
202
|
-
scope:
|
|
203
|
-
props:
|
|
208
|
+
scope: CommonConstruct,
|
|
209
|
+
props: SqsToSfnPipeProps,
|
|
204
210
|
sourceQueue: sqs.IQueue,
|
|
205
211
|
targetStepFunction: sfn.IStateMachine
|
|
206
212
|
) {
|
|
@@ -2,19 +2,19 @@ import * as cdk from 'aws-cdk-lib'
|
|
|
2
2
|
import * as events from 'aws-cdk-lib/aws-events'
|
|
3
3
|
import * as targets from 'aws-cdk-lib/aws-events-targets'
|
|
4
4
|
import * as logs from 'aws-cdk-lib/aws-logs'
|
|
5
|
-
import
|
|
5
|
+
import { CommonConstruct } from '../../../common'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @stability stable
|
|
9
9
|
* @category cdk-utils.event-taeget-manager
|
|
10
10
|
* @subcategory Construct
|
|
11
11
|
* @classdesc Provides operations on AWS EventBridge Targets.
|
|
12
|
-
* - A new instance of this class is injected into {@link
|
|
13
|
-
* - If a custom construct extends {@link
|
|
12
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
13
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
14
14
|
* @example
|
|
15
|
-
* import
|
|
15
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
16
16
|
*
|
|
17
|
-
* class CustomConstruct extends
|
|
17
|
+
* class CustomConstruct extends CommonConstruct {
|
|
18
18
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
19
19
|
* super(parent, id, props)
|
|
20
20
|
* this.props = props
|
|
@@ -29,13 +29,13 @@ export class EventTargetManager {
|
|
|
29
29
|
* @summary Method to create a cloud watch log group target without a policy.
|
|
30
30
|
* - This method is created as a workaround for cdk issue - https://github.com/aws/aws-cdk/issues/17002
|
|
31
31
|
* @param {string} id scoped id of the resource
|
|
32
|
-
* @param {
|
|
32
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
33
33
|
* @param {logs.ILogGroup} logGroup the log group
|
|
34
34
|
* @param {LogGroupNoPolicyProps} props the log group target properties
|
|
35
35
|
*/
|
|
36
36
|
public createCloudWatchLogGroupNoPolicy(
|
|
37
37
|
id: string,
|
|
38
|
-
scope:
|
|
38
|
+
scope: CommonConstruct,
|
|
39
39
|
logGroup: logs.ILogGroup,
|
|
40
40
|
props?: LogGroupNoPolicyProps
|
|
41
41
|
) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CfnPipeProps } from 'aws-cdk-lib/aws-pipes'
|
|
2
|
+
import { CfnRuleProps, EventBusProps as EBProps, RuleProps as EBRuleProps } from 'aws-cdk-lib/aws-events'
|
|
3
|
+
import { TagProps } from '../../../types'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
}
|
|
7
|
+
* @category cdk-utils.event-manager
|
|
8
|
+
* @subcategory Properties
|
|
9
|
+
*/
|
|
10
|
+
export interface SqsToSfnPipeProps extends CfnPipeProps {
|
|
11
|
+
pipeFilterPattern?: any
|
|
12
|
+
sqsBatchSize?: number
|
|
13
|
+
sqsMaximumBatchingWindowInSeconds?: number
|
|
14
|
+
sfnInvocationType?: string
|
|
15
|
+
sfnInputTemplate?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @category cdk-utils.event-manager
|
|
20
|
+
* @subcategory Properties
|
|
21
|
+
*/
|
|
22
|
+
export interface EventRuleProps extends EBRuleProps {
|
|
23
|
+
tags?: TagProps[]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @category cdk-utils.event-manager
|
|
28
|
+
* @subcategory Properties
|
|
29
|
+
*/
|
|
30
|
+
export interface RuleProps extends CfnRuleProps {
|
|
31
|
+
input?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @category cdk-utils.event-manager
|
|
36
|
+
* @subcategory Properties
|
|
37
|
+
*/
|
|
38
|
+
export interface EventBusProps extends EBProps {}
|