@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
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import * as evidently from 'aws-cdk-lib/aws-evidently'
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
2
|
+
import * as utils from '../../../utils'
|
|
3
|
+
import { CommonConstruct } from '../../../common'
|
|
4
|
+
import {
|
|
5
|
+
EvidentlyExperimentProps,
|
|
6
|
+
EvidentlyFeatureProps,
|
|
7
|
+
EvidentlyLaunchProps,
|
|
8
|
+
EvidentlyProjectProps,
|
|
9
|
+
EvidentlySegmentProps,
|
|
10
|
+
} from './types'
|
|
6
11
|
|
|
7
12
|
/**
|
|
8
13
|
* @stability stable
|
|
9
14
|
* @category cdk-utils.evidently-manager
|
|
10
15
|
* @subcategory Construct
|
|
11
16
|
* @classdesc Provides operations on AWS Evidently.
|
|
12
|
-
* - A new instance of this class is injected into {@link
|
|
13
|
-
* - If a custom construct extends {@link
|
|
17
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
18
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
14
19
|
* @example
|
|
15
|
-
* import
|
|
20
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
16
21
|
*
|
|
17
|
-
* class CustomConstruct extends
|
|
22
|
+
* class CustomConstruct extends CommonConstruct {
|
|
18
23
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
19
24
|
* super(parent, id, props)
|
|
20
25
|
* this.props = props
|
|
@@ -28,10 +33,10 @@ export class EvidentlyManager {
|
|
|
28
33
|
/**
|
|
29
34
|
* @summary Method to create a project
|
|
30
35
|
* @param {string} id scoped id of the resource
|
|
31
|
-
* @param {
|
|
36
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
32
37
|
* @param {EvidentlyProjectProps} props the project properties
|
|
33
38
|
*/
|
|
34
|
-
public createProject(id: string, scope:
|
|
39
|
+
public createProject(id: string, scope: CommonConstruct, props: EvidentlyProjectProps) {
|
|
35
40
|
const project = new evidently.CfnProject(scope, `${id}`, {
|
|
36
41
|
...props,
|
|
37
42
|
name: `${props.name}-${scope.props.stage}`,
|
|
@@ -45,10 +50,10 @@ export class EvidentlyManager {
|
|
|
45
50
|
/**
|
|
46
51
|
* @summary Method to create a feature
|
|
47
52
|
* @param {string} id scoped id of the resource
|
|
48
|
-
* @param {
|
|
53
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
49
54
|
* @param {EvidentlyFeatureProps} props the feature properties
|
|
50
55
|
*/
|
|
51
|
-
public createFeature(id: string, scope:
|
|
56
|
+
public createFeature(id: string, scope: CommonConstruct, props: EvidentlyFeatureProps) {
|
|
52
57
|
const feature = new evidently.CfnFeature(scope, `${id}`, props)
|
|
53
58
|
utils.createCfnOutput(`${id}-featureArn`, scope, feature.attrArn)
|
|
54
59
|
utils.createCfnOutput(`${id}-featureName`, scope, feature.name)
|
|
@@ -58,10 +63,10 @@ export class EvidentlyManager {
|
|
|
58
63
|
/**
|
|
59
64
|
* @summary Method to create a launch
|
|
60
65
|
* @param {string} id scoped id of the resource
|
|
61
|
-
* @param {
|
|
66
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
62
67
|
* @param {EvidentlyLaunchProps} props the launch properties
|
|
63
68
|
*/
|
|
64
|
-
public createLaunch(id: string, scope:
|
|
69
|
+
public createLaunch(id: string, scope: CommonConstruct, props: EvidentlyLaunchProps) {
|
|
65
70
|
const launch = new evidently.CfnLaunch(scope, `${id}`, {
|
|
66
71
|
...props,
|
|
67
72
|
name: `${props.name}-${scope.props.stage}`,
|
|
@@ -75,10 +80,10 @@ export class EvidentlyManager {
|
|
|
75
80
|
/**
|
|
76
81
|
* @summary Method to create an experiment
|
|
77
82
|
* @param {string} id scoped id of the resource
|
|
78
|
-
* @param {
|
|
83
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
79
84
|
* @param {EvidentlyExperimentProps} props the experiment properties
|
|
80
85
|
*/
|
|
81
|
-
public createExperiment(id: string, scope:
|
|
86
|
+
public createExperiment(id: string, scope: CommonConstruct, props: EvidentlyExperimentProps) {
|
|
82
87
|
const experiment = new evidently.CfnExperiment(scope, `${id}`, {
|
|
83
88
|
...props,
|
|
84
89
|
name: `${props.name}-${scope.props.stage}`,
|
|
@@ -92,10 +97,10 @@ export class EvidentlyManager {
|
|
|
92
97
|
/**
|
|
93
98
|
* @summary Method to create a segment
|
|
94
99
|
* @param {string} id scoped id of the resource
|
|
95
|
-
* @param {
|
|
100
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
96
101
|
* @param {EvidentlySegmentProps} props the segment properties
|
|
97
102
|
*/
|
|
98
|
-
public createSegment(id: string, scope:
|
|
103
|
+
public createSegment(id: string, scope: CommonConstruct, props: EvidentlySegmentProps) {
|
|
99
104
|
const segment = new evidently.CfnSegment(scope, `${id}`, {
|
|
100
105
|
...props,
|
|
101
106
|
name: `${props.name}-${scope.props.stage}`,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CfnExperimentProps,
|
|
3
|
+
CfnFeatureProps,
|
|
4
|
+
CfnLaunchProps,
|
|
5
|
+
CfnProjectProps,
|
|
6
|
+
CfnSegmentProps,
|
|
7
|
+
} from 'aws-cdk-lib/aws-evidently'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @category cdk-utils.evidently-manager
|
|
11
|
+
* @subcategory Properties
|
|
12
|
+
*/
|
|
13
|
+
export interface EvidentlyProjectProps extends CfnProjectProps {}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @category cdk-utils.evidently-manager
|
|
17
|
+
* @subcategory Properties
|
|
18
|
+
*/
|
|
19
|
+
export interface EvidentlyFeatureProps extends CfnFeatureProps {}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @category cdk-utils.evidently-manager
|
|
23
|
+
* @subcategory Properties
|
|
24
|
+
*/
|
|
25
|
+
export interface EvidentlyLaunchProps extends CfnLaunchProps {}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @category cdk-utils.evidently-manager
|
|
29
|
+
* @subcategory Properties
|
|
30
|
+
*/
|
|
31
|
+
export interface EvidentlyExperimentProps extends CfnExperimentProps {}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @category cdk-utils.evidently-manager
|
|
35
|
+
* @subcategory Properties
|
|
36
|
+
*/
|
|
37
|
+
export interface EvidentlySegmentProps extends CfnSegmentProps {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './main'
|
package/src/lib/{manager/aws/iam-manager.ts → services/aws/identity-access-management/main.ts}
RENAMED
|
@@ -5,20 +5,20 @@ import * as iam from 'aws-cdk-lib/aws-iam'
|
|
|
5
5
|
import * as logs from 'aws-cdk-lib/aws-logs'
|
|
6
6
|
import * as s3 from 'aws-cdk-lib/aws-s3'
|
|
7
7
|
import * as sqs from 'aws-cdk-lib/aws-sqs'
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
8
|
+
import * as utils from '../../../utils'
|
|
9
|
+
import { CommonConstruct } from '../../../common'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @stability stable
|
|
13
13
|
* @category cdk-utils.iam-manager
|
|
14
14
|
* @subcategory Construct
|
|
15
15
|
* @classdesc Provides operations on AWS IAM.
|
|
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
|
|
@@ -31,10 +31,10 @@ import * as utils from '../../utils'
|
|
|
31
31
|
export class IamManager {
|
|
32
32
|
/**
|
|
33
33
|
* @summary Method to create iam statement to read secrets
|
|
34
|
-
* @param {
|
|
34
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
35
35
|
* @param {string[]} resourceArns list of ARNs to allow access to
|
|
36
36
|
*/
|
|
37
|
-
public statementForReadSecrets(scope:
|
|
37
|
+
public statementForReadSecrets(scope: CommonConstruct, resourceArns?: string[]) {
|
|
38
38
|
return new iam.PolicyStatement({
|
|
39
39
|
effect: iam.Effect.ALLOW,
|
|
40
40
|
actions: ['secretsmanager:GetSecretValue'],
|
|
@@ -155,10 +155,10 @@ export class IamManager {
|
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
157
|
* @summary Method to create iam statement to list s3 buckets
|
|
158
|
-
* @param {
|
|
158
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
159
159
|
* @param {s3.IBucket} bucket
|
|
160
160
|
*/
|
|
161
|
-
public statementForListBucket(scope:
|
|
161
|
+
public statementForListBucket(scope: CommonConstruct, bucket: s3.IBucket) {
|
|
162
162
|
return new iam.PolicyStatement({
|
|
163
163
|
effect: iam.Effect.ALLOW,
|
|
164
164
|
actions: ['s3:ListBucket'],
|
|
@@ -180,11 +180,11 @@ export class IamManager {
|
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
182
|
* @summary Method to create iam statement to get s3 objects in buckets
|
|
183
|
-
* @param {
|
|
183
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
184
184
|
* @param {s3.IBucket} bucket
|
|
185
185
|
* @param {string[]} resourceArns list of ARNs to allow access to
|
|
186
186
|
*/
|
|
187
|
-
public statementForGetAnyS3Objects(scope:
|
|
187
|
+
public statementForGetAnyS3Objects(scope: CommonConstruct, bucket: s3.IBucket, resourceArns?: string[]) {
|
|
188
188
|
return new iam.PolicyStatement({
|
|
189
189
|
effect: iam.Effect.ALLOW,
|
|
190
190
|
actions: ['s3:GetObject', 's3:GetObjectAcl'],
|
|
@@ -194,11 +194,11 @@ export class IamManager {
|
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
196
|
* @summary Method to create iam statement to delete s3 objects in buckets
|
|
197
|
-
* @param {
|
|
197
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
198
198
|
* @param {s3.IBucket} bucket
|
|
199
199
|
* @param {string[]} resourceArns list of ARNs to allow access to
|
|
200
200
|
*/
|
|
201
|
-
public statementForDeleteAnyS3Objects(scope:
|
|
201
|
+
public statementForDeleteAnyS3Objects(scope: CommonConstruct, bucket: s3.IBucket, resourceArns?: string[]) {
|
|
202
202
|
return new iam.PolicyStatement({
|
|
203
203
|
effect: iam.Effect.ALLOW,
|
|
204
204
|
actions: ['s3:DeleteObject'],
|
|
@@ -208,11 +208,11 @@ export class IamManager {
|
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
210
|
* @summary Method to create iam statement to write s3 objects in buckets
|
|
211
|
-
* @param {
|
|
211
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
212
212
|
* @param {s3.IBucket} bucket
|
|
213
213
|
* @param {string[]} resourceArns list of ARNs to allow access to
|
|
214
214
|
*/
|
|
215
|
-
public statementForPutAnyS3Objects(scope:
|
|
215
|
+
public statementForPutAnyS3Objects(scope: CommonConstruct, bucket: s3.IBucket, resourceArns?: string[]) {
|
|
216
216
|
return new iam.PolicyStatement({
|
|
217
217
|
effect: iam.Effect.ALLOW,
|
|
218
218
|
actions: ['s3:PutObject', 's3:PutObjectAcl'],
|
|
@@ -246,7 +246,6 @@ export class IamManager {
|
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
248
|
* @summary Method to create iam statement to access efs
|
|
249
|
-
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
250
249
|
* @param {string[]} resourceArns list of ARNs to allow access to
|
|
251
250
|
*/
|
|
252
251
|
public statementForWriteEfs(resourceArns?: string[]) {
|
|
@@ -284,9 +283,9 @@ export class IamManager {
|
|
|
284
283
|
/**
|
|
285
284
|
* @summary Method to create iam role to invalidate cloudfront cache
|
|
286
285
|
* @param {string} id scoped id of the resource
|
|
287
|
-
* @param {
|
|
286
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
288
287
|
*/
|
|
289
|
-
public roleForCloudfrontInvalidation(id: string, scope:
|
|
288
|
+
public roleForCloudfrontInvalidation(id: string, scope: CommonConstruct) {
|
|
290
289
|
return new iam.Role(scope, `${id}-install-deps-project-role`, {
|
|
291
290
|
assumedBy: new iam.ServicePrincipal('codebuild.amazonaws.com'),
|
|
292
291
|
inlinePolicies: {
|
|
@@ -297,10 +296,10 @@ export class IamManager {
|
|
|
297
296
|
|
|
298
297
|
/**
|
|
299
298
|
* @summary Method to create iam statement to assume iam role
|
|
300
|
-
* @param {
|
|
299
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
301
300
|
* @param {iam.ServicePrincipal[]} servicePrincipals
|
|
302
301
|
*/
|
|
303
|
-
public statementForAssumeRole(scope:
|
|
302
|
+
public statementForAssumeRole(scope: CommonConstruct, servicePrincipals: iam.ServicePrincipal[]) {
|
|
304
303
|
return new iam.PolicyStatement({
|
|
305
304
|
effect: iam.Effect.ALLOW,
|
|
306
305
|
actions: ['sts:AssumeRole'],
|
|
@@ -323,11 +322,11 @@ export class IamManager {
|
|
|
323
322
|
|
|
324
323
|
/**
|
|
325
324
|
* @summary Method to create iam statement to run ecs task
|
|
326
|
-
* @param {
|
|
325
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
327
326
|
* @param {ecs.ICluster} cluster
|
|
328
327
|
* @param {ecs.ITaskDefinition} task
|
|
329
328
|
*/
|
|
330
|
-
public statementForRunEcsTask(scope:
|
|
329
|
+
public statementForRunEcsTask(scope: CommonConstruct, cluster: ecs.ICluster, task: ecs.ITaskDefinition) {
|
|
331
330
|
return new iam.PolicyStatement({
|
|
332
331
|
effect: iam.Effect.ALLOW,
|
|
333
332
|
actions: ['ecs:RunTask'],
|
|
@@ -338,10 +337,10 @@ export class IamManager {
|
|
|
338
337
|
|
|
339
338
|
/**
|
|
340
339
|
* @summary Method to create iam statement to create log stream
|
|
341
|
-
* @param {
|
|
340
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
342
341
|
* @param {logs.CfnLogGroup} logGroup
|
|
343
342
|
*/
|
|
344
|
-
public statementForCreateLogStream(scope:
|
|
343
|
+
public statementForCreateLogStream(scope: CommonConstruct, logGroup: logs.CfnLogGroup) {
|
|
345
344
|
return new iam.PolicyStatement({
|
|
346
345
|
effect: iam.Effect.ALLOW,
|
|
347
346
|
actions: ['logs:CreateLogStream'],
|
|
@@ -368,10 +367,10 @@ export class IamManager {
|
|
|
368
367
|
|
|
369
368
|
/**
|
|
370
369
|
* @summary Method to create iam statement to write log events
|
|
371
|
-
* @param {
|
|
370
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
372
371
|
* @param {logs.CfnLogGroup} logGroup
|
|
373
372
|
*/
|
|
374
|
-
public statementForPutLogEvent(scope:
|
|
373
|
+
public statementForPutLogEvent(scope: CommonConstruct, logGroup: logs.CfnLogGroup) {
|
|
375
374
|
return new iam.PolicyStatement({
|
|
376
375
|
effect: iam.Effect.ALLOW,
|
|
377
376
|
actions: ['logs:PutLogEvents'],
|
|
@@ -432,10 +431,10 @@ export class IamManager {
|
|
|
432
431
|
/**
|
|
433
432
|
* @summary Method to create iam statement for cloud trail
|
|
434
433
|
* @param {string} id scoped id of the resource
|
|
435
|
-
* @param {
|
|
434
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
436
435
|
* @param {logs.CfnLogGroup} logGroup
|
|
437
436
|
*/
|
|
438
|
-
public createRoleForCloudTrail(id: string, scope:
|
|
437
|
+
public createRoleForCloudTrail(id: string, scope: CommonConstruct, logGroup: logs.CfnLogGroup) {
|
|
439
438
|
const policy = new iam.PolicyDocument({
|
|
440
439
|
statements: [this.statementForCreateLogStream(scope, logGroup), this.statementForPutLogEvent(scope, logGroup)],
|
|
441
440
|
})
|
|
@@ -461,16 +460,11 @@ export class IamManager {
|
|
|
461
460
|
/**
|
|
462
461
|
* @summary Method to create iam statement for ecs event
|
|
463
462
|
* @param {string} id scoped id of the resource
|
|
464
|
-
* @param {
|
|
463
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
465
464
|
* @param {ecs.ICluster} cluster
|
|
466
465
|
* @param {ecs.ITaskDefinition} task
|
|
467
466
|
*/
|
|
468
|
-
public createRoleForEcsEvent(
|
|
469
|
-
id: string,
|
|
470
|
-
scope: common.CommonConstruct,
|
|
471
|
-
cluster: ecs.ICluster,
|
|
472
|
-
task: ecs.ITaskDefinition
|
|
473
|
-
) {
|
|
467
|
+
public createRoleForEcsEvent(id: string, scope: CommonConstruct, cluster: ecs.ICluster, task: ecs.ITaskDefinition) {
|
|
474
468
|
const policy = new iam.PolicyDocument({
|
|
475
469
|
statements: [this.statementForRunEcsTask(scope, cluster, task), this.statementForEcsPassRole()],
|
|
476
470
|
})
|
|
@@ -491,10 +485,10 @@ export class IamManager {
|
|
|
491
485
|
/**
|
|
492
486
|
* @summary Method to create iam statement for ecs execution
|
|
493
487
|
* @param {string} id scoped id of the resource
|
|
494
|
-
* @param {
|
|
488
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
495
489
|
* @param {iam.PolicyDocument} policy
|
|
496
490
|
*/
|
|
497
|
-
public createRoleForEcsExecution(id: string, scope:
|
|
491
|
+
public createRoleForEcsExecution(id: string, scope: CommonConstruct, policy: iam.PolicyDocument) {
|
|
498
492
|
const role = new iam.Role(scope, `${id}`, {
|
|
499
493
|
assumedBy: new iam.ServicePrincipal('ecs-tasks.amazonaws.com'),
|
|
500
494
|
description: `Role for ${id} ECS Task execution`,
|
|
@@ -518,13 +512,13 @@ export class IamManager {
|
|
|
518
512
|
/**
|
|
519
513
|
* @summary Method to create iam statement for lambda execution
|
|
520
514
|
* @param {string} id scoped id of the resource
|
|
521
|
-
* @param {
|
|
515
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
522
516
|
* @param {iam.PolicyDocument} policy
|
|
523
517
|
* @param {iam.ServicePrincipal} servicePrinicpal
|
|
524
518
|
*/
|
|
525
519
|
public createRoleForLambda(
|
|
526
520
|
id: string,
|
|
527
|
-
scope:
|
|
521
|
+
scope: CommonConstruct,
|
|
528
522
|
policy: iam.PolicyDocument,
|
|
529
523
|
servicePrinicpal?: iam.ServicePrincipal
|
|
530
524
|
) {
|
|
@@ -551,13 +545,13 @@ export class IamManager {
|
|
|
551
545
|
/**
|
|
552
546
|
* @summary Method to create iam statement for step function execution
|
|
553
547
|
* @param {string} id scoped id of the resource
|
|
554
|
-
* @param {
|
|
548
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
555
549
|
* @param {iam.PolicyDocument} policy
|
|
556
550
|
* @param {iam.ServicePrincipal} servicePrinicpal
|
|
557
551
|
*/
|
|
558
552
|
public createRoleForStepFunction(
|
|
559
553
|
id: string,
|
|
560
|
-
scope:
|
|
554
|
+
scope: CommonConstruct,
|
|
561
555
|
policy: iam.PolicyDocument,
|
|
562
556
|
servicePrinicpal?: iam.ServicePrincipal
|
|
563
557
|
) {
|
|
@@ -584,16 +578,11 @@ export class IamManager {
|
|
|
584
578
|
/**
|
|
585
579
|
* @summary Method to create iam statement for sqs to step function pipe
|
|
586
580
|
* @param {string} id scoped id of the resource
|
|
587
|
-
* @param {
|
|
581
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
588
582
|
* @param {string} queueArn the arn of the sqs queue
|
|
589
583
|
* @param {string} stepFunctionArn the arn of the step function
|
|
590
584
|
*/
|
|
591
|
-
public createRoleForSqsToSfnPipe(
|
|
592
|
-
id: string,
|
|
593
|
-
scope: common.CommonConstruct,
|
|
594
|
-
queueArn: string,
|
|
595
|
-
stepFunctionArn: string
|
|
596
|
-
) {
|
|
585
|
+
public createRoleForSqsToSfnPipe(id: string, scope: CommonConstruct, queueArn: string, stepFunctionArn: string) {
|
|
597
586
|
const role = new iam.Role(scope, `${id}`, {
|
|
598
587
|
assumedBy: new iam.ServicePrincipal('pipes.amazonaws.com'),
|
|
599
588
|
description: `Role for ${id} Pipe`,
|
|
@@ -612,14 +601,14 @@ export class IamManager {
|
|
|
612
601
|
/**
|
|
613
602
|
* @summary Method to create iam policy for sqs
|
|
614
603
|
* @param {string} id scoped id of the resource
|
|
615
|
-
* @param {
|
|
604
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
616
605
|
* @param sqsQueue
|
|
617
606
|
* @param eventBridgeRule
|
|
618
607
|
* @param servicePrincipals
|
|
619
608
|
*/
|
|
620
609
|
public createPolicyForSqsEvent(
|
|
621
610
|
id: string,
|
|
622
|
-
scope:
|
|
611
|
+
scope: CommonConstruct,
|
|
623
612
|
sqsQueue: sqs.Queue,
|
|
624
613
|
eventBridgeRule: events.IRule,
|
|
625
614
|
servicePrincipals?: iam.ServicePrincipal[]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from './api-gateway'
|
|
2
|
+
export * from './appconfig'
|
|
3
|
+
export * from './certificate-manager'
|
|
4
|
+
export * from './cloudfront'
|
|
5
|
+
export * from './cloudtrail'
|
|
6
|
+
export * from './cloudwatch'
|
|
7
|
+
export * from './codebuild'
|
|
8
|
+
export * from './constants'
|
|
9
|
+
export * from './dynamodb'
|
|
10
|
+
export * from './elastic-container-registry'
|
|
11
|
+
export * from './elastic-container-service'
|
|
12
|
+
export * from './elastic-file-system'
|
|
13
|
+
export * from './elastic-kubernetes-service'
|
|
14
|
+
export * from './elasticache'
|
|
15
|
+
export * from './eventbridge'
|
|
16
|
+
export * from './evidently'
|
|
17
|
+
export * from './identity-access-management'
|
|
18
|
+
export * from './key-management-service'
|
|
19
|
+
export * from './lambda'
|
|
20
|
+
export * from './route53'
|
|
21
|
+
export * from './secrets-manager'
|
|
22
|
+
export * from './simple-notification-service'
|
|
23
|
+
export * from './simple-queue-service'
|
|
24
|
+
export * from './simple-storage-service'
|
|
25
|
+
export * from './step-function'
|
|
26
|
+
export * from './systems-manager'
|
|
27
|
+
export * from './virtual-private-cloud'
|
|
28
|
+
export * from './web-application-firewall'
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as kms from 'aws-cdk-lib/aws-kms'
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import * as utils from '../../../utils'
|
|
3
|
+
import { CommonConstruct } from '../../../common'
|
|
4
|
+
import { KmsKeyProps } from './types'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @stability stable
|
|
8
8
|
* @category cdk-utils.kms-manager
|
|
9
9
|
* @subcategory Construct
|
|
10
10
|
* @classdesc Provides operations on AWS KMS.
|
|
11
|
-
* - A new instance of this class is injected into {@link
|
|
12
|
-
* - If a custom construct extends {@link
|
|
11
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
12
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
13
13
|
* @example
|
|
14
14
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
15
15
|
*
|
|
@@ -27,10 +27,10 @@ export class KmsManager {
|
|
|
27
27
|
/**
|
|
28
28
|
* @summary Method to create a KMS key
|
|
29
29
|
* @param {string} id scoped id of the resource
|
|
30
|
-
* @param {
|
|
31
|
-
* @param {
|
|
30
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
31
|
+
* @param {KmsKeyProps} props KMS key props
|
|
32
32
|
*/
|
|
33
|
-
public createKey(id: string, scope:
|
|
33
|
+
public createKey(id: string, scope: CommonConstruct, props: KmsKeyProps) {
|
|
34
34
|
if (!props) throw `KMS Key props undefined for ${id}`
|
|
35
35
|
|
|
36
36
|
const key = new kms.Key(scope, `${id}`, {
|
|
@@ -3,25 +3,25 @@ import * as ec2 from 'aws-cdk-lib/aws-ec2'
|
|
|
3
3
|
import * as efs from 'aws-cdk-lib/aws-efs'
|
|
4
4
|
import * as iam from 'aws-cdk-lib/aws-iam'
|
|
5
5
|
import * as lambda from 'aws-cdk-lib/aws-lambda'
|
|
6
|
+
import { IVersion } from 'aws-cdk-lib/aws-lambda'
|
|
6
7
|
import * as eventSources from 'aws-cdk-lib/aws-lambda-event-sources'
|
|
7
|
-
import * as
|
|
8
|
-
import { CommonStack } from '
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import { SsmManager } from './ssm-manager'
|
|
8
|
+
import * as utils from '../../../utils'
|
|
9
|
+
import { CommonConstruct, CommonStack } from '../../../common'
|
|
10
|
+
import { LambdaAliasProps, LambdaEdgeProps, LambdaProps } from './types'
|
|
11
|
+
import { CloudFrontManager } from '../cloudfront'
|
|
12
|
+
import { SsmManager } from '../systems-manager'
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @stability stable
|
|
16
16
|
* @category cdk-utils.lambda-manager
|
|
17
17
|
* @subcategory Construct
|
|
18
18
|
* @classdesc Provides operations on AWS Lambda.
|
|
19
|
-
* - A new instance of this class is injected into {@link
|
|
20
|
-
* - If a custom construct extends {@link
|
|
19
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
20
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
21
21
|
* @example
|
|
22
|
-
* import
|
|
22
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
23
23
|
*
|
|
24
|
-
* class CustomConstruct extends
|
|
24
|
+
* class CustomConstruct extends CommonConstruct {
|
|
25
25
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
26
26
|
* super(parent, id, props)
|
|
27
27
|
* this.props = props
|
|
@@ -35,10 +35,10 @@ export class LambdaManager {
|
|
|
35
35
|
/**
|
|
36
36
|
* @summary Method to create a lambda layer (nodejs)
|
|
37
37
|
* @param {string} id scoped id of the resource
|
|
38
|
-
* @param {
|
|
38
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
39
39
|
* @param {lambda.AssetCode} code
|
|
40
40
|
*/
|
|
41
|
-
public createLambdaLayer(id: string, scope:
|
|
41
|
+
public createLambdaLayer(id: string, scope: CommonConstruct, code: lambda.AssetCode) {
|
|
42
42
|
const lambdaLayer = new lambda.LayerVersion(scope, `${id}`, {
|
|
43
43
|
compatibleRuntimes: [scope.props.nodejsRuntime ?? CommonStack.NODEJS_RUNTIME],
|
|
44
44
|
code: code,
|
|
@@ -54,8 +54,8 @@ export class LambdaManager {
|
|
|
54
54
|
/**
|
|
55
55
|
* @summary Method to create a lambda function (nodejs)
|
|
56
56
|
* @param {string} id scoped id of the resource
|
|
57
|
-
* @param {
|
|
58
|
-
* @param {
|
|
57
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
58
|
+
* @param {LambdaProps} props
|
|
59
59
|
* @param {iam.Role | iam.CfnRole} role
|
|
60
60
|
* @param {lambda.ILayerVersion[]} layers
|
|
61
61
|
* @param {lambda.AssetCode} code
|
|
@@ -69,8 +69,8 @@ export class LambdaManager {
|
|
|
69
69
|
*/
|
|
70
70
|
public createLambdaFunction(
|
|
71
71
|
id: string,
|
|
72
|
-
scope:
|
|
73
|
-
props:
|
|
72
|
+
scope: CommonConstruct,
|
|
73
|
+
props: LambdaProps,
|
|
74
74
|
role: iam.Role | iam.CfnRole,
|
|
75
75
|
layers: lambda.ILayerVersion[],
|
|
76
76
|
code: lambda.AssetCode,
|
|
@@ -172,8 +172,8 @@ export class LambdaManager {
|
|
|
172
172
|
* @summary Method to provision a Lambda@Edge function
|
|
173
173
|
*
|
|
174
174
|
* @param {string} id scoped id of the resource
|
|
175
|
-
* @param {
|
|
176
|
-
* @param {
|
|
175
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
176
|
+
* @param {LambdaEdgeProps} props lambda@edge properties
|
|
177
177
|
* @param {lambda.ILayerVersion[]} layers
|
|
178
178
|
* @param {lambda.AssetCode} code
|
|
179
179
|
* @param {iam.Role} role
|
|
@@ -185,8 +185,8 @@ export class LambdaManager {
|
|
|
185
185
|
*/
|
|
186
186
|
public createEdgeFunction(
|
|
187
187
|
id: string,
|
|
188
|
-
scope:
|
|
189
|
-
props:
|
|
188
|
+
scope: CommonConstruct,
|
|
189
|
+
props: LambdaEdgeProps,
|
|
190
190
|
layers: lambda.ILayerVersion[],
|
|
191
191
|
code: lambda.AssetCode,
|
|
192
192
|
role: iam.Role,
|
|
@@ -214,8 +214,8 @@ export class LambdaManager {
|
|
|
214
214
|
/**
|
|
215
215
|
* @summary Method to create a lambda function (nodejs) with docker image
|
|
216
216
|
* @param {string} id scoped id of the resource
|
|
217
|
-
* @param {
|
|
218
|
-
* @param {
|
|
217
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
218
|
+
* @param {LambdaProps} props
|
|
219
219
|
* @param {iam.Role | iam.CfnRole} role
|
|
220
220
|
* @param {lambda.DockerImageCode} code
|
|
221
221
|
* @param {Map<string, string>?} environment
|
|
@@ -227,8 +227,8 @@ export class LambdaManager {
|
|
|
227
227
|
*/
|
|
228
228
|
public createLambdaDockerFunction(
|
|
229
229
|
id: string,
|
|
230
|
-
scope:
|
|
231
|
-
props:
|
|
230
|
+
scope: CommonConstruct,
|
|
231
|
+
props: LambdaProps,
|
|
232
232
|
role: iam.Role | iam.CfnRole,
|
|
233
233
|
code: lambda.DockerImageCode,
|
|
234
234
|
environment?: any,
|
|
@@ -302,15 +302,15 @@ export class LambdaManager {
|
|
|
302
302
|
/**
|
|
303
303
|
* @summary Method to create a lambda function Alias
|
|
304
304
|
* @param {string} id scoped id of the resource
|
|
305
|
-
* @param {
|
|
306
|
-
* @param {
|
|
307
|
-
* @param {
|
|
305
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
306
|
+
* @param {LambdaAliasProps} props
|
|
307
|
+
* @param {IVersion} lambdaVersion
|
|
308
308
|
*/
|
|
309
309
|
public createLambdaFunctionAlias(
|
|
310
310
|
id: string,
|
|
311
|
-
scope:
|
|
312
|
-
props:
|
|
313
|
-
lambdaVersion:
|
|
311
|
+
scope: CommonConstruct,
|
|
312
|
+
props: LambdaAliasProps,
|
|
313
|
+
lambdaVersion: IVersion
|
|
314
314
|
) {
|
|
315
315
|
if (!props) throw `Lambda Alias props undefined for ${id}`
|
|
316
316
|
|