@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
|
@@ -7,11 +7,26 @@ import * as logs from 'aws-cdk-lib/aws-logs'
|
|
|
7
7
|
import * as sqs from 'aws-cdk-lib/aws-sqs'
|
|
8
8
|
import * as sfn from 'aws-cdk-lib/aws-stepfunctions'
|
|
9
9
|
import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks'
|
|
10
|
-
import * as
|
|
11
|
-
import * as types from '../../types'
|
|
12
|
-
import * as utils from '../../utils'
|
|
13
|
-
import { SfnMapProps } from '../../types'
|
|
10
|
+
import * as utils from '../../../utils'
|
|
14
11
|
import { v4 as uuidv4 } from 'uuid'
|
|
12
|
+
import { CommonConstruct } from '../../../common'
|
|
13
|
+
import {
|
|
14
|
+
SfnCallApiGatewayRestApiEndpointProps,
|
|
15
|
+
SfnChoiceProps,
|
|
16
|
+
SfnDynamoDeleteItemProps,
|
|
17
|
+
SfnDynamoGetItemProps,
|
|
18
|
+
SfnDynamoPutItemProps,
|
|
19
|
+
SfnFailProps,
|
|
20
|
+
SfnLambdaInvokeProps,
|
|
21
|
+
SfnMapProps,
|
|
22
|
+
SfnParallelProps,
|
|
23
|
+
SfnPassProps,
|
|
24
|
+
SfnSqsSendMessageProps,
|
|
25
|
+
SfnStartExecutionProps,
|
|
26
|
+
SfnStateMachineProps,
|
|
27
|
+
SfnSucceedProps,
|
|
28
|
+
SfnWaitProps,
|
|
29
|
+
} from './types'
|
|
15
30
|
|
|
16
31
|
const DEFAULT_RETRY_CONFIG = [
|
|
17
32
|
{
|
|
@@ -27,12 +42,12 @@ const DEFAULT_RETRY_CONFIG = [
|
|
|
27
42
|
* @category cdk-utils.step-functions-manager
|
|
28
43
|
* @subcategory Construct
|
|
29
44
|
* @classdesc Provides operations on AWS Step Functions Service.
|
|
30
|
-
* - A new instance of this class is injected into {@link
|
|
31
|
-
* - If a custom construct extends {@link
|
|
45
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
46
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
32
47
|
* @example
|
|
33
|
-
* import
|
|
48
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
34
49
|
*
|
|
35
|
-
* class CustomConstruct extends
|
|
50
|
+
* class CustomConstruct extends CommonConstruct {
|
|
36
51
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
37
52
|
* super(parent, id, props)
|
|
38
53
|
* this.props = props
|
|
@@ -46,10 +61,10 @@ export class SfnManager {
|
|
|
46
61
|
/**
|
|
47
62
|
* @summary Method to create a success step
|
|
48
63
|
* @param {string} id scoped id of the resource
|
|
49
|
-
* @param {
|
|
50
|
-
* @param {
|
|
64
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
65
|
+
* @param {SfnSucceedProps} props
|
|
51
66
|
*/
|
|
52
|
-
public createSuccessStep(id: string, scope:
|
|
67
|
+
public createSuccessStep(id: string, scope: CommonConstruct, props: SfnSucceedProps) {
|
|
53
68
|
if (!props) throw `Step props undefined for ${id}`
|
|
54
69
|
return new sfn.Succeed(scope, `${props.name}`, {
|
|
55
70
|
...props,
|
|
@@ -62,10 +77,10 @@ export class SfnManager {
|
|
|
62
77
|
/**
|
|
63
78
|
* @summary Method to create a failure step
|
|
64
79
|
* @param {string} id scoped id of the resource
|
|
65
|
-
* @param {
|
|
66
|
-
* @param {
|
|
80
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
81
|
+
* @param {SfnFailProps} props
|
|
67
82
|
*/
|
|
68
|
-
public createFailStep(id: string, scope:
|
|
83
|
+
public createFailStep(id: string, scope: CommonConstruct, props: SfnFailProps) {
|
|
69
84
|
if (!props) throw `Step props undefined for ${id}`
|
|
70
85
|
return new sfn.Fail(scope, `${props.name}`, {
|
|
71
86
|
...props,
|
|
@@ -78,10 +93,10 @@ export class SfnManager {
|
|
|
78
93
|
/**
|
|
79
94
|
* @summary Method to create a pass step
|
|
80
95
|
* @param {string} id scoped id of the resource
|
|
81
|
-
* @param {
|
|
82
|
-
* @param {
|
|
96
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
97
|
+
* @param {SfnPassProps} props
|
|
83
98
|
*/
|
|
84
|
-
public createPassStep(id: string, scope:
|
|
99
|
+
public createPassStep(id: string, scope: CommonConstruct, props: SfnPassProps) {
|
|
85
100
|
if (!props) throw `Step props undefined for ${id}`
|
|
86
101
|
return new sfn.Pass(scope, `${props.name}`, {
|
|
87
102
|
...props,
|
|
@@ -94,10 +109,10 @@ export class SfnManager {
|
|
|
94
109
|
/**
|
|
95
110
|
* @summary Method to create a parallel step
|
|
96
111
|
* @param {string} id scoped id of the resource
|
|
97
|
-
* @param {
|
|
98
|
-
* @param {
|
|
112
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
113
|
+
* @param {SfnParallelProps} props
|
|
99
114
|
*/
|
|
100
|
-
public createParallelStep(id: string, scope:
|
|
115
|
+
public createParallelStep(id: string, scope: CommonConstruct, props: SfnParallelProps) {
|
|
101
116
|
if (!props) throw `Step props undefined for ${id}`
|
|
102
117
|
const step = new sfn.Parallel(scope, `${props.name}`, {
|
|
103
118
|
...props,
|
|
@@ -124,10 +139,10 @@ export class SfnManager {
|
|
|
124
139
|
/**
|
|
125
140
|
* @summary Method to create a choice step
|
|
126
141
|
* @param {string} id scoped id of the resource
|
|
127
|
-
* @param {
|
|
128
|
-
* @param {
|
|
142
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
143
|
+
* @param {SfnChoiceProps} props
|
|
129
144
|
*/
|
|
130
|
-
public createChoiceStep(id: string, scope:
|
|
145
|
+
public createChoiceStep(id: string, scope: CommonConstruct, props: SfnChoiceProps) {
|
|
131
146
|
if (!props) throw `Step props undefined for ${id}`
|
|
132
147
|
return new sfn.Choice(scope, `${props.name}`, {
|
|
133
148
|
...props,
|
|
@@ -140,10 +155,10 @@ export class SfnManager {
|
|
|
140
155
|
/**
|
|
141
156
|
* @summary Method to create a wait step
|
|
142
157
|
* @param {string} id scoped id of the resource
|
|
143
|
-
* @param {
|
|
144
|
-
* @param {
|
|
158
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
159
|
+
* @param {SfnWaitProps} props
|
|
145
160
|
*/
|
|
146
|
-
public createWaitStep(id: string, scope:
|
|
161
|
+
public createWaitStep(id: string, scope: CommonConstruct, props: SfnWaitProps) {
|
|
147
162
|
return new sfn.Wait(scope, `${props.name}`, {
|
|
148
163
|
...props,
|
|
149
164
|
...{
|
|
@@ -156,15 +171,15 @@ export class SfnManager {
|
|
|
156
171
|
/**
|
|
157
172
|
* @summary Method to create a DynamoDB get item step
|
|
158
173
|
* @param {string} id scoped id of the resource
|
|
159
|
-
* @param {
|
|
160
|
-
* @param {
|
|
174
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
175
|
+
* @param {SfnDynamoGetItemProps} props
|
|
161
176
|
* @param {dynamodb.ITable} table The table to get the item from
|
|
162
177
|
* @param tableKey The table key for query/scan
|
|
163
178
|
*/
|
|
164
179
|
public createDynamoDbGetItemStep(
|
|
165
180
|
id: string,
|
|
166
|
-
scope:
|
|
167
|
-
props:
|
|
181
|
+
scope: CommonConstruct,
|
|
182
|
+
props: SfnDynamoGetItemProps,
|
|
168
183
|
table: dynamodb.ITable,
|
|
169
184
|
tableKey: { [key: string]: tasks.DynamoAttributeValue }
|
|
170
185
|
) {
|
|
@@ -207,15 +222,15 @@ export class SfnManager {
|
|
|
207
222
|
/**
|
|
208
223
|
* @summary Method to create a DynamoDB put item step
|
|
209
224
|
* @param {string} id scoped id of the resource
|
|
210
|
-
* @param {
|
|
211
|
-
* @param {
|
|
225
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
226
|
+
* @param {SfnDynamoPutItemProps} props
|
|
212
227
|
* @param {dynamodb.ITable} table The table to put the item in
|
|
213
228
|
* @param tableItem The item to add to the table
|
|
214
229
|
*/
|
|
215
230
|
public createDynamoDbPutItemStep(
|
|
216
231
|
id: string,
|
|
217
|
-
scope:
|
|
218
|
-
props:
|
|
232
|
+
scope: CommonConstruct,
|
|
233
|
+
props: SfnDynamoPutItemProps,
|
|
219
234
|
table: dynamodb.ITable,
|
|
220
235
|
tableItem: { [key: string]: tasks.DynamoAttributeValue }
|
|
221
236
|
) {
|
|
@@ -260,15 +275,15 @@ export class SfnManager {
|
|
|
260
275
|
/**
|
|
261
276
|
* @summary Method to create a DynamoDB delete item step
|
|
262
277
|
* @param {string} id scoped id of the resource
|
|
263
|
-
* @param {
|
|
264
|
-
* @param {
|
|
278
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
279
|
+
* @param {SfnDynamoDeleteItemProps} props
|
|
265
280
|
* @param {dynamodb.ITable} table The table to put the item in
|
|
266
281
|
* @param tableKey The table key for query/scan
|
|
267
282
|
*/
|
|
268
283
|
public createDynamoDbDeleteItemStep(
|
|
269
284
|
id: string,
|
|
270
|
-
scope:
|
|
271
|
-
props:
|
|
285
|
+
scope: CommonConstruct,
|
|
286
|
+
props: SfnDynamoDeleteItemProps,
|
|
272
287
|
table: dynamodb.ITable,
|
|
273
288
|
tableKey: { [key: string]: tasks.DynamoAttributeValue }
|
|
274
289
|
) {
|
|
@@ -313,14 +328,14 @@ export class SfnManager {
|
|
|
313
328
|
/**
|
|
314
329
|
* @summary Method to send a message to SQS step
|
|
315
330
|
* @param {string} id scoped id of the resource
|
|
316
|
-
* @param {
|
|
317
|
-
* @param {
|
|
331
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
332
|
+
* @param {SfnSqsSendMessageProps} props
|
|
318
333
|
* @param {sqs.IQueue} queue The queue to send the message to
|
|
319
334
|
*/
|
|
320
335
|
public createSendSqsMessageStep(
|
|
321
336
|
id: string,
|
|
322
|
-
scope:
|
|
323
|
-
props:
|
|
337
|
+
scope: CommonConstruct,
|
|
338
|
+
props: SfnSqsSendMessageProps,
|
|
324
339
|
queue: sqs.IQueue
|
|
325
340
|
) {
|
|
326
341
|
if (!props) throw `Step props undefined for ${id}`
|
|
@@ -362,14 +377,14 @@ export class SfnManager {
|
|
|
362
377
|
/**
|
|
363
378
|
* @summary Method to create a lambda invoke step
|
|
364
379
|
* @param {string} id scoped id of the resource
|
|
365
|
-
* @param {
|
|
366
|
-
* @param {
|
|
380
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
381
|
+
* @param {SfnLambdaInvokeProps} props
|
|
367
382
|
* @param {lambda.IFunction} lambdaFunction
|
|
368
383
|
*/
|
|
369
384
|
public createLambdaStep(
|
|
370
385
|
id: string,
|
|
371
|
-
scope:
|
|
372
|
-
props:
|
|
386
|
+
scope: CommonConstruct,
|
|
387
|
+
props: SfnLambdaInvokeProps,
|
|
373
388
|
lambdaFunction: lambda.IFunction
|
|
374
389
|
) {
|
|
375
390
|
if (!props) throw `Step props undefined for ${id}`
|
|
@@ -399,14 +414,14 @@ export class SfnManager {
|
|
|
399
414
|
/**
|
|
400
415
|
* @summary Method to create a API Gateway invoke step
|
|
401
416
|
* @param {string} id scoped id of the resource
|
|
402
|
-
* @param {
|
|
403
|
-
* @param {
|
|
417
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
418
|
+
* @param {SfnLambdaInvokeProps} props
|
|
404
419
|
* @param {apig.IRestApi} api
|
|
405
420
|
*/
|
|
406
421
|
public createApiStep(
|
|
407
422
|
id: string,
|
|
408
|
-
scope:
|
|
409
|
-
props:
|
|
423
|
+
scope: CommonConstruct,
|
|
424
|
+
props: SfnCallApiGatewayRestApiEndpointProps,
|
|
410
425
|
api: apig.IRestApi
|
|
411
426
|
) {
|
|
412
427
|
if (!props) throw `Step props undefined for ${id}`
|
|
@@ -437,14 +452,14 @@ export class SfnManager {
|
|
|
437
452
|
/**
|
|
438
453
|
* @summary Method to create a step function execution step
|
|
439
454
|
* @param {string} id scoped id of the resource
|
|
440
|
-
* @param {
|
|
441
|
-
* @param {
|
|
455
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
456
|
+
* @param {SfnStartExecutionProps} props props for the step
|
|
442
457
|
* @param {sfn.IStateMachine} stateMachine the state machine to execute
|
|
443
458
|
*/
|
|
444
459
|
public createSfnExecutionStep(
|
|
445
460
|
id: string,
|
|
446
|
-
scope:
|
|
447
|
-
props:
|
|
461
|
+
scope: CommonConstruct,
|
|
462
|
+
props: SfnStartExecutionProps,
|
|
448
463
|
stateMachine: sfn.IStateMachine
|
|
449
464
|
) {
|
|
450
465
|
const step = new tasks.StepFunctionsStartExecution(scope, `${id}`, {
|
|
@@ -473,26 +488,26 @@ export class SfnManager {
|
|
|
473
488
|
/**
|
|
474
489
|
* @summary Method to create a step function map state
|
|
475
490
|
* @param {string} id scoped id of the resource
|
|
476
|
-
* @param {
|
|
477
|
-
* @param {
|
|
491
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
492
|
+
* @param {SfnMapProps} props props for the map state
|
|
478
493
|
*/
|
|
479
|
-
public createMapState(id: string, scope:
|
|
494
|
+
public createMapState(id: string, scope: CommonConstruct, props: SfnMapProps) {
|
|
480
495
|
return new sfn.Map(scope, `${id}`, props)
|
|
481
496
|
}
|
|
482
497
|
|
|
483
498
|
/**
|
|
484
499
|
* @summary Method to create a state machine
|
|
485
500
|
* @param {string} id scoped id of the resource
|
|
486
|
-
* @param {
|
|
487
|
-
* @param {
|
|
501
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
502
|
+
* @param {SfnStateMachineProps} props
|
|
488
503
|
* @param {sfn.IChainable} definition
|
|
489
504
|
* @param {logs.ILogGroup} logGroup
|
|
490
505
|
* @param {iam.IRole} role
|
|
491
506
|
*/
|
|
492
507
|
public createStateMachine(
|
|
493
508
|
id: string,
|
|
494
|
-
scope:
|
|
495
|
-
props:
|
|
509
|
+
scope: CommonConstruct,
|
|
510
|
+
props: SfnStateMachineProps,
|
|
496
511
|
definition: sfn.IChainable,
|
|
497
512
|
logGroup: logs.ILogGroup,
|
|
498
513
|
role?: iam.IRole
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChoiceProps,
|
|
3
|
+
FailProps,
|
|
4
|
+
MapProps,
|
|
5
|
+
ParallelProps,
|
|
6
|
+
PassProps,
|
|
7
|
+
RetryProps,
|
|
8
|
+
StateMachineProps,
|
|
9
|
+
SucceedProps,
|
|
10
|
+
WaitProps,
|
|
11
|
+
} from 'aws-cdk-lib/aws-stepfunctions'
|
|
12
|
+
import {
|
|
13
|
+
CallApiGatewayRestApiEndpointProps,
|
|
14
|
+
DynamoDeleteItemProps,
|
|
15
|
+
DynamoGetItemProps,
|
|
16
|
+
DynamoPutItemProps,
|
|
17
|
+
LambdaInvokeProps,
|
|
18
|
+
SqsSendMessageProps,
|
|
19
|
+
StepFunctionsStartExecutionProps,
|
|
20
|
+
} from 'aws-cdk-lib/aws-stepfunctions-tasks'
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @category cdk-utils.step-functions-manager
|
|
24
|
+
* @subcategory Properties
|
|
25
|
+
*/
|
|
26
|
+
export interface SfnSucceedProps extends SucceedProps {
|
|
27
|
+
name: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @category cdk-utils.step-functions-manager
|
|
32
|
+
* @subcategory Properties
|
|
33
|
+
*/
|
|
34
|
+
export interface SfnRetryProps extends RetryProps {
|
|
35
|
+
intervalInSecs: number
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @category cdk-utils.step-functions-manager
|
|
40
|
+
* @subcategory Properties
|
|
41
|
+
*/
|
|
42
|
+
export interface SfnFailProps extends FailProps {
|
|
43
|
+
name: string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @category cdk-utils.step-functions-manager
|
|
48
|
+
* @subcategory Properties
|
|
49
|
+
*/
|
|
50
|
+
export interface SfnPassProps extends PassProps {
|
|
51
|
+
name: string
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @category cdk-utils.step-functions-manager
|
|
56
|
+
* @subcategory Properties
|
|
57
|
+
*/
|
|
58
|
+
export interface SfnDynamoGetItemProps extends DynamoGetItemProps {
|
|
59
|
+
name: string
|
|
60
|
+
retries?: SfnRetryProps[]
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @category cdk-utils.step-functions-manager
|
|
65
|
+
* @subcategory Properties
|
|
66
|
+
*/
|
|
67
|
+
export interface SfnDynamoPutItemProps extends DynamoPutItemProps {
|
|
68
|
+
name: string
|
|
69
|
+
retries?: SfnRetryProps[]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @category cdk-utils.step-functions-manager
|
|
74
|
+
* @subcategory Properties
|
|
75
|
+
*/
|
|
76
|
+
export interface SfnDynamoDeleteItemProps extends DynamoDeleteItemProps {
|
|
77
|
+
name: string
|
|
78
|
+
retries?: SfnRetryProps[]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @category cdk-utils.step-functions-manager
|
|
83
|
+
* @subcategory Properties
|
|
84
|
+
*/
|
|
85
|
+
export interface SfnSqsSendMessageProps extends SqsSendMessageProps {
|
|
86
|
+
name: string
|
|
87
|
+
retries?: SfnRetryProps[]
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @category cdk-utils.step-functions-manager
|
|
92
|
+
* @subcategory Properties
|
|
93
|
+
*/
|
|
94
|
+
export interface SfnParallelProps extends ParallelProps {
|
|
95
|
+
name: string
|
|
96
|
+
retries?: SfnRetryProps[]
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @category cdk-utils.step-functions-manager
|
|
101
|
+
* @subcategory Properties
|
|
102
|
+
*/
|
|
103
|
+
export interface SfnChoiceProps extends ChoiceProps {
|
|
104
|
+
name: string
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @category cdk-utils.step-functions-manager
|
|
109
|
+
* @subcategory Properties
|
|
110
|
+
*/
|
|
111
|
+
export interface SfnWaitProps extends WaitProps {
|
|
112
|
+
name: string
|
|
113
|
+
delayInSeconds: number
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @category cdk-utils.step-functions-manager
|
|
118
|
+
* @subcategory Properties
|
|
119
|
+
*/
|
|
120
|
+
export interface SfnLambdaInvokeProps extends LambdaInvokeProps {
|
|
121
|
+
name: string
|
|
122
|
+
retries?: SfnRetryProps[]
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @category cdk-utils.step-functions-manager
|
|
127
|
+
* @subcategory Properties
|
|
128
|
+
*/
|
|
129
|
+
export interface SfnCallApiGatewayRestApiEndpointProps extends CallApiGatewayRestApiEndpointProps {
|
|
130
|
+
name: string
|
|
131
|
+
retries?: SfnRetryProps[]
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @category cdk-utils.step-functions-manager
|
|
136
|
+
* @subcategory Properties
|
|
137
|
+
*/
|
|
138
|
+
export interface SfnStateMachineProps extends StateMachineProps {}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @category cdk-utils.sfn-manager
|
|
142
|
+
* @subcategory Properties
|
|
143
|
+
*/
|
|
144
|
+
export interface SfnMapProps extends MapProps {}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @category cdk-utils.sfn-manager
|
|
148
|
+
* @subcategory Properties
|
|
149
|
+
*/
|
|
150
|
+
export interface SfnStartExecutionProps extends StepFunctionsStartExecutionProps {
|
|
151
|
+
retries?: SfnRetryProps[]
|
|
152
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as ssm from 'aws-cdk-lib/aws-ssm'
|
|
2
2
|
import * as cr from 'aws-cdk-lib/custom-resources'
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import * as utils from '../../../utils'
|
|
4
|
+
import { CommonConstruct } from '../../../common'
|
|
5
|
+
import { SSMParameterReaderProps } from './types'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @stability stable
|
|
9
9
|
* @category cdk-utils.ssm-manager
|
|
10
10
|
* @subcategory Construct
|
|
11
11
|
* @classdesc Provides operations on AWS Systems Manager.
|
|
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
|
|
@@ -26,13 +26,14 @@ import * as utils from '../../utils'
|
|
|
26
26
|
*/
|
|
27
27
|
export class SsmManager {
|
|
28
28
|
public static SECRETS_MODIFIED_TIMESTAMP_PARAM = 'secrets-last-modified-timestamp'
|
|
29
|
+
|
|
29
30
|
/**
|
|
30
31
|
* Method to write a string parameter to the parameters store
|
|
31
32
|
* @param {string} id scoped id of the resource
|
|
32
|
-
* @param {
|
|
33
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
33
34
|
* @param {ssm.StringParameterProps} props parameter props
|
|
34
35
|
*/
|
|
35
|
-
public writeStringToParameters(id: string, scope:
|
|
36
|
+
public writeStringToParameters(id: string, scope: CommonConstruct, props: ssm.StringParameterProps) {
|
|
36
37
|
if (!props) throw `Parameter props undefined for ${id}`
|
|
37
38
|
|
|
38
39
|
const parameter = new ssm.StringParameter(scope, `${id}`, {
|
|
@@ -50,10 +51,10 @@ export class SsmManager {
|
|
|
50
51
|
/**
|
|
51
52
|
* Method to read a string parameter from the parameters store
|
|
52
53
|
* @param {string} id scoped id of the resource
|
|
53
|
-
* @param {
|
|
54
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
54
55
|
* @param {string} parameterName parameter name to lookup
|
|
55
56
|
*/
|
|
56
|
-
public readStringParameter(id: string, scope:
|
|
57
|
+
public readStringParameter(id: string, scope: CommonConstruct, parameterName: string) {
|
|
57
58
|
if (!parameterName || parameterName == '') throw 'Invalid parameter name'
|
|
58
59
|
|
|
59
60
|
return ssm.StringParameter.valueFromLookup(scope, parameterName)
|
|
@@ -62,16 +63,11 @@ export class SsmManager {
|
|
|
62
63
|
/**
|
|
63
64
|
* Method to read a string parameter from the parameters store in a given region
|
|
64
65
|
* @param {string} id scoped id of the resource
|
|
65
|
-
* @param {
|
|
66
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
66
67
|
* @param {string} parameterName parameter name to lookup
|
|
67
68
|
* @param {string} region region name to lookup parameter
|
|
68
69
|
*/
|
|
69
|
-
public readStringParameterFromRegion(
|
|
70
|
-
id: string,
|
|
71
|
-
scope: common.CommonConstruct,
|
|
72
|
-
parameterName: string,
|
|
73
|
-
region: string
|
|
74
|
-
) {
|
|
70
|
+
public readStringParameterFromRegion(id: string, scope: CommonConstruct, parameterName: string, region: string) {
|
|
75
71
|
if (!parameterName || parameterName == '') throw `Invalid parameter name for ${id}`
|
|
76
72
|
if (!region || region == '') throw `Invalid region for ${id}`
|
|
77
73
|
|
|
@@ -88,7 +84,7 @@ export class SsmManager {
|
|
|
88
84
|
* @classdesc Provides utilities to read same/cross region SSM parameters
|
|
89
85
|
*/
|
|
90
86
|
export class SSMParameterReader extends cr.AwsCustomResource {
|
|
91
|
-
constructor(scope:
|
|
87
|
+
constructor(scope: CommonConstruct, name: string, props: SSMParameterReaderProps) {
|
|
92
88
|
const { parameterName, region } = props
|
|
93
89
|
|
|
94
90
|
const ssmAwsSdkCall: cr.AwsSdkCall = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './main'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as cdk from 'aws-cdk-lib'
|
|
2
2
|
import * as ec2 from 'aws-cdk-lib/aws-ec2'
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as utils from '../../../utils'
|
|
4
|
+
import { CommonConstruct } from '../../../common'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @stability stable
|
|
@@ -14,12 +14,12 @@ const CommonVpcIdentifier = 'CommonVpc'
|
|
|
14
14
|
* @category cdk-utils.vpc-manager
|
|
15
15
|
* @subcategory Construct
|
|
16
16
|
* @classdesc Provides operations on AWS VPC.
|
|
17
|
-
* - A new instance of this class is injected into {@link
|
|
18
|
-
* - 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.
|
|
19
19
|
* @example
|
|
20
|
-
* import
|
|
20
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
21
21
|
*
|
|
22
|
-
* class CustomConstruct extends
|
|
22
|
+
* class CustomConstruct extends CommonConstruct {
|
|
23
23
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
24
24
|
* super(parent, id, props)
|
|
25
25
|
* this.props = props
|
|
@@ -33,10 +33,10 @@ export class VpcManager {
|
|
|
33
33
|
/**
|
|
34
34
|
* @summary Method to create a new vpc
|
|
35
35
|
* @param {string} id scoped id of the resource
|
|
36
|
-
* @param {
|
|
36
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
37
37
|
* @param {ec2.VpcProps} props
|
|
38
38
|
*/
|
|
39
|
-
public createVpc(id: string, scope:
|
|
39
|
+
public createVpc(id: string, scope: CommonConstruct, props: ec2.VpcProps) {
|
|
40
40
|
if (!props) throw `Vpc props undefined for ${id}`
|
|
41
41
|
const vpc = new ec2.Vpc(scope, `${id}`, {
|
|
42
42
|
maxAzs: props.maxAzs,
|
|
@@ -64,11 +64,11 @@ export class VpcManager {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* @summary Method to create a common vpc
|
|
67
|
-
* @param {
|
|
67
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
68
68
|
* @param {ec2.VpcProps} props
|
|
69
69
|
* @param {string?} vpcIdentifier optional identifier for VPC
|
|
70
70
|
*/
|
|
71
|
-
public createCommonVpc(scope:
|
|
71
|
+
public createCommonVpc(scope: CommonConstruct, props: ec2.VpcProps, vpcIdentifier?: string) {
|
|
72
72
|
const vpc = this.createVpc(CommonVpcIdentifier, scope, props)
|
|
73
73
|
cdk.Tags.of(vpc).add('Name', vpcIdentifier ?? CommonVpcIdentifier)
|
|
74
74
|
|
|
@@ -78,10 +78,10 @@ export class VpcManager {
|
|
|
78
78
|
/**
|
|
79
79
|
* @summary Method to retrieve a common vpc
|
|
80
80
|
* @param {string} id scoped id of the resource
|
|
81
|
-
* @param {
|
|
81
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
82
82
|
* @param {string?} vpcIdentifier optional identifier for VPC
|
|
83
83
|
*/
|
|
84
|
-
public retrieveCommonVpc(id: string, scope:
|
|
84
|
+
public retrieveCommonVpc(id: string, scope: CommonConstruct, vpcIdentifier?: string) {
|
|
85
85
|
return ec2.Vpc.fromLookup(scope, `${id}`, { vpcName: vpcIdentifier ?? CommonVpcIdentifier })
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './main'
|
package/src/lib/{manager/aws/waf-manager.ts → services/aws/web-application-firewall/main.ts}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as wafv2 from 'aws-cdk-lib/aws-wafv2'
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import * as utils from '../../../utils'
|
|
3
|
+
import { CommonConstruct } from '../../../common'
|
|
4
|
+
import { WafIPSetProps, WafWebACLProps } from './types'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @stability stable
|
|
8
8
|
* @category cdk-utils.waf-manager
|
|
9
9
|
* @subcategory Construct
|
|
10
10
|
* @classdesc Provides operations on AWS WAF.
|
|
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
|
-
* import
|
|
14
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
15
15
|
*
|
|
16
|
-
* class CustomConstruct extends
|
|
16
|
+
* class CustomConstruct extends CommonConstruct {
|
|
17
17
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
18
18
|
* super(parent, id, props)
|
|
19
19
|
* this.props = props
|
|
@@ -27,10 +27,10 @@ export class WafManager {
|
|
|
27
27
|
/**
|
|
28
28
|
* @summary Method to create an ip set
|
|
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 {WafIPSetProps} props
|
|
32
32
|
*/
|
|
33
|
-
public createIpSet(id: string, scope:
|
|
33
|
+
public createIpSet(id: string, scope: CommonConstruct, props: WafIPSetProps) {
|
|
34
34
|
if (!props) throw `WAF Ip Set props undefined for ${id}`
|
|
35
35
|
|
|
36
36
|
const ipSet = new wafv2.CfnIPSet(scope, `${id}`, {
|
|
@@ -50,10 +50,10 @@ export class WafManager {
|
|
|
50
50
|
/**
|
|
51
51
|
* @summary Method to create a web acl
|
|
52
52
|
* @param {string} id scoped id of the resource
|
|
53
|
-
* @param {
|
|
54
|
-
* @param {
|
|
53
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
54
|
+
* @param {WafWebACLProps} props
|
|
55
55
|
*/
|
|
56
|
-
public createWebAcl(id: string, scope:
|
|
56
|
+
public createWebAcl(id: string, scope: CommonConstruct, props: WafWebACLProps) {
|
|
57
57
|
if (!props) throw `WAF WebACL props undefined for ${id}`
|
|
58
58
|
|
|
59
59
|
const webAcl = new wafv2.CfnWebACL(scope, `${id}`, {
|