@gradientedge/cdk-utils 8.118.0 → 8.120.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/app/api-destined-function/package.json +1 -1
- package/dist/src/lib/common/construct.d.ts +32 -32
- package/dist/src/lib/common/construct.js +36 -59
- package/dist/src/lib/common/stack.d.ts +8 -7
- package/dist/src/lib/common/stack.js +17 -37
- package/dist/src/lib/common/types.d.ts +2 -2
- package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +22 -22
- package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +9 -9
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +3 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +37 -60
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +9 -9
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -3
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +40 -63
- package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +23 -23
- package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +2 -2
- package/dist/src/lib/construct/api-to-lambda-target/main.js +15 -38
- package/dist/src/lib/construct/application-configuration/main.d.ts +7 -7
- package/dist/src/lib/construct/application-configuration/main.js +17 -41
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +17 -17
- package/dist/src/lib/construct/graphql-api-lambda/main.js +6 -29
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +5 -5
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +7 -7
- package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +16 -16
- package/dist/src/lib/construct/lambda-with-iam-access/main.js +8 -31
- package/dist/src/lib/construct/lambda-with-iam-access/types.d.ts +4 -4
- package/dist/src/lib/construct/rest-api-lambda/main.d.ts +16 -16
- package/dist/src/lib/construct/rest-api-lambda/main.js +5 -28
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +5 -5
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +9 -32
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +38 -39
- package/dist/src/lib/construct/site-with-ecs-backend/main.js +33 -54
- package/dist/src/lib/construct/static-asset-deployment/main.d.ts +4 -4
- package/dist/src/lib/construct/static-asset-deployment/main.js +3 -26
- package/dist/src/lib/construct/static-site/main.d.ts +15 -15
- package/dist/src/lib/construct/static-site/main.js +4 -27
- package/dist/src/lib/services/{aws/api-gateway → api-gateway}/main.d.ts +10 -10
- package/dist/src/lib/services/{aws/api-gateway → api-gateway}/main.js +21 -44
- package/dist/src/lib/services/api-gateway/types.d.ts +7 -0
- package/dist/src/lib/services/{aws/appconfig → appconfig}/main.d.ts +7 -7
- package/dist/src/lib/services/{aws/appconfig → appconfig}/main.js +14 -37
- package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/main.js +10 -33
- package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/types.d.ts +2 -2
- package/dist/src/lib/services/{aws/cloudfront → cloudfront}/main.d.ts +19 -19
- package/dist/src/lib/services/{aws/cloudfront → cloudfront}/main.js +47 -46
- package/dist/src/lib/services/{aws/cloudfront → cloudfront}/types.d.ts +3 -4
- package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/main.d.ts +6 -6
- package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/main.js +5 -28
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.d.ts +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.js +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/main.d.ts +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/main.js +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/codebuild → codebuild}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/codebuild → codebuild}/main.js +7 -30
- package/dist/src/lib/services/{aws/dynamodb → dynamodb}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/dynamodb → dynamodb}/main.js +8 -31
- package/dist/src/lib/services/{aws/dynamodb → dynamodb}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.d.ts +3 -3
- package/dist/src/lib/services/elastic-container-registry/main.js +37 -0
- package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.d.ts +11 -11
- package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.js +27 -50
- package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.d.ts +4 -4
- package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.js +12 -35
- package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.js +8 -31
- package/dist/src/lib/services/{aws/elasticache → elasticache}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/elasticache → elasticache}/main.js +10 -33
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/main.d.ts +14 -14
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/main.js +26 -49
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/target.d.ts +11 -11
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/target.js +6 -29
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/evidently → evidently}/main.d.ts +8 -8
- package/dist/src/lib/services/{aws/evidently → evidently}/main.js +18 -41
- package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/main.d.ts +49 -50
- package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/main.js +110 -133
- package/dist/src/lib/services/index.d.ts +28 -1
- package/dist/src/lib/services/index.js +28 -1
- package/dist/src/lib/services/{aws/key-management-service → key-management-service}/main.d.ts +3 -3
- package/dist/src/lib/services/{aws/key-management-service → key-management-service}/main.js +5 -28
- package/dist/src/lib/services/{aws/lambda → lambda}/main.d.ts +12 -14
- package/dist/src/lib/services/{aws/lambda → lambda}/main.js +32 -59
- package/dist/src/lib/services/{aws/lambda → lambda}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/route53 → route53}/main.d.ts +10 -10
- package/dist/src/lib/services/{aws/route53 → route53}/main.js +21 -44
- package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/main.d.ts +6 -7
- package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/main.js +10 -33
- package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.js +11 -34
- package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.d.ts +7 -8
- package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.js +15 -38
- package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.d.ts +10 -11
- package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.js +31 -54
- package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/step-function → step-function}/main.d.ts +32 -33
- package/dist/src/lib/services/{aws/step-function → step-function}/main.js +33 -57
- package/dist/src/lib/services/{aws/systems-manager → systems-manager}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/systems-manager → systems-manager}/main.js +10 -33
- package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/main.d.ts +6 -7
- package/dist/src/lib/services/virtual-private-cloud/main.js +70 -0
- package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.js +8 -31
- package/dist/src/lib/utils/aws/index.d.ts +6 -3
- package/dist/src/lib/utils/aws/index.js +9 -26
- package/package.json +15 -15
- package/src/lib/common/construct.ts +97 -67
- package/src/lib/common/stack.ts +12 -12
- package/src/lib/common/types.ts +2 -2
- package/src/lib/construct/api-to-eventbridge-target/api.ts +31 -22
- package/src/lib/construct/api-to-eventbridge-target/event.ts +9 -9
- package/src/lib/construct/api-to-eventbridge-target/main.ts +56 -41
- package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +9 -9
- package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +62 -47
- package/src/lib/construct/api-to-lambda-target/api.ts +33 -23
- package/src/lib/construct/api-to-lambda-target/main.ts +24 -18
- package/src/lib/construct/application-configuration/main.ts +31 -24
- package/src/lib/construct/graphql-api-lambda/main.ts +22 -22
- package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +13 -13
- package/src/lib/construct/lambda-with-iam-access/main.ts +25 -25
- package/src/lib/construct/lambda-with-iam-access/types.ts +4 -4
- package/src/lib/construct/rest-api-lambda/main.ts +21 -21
- package/src/lib/construct/rest-api-lambda-with-cache/main.ts +14 -14
- package/src/lib/construct/site-with-ecs-backend/main.ts +79 -60
- package/src/lib/construct/static-asset-deployment/main.ts +6 -6
- package/src/lib/construct/static-site/main.ts +23 -17
- package/src/lib/services/{aws/api-gateway → api-gateway}/main.ts +42 -36
- package/src/lib/services/api-gateway/types.ts +8 -0
- package/src/lib/services/{aws/appconfig → appconfig}/main.ts +19 -19
- package/src/lib/services/{aws/certificate-manager → certificate-manager}/main.ts +14 -14
- package/src/lib/services/{aws/certificate-manager → certificate-manager}/types.ts +2 -2
- package/src/lib/services/{aws/cloudfront → cloudfront}/main.ts +89 -75
- package/src/lib/services/{aws/cloudfront → cloudfront}/types.ts +7 -4
- package/src/lib/services/{aws/cloudtrail → cloudtrail}/main.ts +12 -12
- package/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.ts +2 -2
- package/src/lib/services/{aws/cloudwatch → cloudwatch}/main.ts +2 -2
- package/src/lib/services/{aws/cloudwatch → cloudwatch}/types.ts +1 -1
- package/src/lib/services/{aws/codebuild → codebuild}/main.ts +8 -8
- package/src/lib/services/{aws/dynamodb → dynamodb}/main.ts +9 -9
- package/src/lib/services/{aws/dynamodb → dynamodb}/types.ts +1 -1
- package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.ts +5 -5
- package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.ts +49 -38
- package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.ts +4 -4
- package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.ts +17 -17
- package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.ts +12 -12
- package/src/lib/services/{aws/elasticache → elasticache}/main.ts +11 -11
- package/src/lib/services/{aws/eventbridge → eventbridge}/main.ts +38 -38
- package/src/lib/services/{aws/eventbridge → eventbridge}/target.ts +15 -15
- package/src/lib/services/{aws/eventbridge → eventbridge}/types.ts +1 -1
- package/src/lib/services/{aws/evidently → evidently}/main.ts +19 -19
- package/src/lib/services/{aws/identity-access-management → identity-access-management}/main.ts +143 -135
- package/src/lib/services/index.ts +28 -1
- package/src/lib/services/{aws/key-management-service → key-management-service}/main.ts +6 -6
- package/src/lib/services/{aws/lambda → lambda}/main.ts +66 -60
- package/src/lib/services/{aws/lambda → lambda}/types.ts +1 -1
- package/src/lib/services/{aws/route53 → route53}/main.ts +32 -32
- package/src/lib/services/{aws/secrets-manager → secrets-manager}/main.ts +12 -16
- package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.ts +14 -14
- package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.ts +19 -19
- package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.ts +1 -1
- package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.ts +40 -40
- package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.ts +1 -1
- package/src/lib/services/{aws/step-function → step-function}/main.ts +78 -66
- package/src/lib/services/{aws/systems-manager → systems-manager}/main.ts +18 -13
- package/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/main.ts +17 -17
- package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.ts +9 -9
- package/src/lib/utils/aws/index.ts +8 -5
- package/dist/src/lib/services/aws/api-gateway/types.d.ts +0 -7
- package/dist/src/lib/services/aws/elastic-container-registry/main.js +0 -60
- package/dist/src/lib/services/aws/index.d.ts +0 -28
- package/dist/src/lib/services/aws/index.js +0 -44
- package/dist/src/lib/services/aws/virtual-private-cloud/main.js +0 -93
- package/src/lib/services/aws/api-gateway/types.ts +0 -8
- package/src/lib/services/aws/index.ts +0 -28
- /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/index.js +0 -0
- /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/types.js +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/constants.d.ts +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/constants.js +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/index.js +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/types.js +0 -0
- /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/index.js +0 -0
- /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/types.js +0 -0
- /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/index.js +0 -0
- /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/types.js +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/index.js +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/types.js +0 -0
- /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/index.js +0 -0
- /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/types.js +0 -0
- /package/dist/src/lib/services/{aws/codebuild → codebuild}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/codebuild → codebuild}/index.js +0 -0
- /package/dist/src/lib/services/{aws/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/src/lib/services/{aws/constants.js → constants.js} +0 -0
- /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/index.js +0 -0
- /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/types.js +0 -0
- /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/index.js +0 -0
- /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/types.js +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/index.js +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/types.js +0 -0
- /package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/index.js +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/lambda → lambda}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/lambda → lambda}/index.js +0 -0
- /package/dist/src/lib/services/{aws/lambda → lambda}/types.js +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/index.js +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/types.js +0 -0
- /package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/index.js +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/types.js +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/index.js +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/types.js +0 -0
- /package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.js +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.js +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.js +0 -0
- /package/src/lib/services/{aws/api-gateway → api-gateway}/index.ts +0 -0
- /package/src/lib/services/{aws/appconfig → appconfig}/constants.ts +0 -0
- /package/src/lib/services/{aws/appconfig → appconfig}/index.ts +0 -0
- /package/src/lib/services/{aws/appconfig → appconfig}/types.ts +0 -0
- /package/src/lib/services/{aws/certificate-manager → certificate-manager}/index.ts +0 -0
- /package/src/lib/services/{aws/cloudfront → cloudfront}/index.ts +0 -0
- /package/src/lib/services/{aws/cloudtrail → cloudtrail}/index.ts +0 -0
- /package/src/lib/services/{aws/cloudtrail → cloudtrail}/types.ts +0 -0
- /package/src/lib/services/{aws/cloudwatch → cloudwatch}/index.ts +0 -0
- /package/src/lib/services/{aws/codebuild → codebuild}/index.ts +0 -0
- /package/src/lib/services/{aws/constants.ts → constants.ts} +0 -0
- /package/src/lib/services/{aws/dynamodb → dynamodb}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.ts +0 -0
- /package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.ts +0 -0
- /package/src/lib/services/{aws/elasticache → elasticache}/index.ts +0 -0
- /package/src/lib/services/{aws/elasticache → elasticache}/types.ts +0 -0
- /package/src/lib/services/{aws/eventbridge → eventbridge}/index.ts +0 -0
- /package/src/lib/services/{aws/evidently → evidently}/index.ts +0 -0
- /package/src/lib/services/{aws/evidently → evidently}/types.ts +0 -0
- /package/src/lib/services/{aws/identity-access-management → identity-access-management}/index.ts +0 -0
- /package/src/lib/services/{aws/key-management-service → key-management-service}/index.ts +0 -0
- /package/src/lib/services/{aws/key-management-service → key-management-service}/types.ts +0 -0
- /package/src/lib/services/{aws/lambda → lambda}/index.ts +0 -0
- /package/src/lib/services/{aws/route53 → route53}/index.ts +0 -0
- /package/src/lib/services/{aws/route53 → route53}/types.ts +0 -0
- /package/src/lib/services/{aws/secrets-manager → secrets-manager}/index.ts +0 -0
- /package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.ts +0 -0
- /package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.ts +0 -0
- /package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.ts +0 -0
- /package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.ts +0 -0
- /package/src/lib/services/{aws/step-function → step-function}/index.ts +0 -0
- /package/src/lib/services/{aws/step-function → step-function}/types.ts +0 -0
- /package/src/lib/services/{aws/systems-manager → systems-manager}/index.ts +0 -0
- /package/src/lib/services/{aws/systems-manager → systems-manager}/types.ts +0 -0
- /package/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.ts +0 -0
- /package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.ts +0 -0
- /package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.ts +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { CommonConstruct } from '../../../common';
|
|
1
|
+
import { IRestApi } from 'aws-cdk-lib/aws-apigateway';
|
|
2
|
+
import { ITable } from 'aws-cdk-lib/aws-dynamodb';
|
|
3
|
+
import { IRole } from 'aws-cdk-lib/aws-iam';
|
|
4
|
+
import { IFunction } from 'aws-cdk-lib/aws-lambda';
|
|
5
|
+
import { ILogGroup } from 'aws-cdk-lib/aws-logs';
|
|
6
|
+
import { IQueue } from 'aws-cdk-lib/aws-sqs';
|
|
7
|
+
import { Choice, Fail, IChainable, IStateMachine, Map, Parallel, Pass, StateMachine, Succeed, Wait } from 'aws-cdk-lib/aws-stepfunctions';
|
|
8
|
+
import { CallApiGatewayRestApiEndpoint, DynamoAttributeValue, DynamoDeleteItem, DynamoGetItem, DynamoPutItem, LambdaInvoke, SqsSendMessage, StepFunctionsStartExecution } from 'aws-cdk-lib/aws-stepfunctions-tasks';
|
|
9
|
+
import { CommonConstruct } from '../../common';
|
|
11
10
|
import { SfnCallApiGatewayRestApiEndpointProps, SfnChoiceProps, SfnDynamoDeleteItemProps, SfnDynamoGetItemProps, SfnDynamoPutItemProps, SfnFailProps, SfnLambdaInvokeProps, SfnMapProps, SfnParallelProps, SfnPassProps, SfnSqsSendMessageProps, SfnStartExecutionProps, SfnStateMachineProps, SfnSucceedProps, SfnWaitProps } from './types';
|
|
12
11
|
/**
|
|
13
12
|
* @classdesc Provides operations on AWS Step Functions Service.
|
|
@@ -17,7 +16,7 @@ import { SfnCallApiGatewayRestApiEndpointProps, SfnChoiceProps, SfnDynamoDeleteI
|
|
|
17
16
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
18
17
|
*
|
|
19
18
|
* class CustomConstruct extends CommonConstruct {
|
|
20
|
-
* constructor(parent:
|
|
19
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
21
20
|
* super(parent, id, props)
|
|
22
21
|
* this.props = props
|
|
23
22
|
* this.sfnManager.createSuccessStep('MyStep', this, myStepProps)
|
|
@@ -32,42 +31,42 @@ export declare class SfnManager {
|
|
|
32
31
|
* @param scope scope in which this resource is defined
|
|
33
32
|
* @param props
|
|
34
33
|
*/
|
|
35
|
-
createSuccessStep(id: string, scope: CommonConstruct, props: SfnSucceedProps):
|
|
34
|
+
createSuccessStep(id: string, scope: CommonConstruct, props: SfnSucceedProps): Succeed;
|
|
36
35
|
/**
|
|
37
36
|
* @summary Method to create a failure step
|
|
38
37
|
* @param id scoped id of the resource
|
|
39
38
|
* @param scope scope in which this resource is defined
|
|
40
39
|
* @param props
|
|
41
40
|
*/
|
|
42
|
-
createFailStep(id: string, scope: CommonConstruct, props: SfnFailProps):
|
|
41
|
+
createFailStep(id: string, scope: CommonConstruct, props: SfnFailProps): Fail;
|
|
43
42
|
/**
|
|
44
43
|
* @summary Method to create a pass step
|
|
45
44
|
* @param id scoped id of the resource
|
|
46
45
|
* @param scope scope in which this resource is defined
|
|
47
46
|
* @param props
|
|
48
47
|
*/
|
|
49
|
-
createPassStep(id: string, scope: CommonConstruct, props: SfnPassProps):
|
|
48
|
+
createPassStep(id: string, scope: CommonConstruct, props: SfnPassProps): Pass;
|
|
50
49
|
/**
|
|
51
50
|
* @summary Method to create a parallel step
|
|
52
51
|
* @param id scoped id of the resource
|
|
53
52
|
* @param scope scope in which this resource is defined
|
|
54
53
|
* @param props
|
|
55
54
|
*/
|
|
56
|
-
createParallelStep(id: string, scope: CommonConstruct, props: SfnParallelProps):
|
|
55
|
+
createParallelStep(id: string, scope: CommonConstruct, props: SfnParallelProps): Parallel;
|
|
57
56
|
/**
|
|
58
57
|
* @summary Method to create a choice step
|
|
59
58
|
* @param id scoped id of the resource
|
|
60
59
|
* @param scope scope in which this resource is defined
|
|
61
60
|
* @param props
|
|
62
61
|
*/
|
|
63
|
-
createChoiceStep(id: string, scope: CommonConstruct, props: SfnChoiceProps):
|
|
62
|
+
createChoiceStep(id: string, scope: CommonConstruct, props: SfnChoiceProps): Choice;
|
|
64
63
|
/**
|
|
65
64
|
* @summary Method to create a wait step
|
|
66
65
|
* @param id scoped id of the resource
|
|
67
66
|
* @param scope scope in which this resource is defined
|
|
68
67
|
* @param props
|
|
69
68
|
*/
|
|
70
|
-
createWaitStep(id: string, scope: CommonConstruct, props: SfnWaitProps):
|
|
69
|
+
createWaitStep(id: string, scope: CommonConstruct, props: SfnWaitProps): Wait;
|
|
71
70
|
/**
|
|
72
71
|
* @summary Method to create a DynamoDB get item step
|
|
73
72
|
* @param id scoped id of the resource
|
|
@@ -76,9 +75,9 @@ export declare class SfnManager {
|
|
|
76
75
|
* @param table The table to get the item from
|
|
77
76
|
* @param tableKey The table key for query/scan
|
|
78
77
|
*/
|
|
79
|
-
createDynamoDbGetItemStep(id: string, scope: CommonConstruct, props: SfnDynamoGetItemProps, table:
|
|
80
|
-
[key: string]:
|
|
81
|
-
}):
|
|
78
|
+
createDynamoDbGetItemStep(id: string, scope: CommonConstruct, props: SfnDynamoGetItemProps, table: ITable, tableKey: {
|
|
79
|
+
[key: string]: DynamoAttributeValue;
|
|
80
|
+
}): DynamoGetItem;
|
|
82
81
|
/**
|
|
83
82
|
* @summary Method to create a DynamoDB put item step
|
|
84
83
|
* @param id scoped id of the resource
|
|
@@ -87,9 +86,9 @@ export declare class SfnManager {
|
|
|
87
86
|
* @param table The table to put the item in
|
|
88
87
|
* @param tableItem The item to add to the table
|
|
89
88
|
*/
|
|
90
|
-
createDynamoDbPutItemStep(id: string, scope: CommonConstruct, props: SfnDynamoPutItemProps, table:
|
|
91
|
-
[key: string]:
|
|
92
|
-
}):
|
|
89
|
+
createDynamoDbPutItemStep(id: string, scope: CommonConstruct, props: SfnDynamoPutItemProps, table: ITable, tableItem: {
|
|
90
|
+
[key: string]: DynamoAttributeValue;
|
|
91
|
+
}): DynamoPutItem;
|
|
93
92
|
/**
|
|
94
93
|
* @summary Method to create a DynamoDB delete item step
|
|
95
94
|
* @param id scoped id of the resource
|
|
@@ -98,9 +97,9 @@ export declare class SfnManager {
|
|
|
98
97
|
* @param table The table to put the item in
|
|
99
98
|
* @param tableKey The table key for query/scan
|
|
100
99
|
*/
|
|
101
|
-
createDynamoDbDeleteItemStep(id: string, scope: CommonConstruct, props: SfnDynamoDeleteItemProps, table:
|
|
102
|
-
[key: string]:
|
|
103
|
-
}):
|
|
100
|
+
createDynamoDbDeleteItemStep(id: string, scope: CommonConstruct, props: SfnDynamoDeleteItemProps, table: ITable, tableKey: {
|
|
101
|
+
[key: string]: DynamoAttributeValue;
|
|
102
|
+
}): DynamoDeleteItem;
|
|
104
103
|
/**
|
|
105
104
|
* @summary Method to send a message to SQS step
|
|
106
105
|
* @param id scoped id of the resource
|
|
@@ -108,7 +107,7 @@ export declare class SfnManager {
|
|
|
108
107
|
* @param props
|
|
109
108
|
* @param queue The queue to send the message to
|
|
110
109
|
*/
|
|
111
|
-
createSendSqsMessageStep(id: string, scope: CommonConstruct, props: SfnSqsSendMessageProps, queue:
|
|
110
|
+
createSendSqsMessageStep(id: string, scope: CommonConstruct, props: SfnSqsSendMessageProps, queue: IQueue): SqsSendMessage;
|
|
112
111
|
/**
|
|
113
112
|
* @summary Method to create a lambda invoke step
|
|
114
113
|
* @param id scoped id of the resource
|
|
@@ -116,7 +115,7 @@ export declare class SfnManager {
|
|
|
116
115
|
* @param props
|
|
117
116
|
* @param lambdaFunction
|
|
118
117
|
*/
|
|
119
|
-
createLambdaStep(id: string, scope: CommonConstruct, props: SfnLambdaInvokeProps, lambdaFunction:
|
|
118
|
+
createLambdaStep(id: string, scope: CommonConstruct, props: SfnLambdaInvokeProps, lambdaFunction: IFunction): LambdaInvoke;
|
|
120
119
|
/**
|
|
121
120
|
* @summary Method to create a lambda invoke step
|
|
122
121
|
* @param id scoped id of the resource
|
|
@@ -125,7 +124,7 @@ export declare class SfnManager {
|
|
|
125
124
|
* @param lambdaFunction
|
|
126
125
|
* @param skipExecution
|
|
127
126
|
*/
|
|
128
|
-
createSkippableLambdaStep(id: string, scope: CommonConstruct, props: SfnLambdaInvokeProps, lambdaFunction:
|
|
127
|
+
createSkippableLambdaStep(id: string, scope: CommonConstruct, props: SfnLambdaInvokeProps, lambdaFunction: IFunction, skipExecution?: boolean): Pass | LambdaInvoke;
|
|
129
128
|
/**
|
|
130
129
|
* @summary Method to create a API Gateway invoke step
|
|
131
130
|
* @param id scoped id of the resource
|
|
@@ -133,7 +132,7 @@ export declare class SfnManager {
|
|
|
133
132
|
* @param props
|
|
134
133
|
* @param api
|
|
135
134
|
*/
|
|
136
|
-
createApiStep(id: string, scope: CommonConstruct, props: SfnCallApiGatewayRestApiEndpointProps, api:
|
|
135
|
+
createApiStep(id: string, scope: CommonConstruct, props: SfnCallApiGatewayRestApiEndpointProps, api: IRestApi): CallApiGatewayRestApiEndpoint;
|
|
137
136
|
/**
|
|
138
137
|
* @summary Method to create a step function execution step
|
|
139
138
|
* @param id scoped id of the resource
|
|
@@ -141,14 +140,14 @@ export declare class SfnManager {
|
|
|
141
140
|
* @param props props for the step
|
|
142
141
|
* @param stateMachine the state machine to execute
|
|
143
142
|
*/
|
|
144
|
-
createSfnExecutionStep(id: string, scope: CommonConstruct, props: SfnStartExecutionProps, stateMachine:
|
|
143
|
+
createSfnExecutionStep(id: string, scope: CommonConstruct, props: SfnStartExecutionProps, stateMachine: IStateMachine): StepFunctionsStartExecution;
|
|
145
144
|
/**
|
|
146
145
|
* @summary Method to create a step function map state
|
|
147
146
|
* @param id scoped id of the resource
|
|
148
147
|
* @param scope scope in which this resource is defined
|
|
149
148
|
* @param props props for the map state
|
|
150
149
|
*/
|
|
151
|
-
createMapState(id: string, scope: CommonConstruct, props: SfnMapProps):
|
|
150
|
+
createMapState(id: string, scope: CommonConstruct, props: SfnMapProps): Map;
|
|
152
151
|
/**
|
|
153
152
|
* @summary Method to create a state machine
|
|
154
153
|
* @param id scoped id of the resource
|
|
@@ -158,5 +157,5 @@ export declare class SfnManager {
|
|
|
158
157
|
* @param logGroup
|
|
159
158
|
* @param role
|
|
160
159
|
*/
|
|
161
|
-
createStateMachine(id: string, scope: CommonConstruct, props: SfnStateMachineProps, definition:
|
|
160
|
+
createStateMachine(id: string, scope: CommonConstruct, props: SfnStateMachineProps, definition: IChainable, logGroup: ILogGroup, role?: IRole): StateMachine;
|
|
162
161
|
}
|
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.SfnManager = void 0;
|
|
27
|
-
const
|
|
28
|
-
const sfn = __importStar(require("aws-cdk-lib/aws-stepfunctions"));
|
|
4
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
29
5
|
const aws_stepfunctions_1 = require("aws-cdk-lib/aws-stepfunctions");
|
|
30
|
-
const
|
|
31
|
-
const utils = __importStar(require("../../../utils"));
|
|
6
|
+
const aws_stepfunctions_tasks_1 = require("aws-cdk-lib/aws-stepfunctions-tasks");
|
|
32
7
|
const uuid_1 = require("uuid");
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
33
9
|
const DEFAULT_RETRY_CONFIG = [
|
|
34
10
|
{
|
|
35
11
|
backoffRate: 2,
|
|
@@ -46,7 +22,7 @@ const DEFAULT_RETRY_CONFIG = [
|
|
|
46
22
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
47
23
|
*
|
|
48
24
|
* class CustomConstruct extends CommonConstruct {
|
|
49
|
-
* constructor(parent:
|
|
25
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
50
26
|
* super(parent, id, props)
|
|
51
27
|
* this.props = props
|
|
52
28
|
* this.sfnManager.createSuccessStep('MyStep', this, myStepProps)
|
|
@@ -64,7 +40,7 @@ class SfnManager {
|
|
|
64
40
|
createSuccessStep(id, scope, props) {
|
|
65
41
|
if (!props)
|
|
66
42
|
throw `Step props undefined for ${id}`;
|
|
67
|
-
return new
|
|
43
|
+
return new aws_stepfunctions_1.Succeed(scope, `${props.name}`, {
|
|
68
44
|
...props,
|
|
69
45
|
...{
|
|
70
46
|
comment: `Succeed step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -80,7 +56,7 @@ class SfnManager {
|
|
|
80
56
|
createFailStep(id, scope, props) {
|
|
81
57
|
if (!props)
|
|
82
58
|
throw `Step props undefined for ${id}`;
|
|
83
|
-
return new
|
|
59
|
+
return new aws_stepfunctions_1.Fail(scope, `${props.name}`, {
|
|
84
60
|
...props,
|
|
85
61
|
...{
|
|
86
62
|
comment: `Fail step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -96,7 +72,7 @@ class SfnManager {
|
|
|
96
72
|
createPassStep(id, scope, props) {
|
|
97
73
|
if (!props)
|
|
98
74
|
throw `Step props undefined for ${id}`;
|
|
99
|
-
return new
|
|
75
|
+
return new aws_stepfunctions_1.Pass(scope, `${props.name}`, {
|
|
100
76
|
...props,
|
|
101
77
|
...{
|
|
102
78
|
comment: `Pass step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -112,7 +88,7 @@ class SfnManager {
|
|
|
112
88
|
createParallelStep(id, scope, props) {
|
|
113
89
|
if (!props)
|
|
114
90
|
throw `Step props undefined for ${id}`;
|
|
115
|
-
return new
|
|
91
|
+
return new aws_stepfunctions_1.Parallel(scope, `${props.name}`, {
|
|
116
92
|
...props,
|
|
117
93
|
...{
|
|
118
94
|
comment: `Parallel step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -128,7 +104,7 @@ class SfnManager {
|
|
|
128
104
|
createChoiceStep(id, scope, props) {
|
|
129
105
|
if (!props)
|
|
130
106
|
throw `Step props undefined for ${id}`;
|
|
131
|
-
return new
|
|
107
|
+
return new aws_stepfunctions_1.Choice(scope, `${props.name}`, {
|
|
132
108
|
...props,
|
|
133
109
|
...{
|
|
134
110
|
comment: `Choice step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -142,11 +118,11 @@ class SfnManager {
|
|
|
142
118
|
* @param props
|
|
143
119
|
*/
|
|
144
120
|
createWaitStep(id, scope, props) {
|
|
145
|
-
return new
|
|
121
|
+
return new aws_stepfunctions_1.Wait(scope, `${props.name}`, {
|
|
146
122
|
...props,
|
|
147
123
|
...{
|
|
148
124
|
comment: `Choice step for ${props.name} - ${scope.props.stage} stage`,
|
|
149
|
-
time:
|
|
125
|
+
time: aws_stepfunctions_1.WaitTime.duration(aws_cdk_lib_1.Duration.seconds(props.delayInSeconds)),
|
|
150
126
|
},
|
|
151
127
|
});
|
|
152
128
|
}
|
|
@@ -161,7 +137,7 @@ class SfnManager {
|
|
|
161
137
|
createDynamoDbGetItemStep(id, scope, props, table, tableKey) {
|
|
162
138
|
if (!props)
|
|
163
139
|
throw `Step props undefined for ${id}`;
|
|
164
|
-
const step = new
|
|
140
|
+
const step = new aws_stepfunctions_tasks_1.DynamoGetItem(scope, `${props.name}`, {
|
|
165
141
|
...props,
|
|
166
142
|
...{
|
|
167
143
|
comment: `DynamoDB GetItem step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -186,7 +162,7 @@ class SfnManager {
|
|
|
186
162
|
}
|
|
187
163
|
retries.forEach(retry => step.addRetry({
|
|
188
164
|
...retry,
|
|
189
|
-
...{ interval: retry.intervalInSecs ?
|
|
165
|
+
...{ interval: retry.intervalInSecs ? aws_cdk_lib_1.Duration.seconds(retry.intervalInSecs) : retry.interval },
|
|
190
166
|
}));
|
|
191
167
|
return step;
|
|
192
168
|
}
|
|
@@ -201,7 +177,7 @@ class SfnManager {
|
|
|
201
177
|
createDynamoDbPutItemStep(id, scope, props, table, tableItem) {
|
|
202
178
|
if (!props)
|
|
203
179
|
throw `Step props undefined for ${id}`;
|
|
204
|
-
const step = new
|
|
180
|
+
const step = new aws_stepfunctions_tasks_1.DynamoPutItem(scope, `${props.name}`, {
|
|
205
181
|
...props,
|
|
206
182
|
...{
|
|
207
183
|
comment: `DynamoDB PutItem step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -228,7 +204,7 @@ class SfnManager {
|
|
|
228
204
|
}
|
|
229
205
|
retries.forEach(retry => step.addRetry({
|
|
230
206
|
...retry,
|
|
231
|
-
...{ interval: retry.intervalInSecs ?
|
|
207
|
+
...{ interval: retry.intervalInSecs ? aws_cdk_lib_1.Duration.seconds(retry.intervalInSecs) : retry.interval },
|
|
232
208
|
}));
|
|
233
209
|
return step;
|
|
234
210
|
}
|
|
@@ -243,7 +219,7 @@ class SfnManager {
|
|
|
243
219
|
createDynamoDbDeleteItemStep(id, scope, props, table, tableKey) {
|
|
244
220
|
if (!props)
|
|
245
221
|
throw `Step props undefined for ${id}`;
|
|
246
|
-
const step = new
|
|
222
|
+
const step = new aws_stepfunctions_tasks_1.DynamoDeleteItem(scope, `${props.name}`, {
|
|
247
223
|
...props,
|
|
248
224
|
...{
|
|
249
225
|
comment: `DynamoDB DeleteItem step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -270,7 +246,7 @@ class SfnManager {
|
|
|
270
246
|
}
|
|
271
247
|
retries.forEach(retry => step.addRetry({
|
|
272
248
|
...retry,
|
|
273
|
-
...{ interval: retry.intervalInSecs ?
|
|
249
|
+
...{ interval: retry.intervalInSecs ? aws_cdk_lib_1.Duration.seconds(retry.intervalInSecs) : retry.interval },
|
|
274
250
|
}));
|
|
275
251
|
return step;
|
|
276
252
|
}
|
|
@@ -286,7 +262,7 @@ class SfnManager {
|
|
|
286
262
|
throw `Step props undefined for ${id}`;
|
|
287
263
|
if (!props.messageBody)
|
|
288
264
|
throw 'Message body undefined';
|
|
289
|
-
const step = new
|
|
265
|
+
const step = new aws_stepfunctions_tasks_1.SqsSendMessage(scope, `${props.name}`, {
|
|
290
266
|
...props,
|
|
291
267
|
...{
|
|
292
268
|
comment: `DynamoDB PutItem step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -310,7 +286,7 @@ class SfnManager {
|
|
|
310
286
|
}
|
|
311
287
|
retries.forEach(retry => step.addRetry({
|
|
312
288
|
...retry,
|
|
313
|
-
...{ interval: retry.intervalInSecs ?
|
|
289
|
+
...{ interval: retry.intervalInSecs ? aws_cdk_lib_1.Duration.seconds(retry.intervalInSecs) : retry.interval },
|
|
314
290
|
}));
|
|
315
291
|
return step;
|
|
316
292
|
}
|
|
@@ -324,7 +300,7 @@ class SfnManager {
|
|
|
324
300
|
createLambdaStep(id, scope, props, lambdaFunction) {
|
|
325
301
|
if (!props)
|
|
326
302
|
throw `Step props undefined for ${id}`;
|
|
327
|
-
const step = new
|
|
303
|
+
const step = new aws_stepfunctions_tasks_1.LambdaInvoke(scope, `${props.name}`, {
|
|
328
304
|
...props,
|
|
329
305
|
...{
|
|
330
306
|
comment: `Lambda step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -337,7 +313,7 @@ class SfnManager {
|
|
|
337
313
|
}
|
|
338
314
|
retries.forEach(retry => step.addRetry({
|
|
339
315
|
...retry,
|
|
340
|
-
...{ interval: retry.intervalInSecs ?
|
|
316
|
+
...{ interval: retry.intervalInSecs ? aws_cdk_lib_1.Duration.seconds(retry.intervalInSecs) : retry.interval },
|
|
341
317
|
}));
|
|
342
318
|
return step;
|
|
343
319
|
}
|
|
@@ -353,8 +329,8 @@ class SfnManager {
|
|
|
353
329
|
if (!props)
|
|
354
330
|
throw `Step props undefined for ${id}`;
|
|
355
331
|
if (skipExecution)
|
|
356
|
-
return this.createPassStep(id, scope, {
|
|
357
|
-
const step = new
|
|
332
|
+
return this.createPassStep(id, scope, { comment: props.comment, name: props.name });
|
|
333
|
+
const step = new aws_stepfunctions_tasks_1.LambdaInvoke(scope, `${props.name}`, {
|
|
358
334
|
...props,
|
|
359
335
|
...{
|
|
360
336
|
comment: `Lambda step for ${props.name} - ${scope.props.stage} stage`,
|
|
@@ -367,7 +343,7 @@ class SfnManager {
|
|
|
367
343
|
}
|
|
368
344
|
retries.forEach(retry => step.addRetry({
|
|
369
345
|
...retry,
|
|
370
|
-
...{ interval: retry.intervalInSecs ?
|
|
346
|
+
...{ interval: retry.intervalInSecs ? aws_cdk_lib_1.Duration.seconds(retry.intervalInSecs) : retry.interval },
|
|
371
347
|
}));
|
|
372
348
|
return step;
|
|
373
349
|
}
|
|
@@ -381,7 +357,7 @@ class SfnManager {
|
|
|
381
357
|
createApiStep(id, scope, props, api) {
|
|
382
358
|
if (!props)
|
|
383
359
|
throw `Step props undefined for ${id}`;
|
|
384
|
-
const step = new
|
|
360
|
+
const step = new aws_stepfunctions_tasks_1.CallApiGatewayRestApiEndpoint(scope, `${props.name}`, {
|
|
385
361
|
...props,
|
|
386
362
|
...{
|
|
387
363
|
api,
|
|
@@ -395,7 +371,7 @@ class SfnManager {
|
|
|
395
371
|
}
|
|
396
372
|
retries.forEach(retry => step.addRetry({
|
|
397
373
|
...retry,
|
|
398
|
-
...{ interval: retry.intervalInSecs ?
|
|
374
|
+
...{ interval: retry.intervalInSecs ? aws_cdk_lib_1.Duration.seconds(retry.intervalInSecs) : retry.interval },
|
|
399
375
|
}));
|
|
400
376
|
return step;
|
|
401
377
|
}
|
|
@@ -407,7 +383,7 @@ class SfnManager {
|
|
|
407
383
|
* @param stateMachine the state machine to execute
|
|
408
384
|
*/
|
|
409
385
|
createSfnExecutionStep(id, scope, props, stateMachine) {
|
|
410
|
-
const step = new
|
|
386
|
+
const step = new aws_stepfunctions_tasks_1.StepFunctionsStartExecution(scope, `${id}`, {
|
|
411
387
|
...props,
|
|
412
388
|
associateWithParent: props.associateWithParent ?? true,
|
|
413
389
|
inputPath: props.inputPath,
|
|
@@ -420,7 +396,7 @@ class SfnManager {
|
|
|
420
396
|
}
|
|
421
397
|
retries.forEach(retry => step.addRetry({
|
|
422
398
|
...retry,
|
|
423
|
-
...{ interval: retry.intervalInSecs ?
|
|
399
|
+
...{ interval: retry.intervalInSecs ? aws_cdk_lib_1.Duration.seconds(retry.intervalInSecs) : retry.interval },
|
|
424
400
|
}));
|
|
425
401
|
return step;
|
|
426
402
|
}
|
|
@@ -431,7 +407,7 @@ class SfnManager {
|
|
|
431
407
|
* @param props props for the map state
|
|
432
408
|
*/
|
|
433
409
|
createMapState(id, scope, props) {
|
|
434
|
-
return new
|
|
410
|
+
return new aws_stepfunctions_1.Map(scope, `${id}`, props);
|
|
435
411
|
}
|
|
436
412
|
/**
|
|
437
413
|
* @summary Method to create a state machine
|
|
@@ -445,12 +421,12 @@ class SfnManager {
|
|
|
445
421
|
createStateMachine(id, scope, props, definition, logGroup, role) {
|
|
446
422
|
if (!props)
|
|
447
423
|
throw `State Machine props undefined for ${id}`;
|
|
448
|
-
const stateMachine = new
|
|
424
|
+
const stateMachine = new aws_stepfunctions_1.StateMachine(scope, `${id}`, {
|
|
449
425
|
definitionBody: aws_stepfunctions_1.DefinitionBody.fromChainable(definition),
|
|
450
426
|
logs: {
|
|
451
427
|
destination: logGroup,
|
|
452
428
|
includeExecutionData: props.logs?.includeExecutionData ?? true,
|
|
453
|
-
level: props.logs?.level ??
|
|
429
|
+
level: props.logs?.level ?? aws_stepfunctions_1.LogLevel.ALL,
|
|
454
430
|
},
|
|
455
431
|
role,
|
|
456
432
|
stateMachineName: `${props.stateMachineName}-${scope.props.stage}`,
|
|
@@ -458,8 +434,8 @@ class SfnManager {
|
|
|
458
434
|
timeout: props.timeout,
|
|
459
435
|
tracingEnabled: props.tracingEnabled,
|
|
460
436
|
});
|
|
461
|
-
|
|
462
|
-
|
|
437
|
+
(0, utils_1.createCfnOutput)(`${id}-stateMachineName`, scope, stateMachine.stateMachineName);
|
|
438
|
+
(0, utils_1.createCfnOutput)(`${id}-stateMachineArn`, scope, stateMachine.stateMachineArn);
|
|
463
439
|
return stateMachine;
|
|
464
440
|
}
|
|
465
441
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { CommonConstruct } from '
|
|
1
|
+
import { StringParameter, StringParameterProps } from 'aws-cdk-lib/aws-ssm';
|
|
2
|
+
import { AwsCustomResource } from 'aws-cdk-lib/custom-resources';
|
|
3
|
+
import { CommonConstruct } from '../../common';
|
|
4
4
|
import { SSMParameterReaderProps } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* @classdesc Provides operations on AWS Systems Manager.
|
|
@@ -26,7 +26,7 @@ export declare class SsmManager {
|
|
|
26
26
|
* @param scope scope in which this resource is defined
|
|
27
27
|
* @param props parameter props
|
|
28
28
|
*/
|
|
29
|
-
writeStringToParameters(id: string, scope: CommonConstruct, props:
|
|
29
|
+
writeStringToParameters(id: string, scope: CommonConstruct, props: StringParameterProps): StringParameter;
|
|
30
30
|
/**
|
|
31
31
|
* Method to read a string parameter from the parameters store
|
|
32
32
|
* @param id scoped id of the resource
|
|
@@ -46,7 +46,7 @@ export declare class SsmManager {
|
|
|
46
46
|
/**
|
|
47
47
|
* @classdesc Provides utilities to read same/cross region SSM parameters
|
|
48
48
|
*/
|
|
49
|
-
export declare class SSMParameterReader extends
|
|
49
|
+
export declare class SSMParameterReader extends AwsCustomResource {
|
|
50
50
|
constructor(scope: CommonConstruct, name: string, props: SSMParameterReaderProps);
|
|
51
51
|
/**
|
|
52
52
|
*
|
|
@@ -1,32 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.SSMParameterReader = exports.SsmManager = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
4
|
+
const aws_ssm_1 = require("aws-cdk-lib/aws-ssm");
|
|
5
|
+
const custom_resources_1 = require("aws-cdk-lib/custom-resources");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
30
7
|
/**
|
|
31
8
|
* @classdesc Provides operations on AWS Systems Manager.
|
|
32
9
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -54,13 +31,13 @@ class SsmManager {
|
|
|
54
31
|
writeStringToParameters(id, scope, props) {
|
|
55
32
|
if (!props)
|
|
56
33
|
throw `Parameter props undefined for ${id}`;
|
|
57
|
-
const parameter = new
|
|
34
|
+
const parameter = new aws_ssm_1.StringParameter(scope, `${id}`, {
|
|
58
35
|
description: `${props.description} - ${scope.props.stage} stage`,
|
|
59
36
|
parameterName: `${props.parameterName}-${scope.props.stage}`,
|
|
60
37
|
stringValue: props.stringValue,
|
|
61
38
|
});
|
|
62
|
-
|
|
63
|
-
|
|
39
|
+
(0, utils_1.createCfnOutput)(`${id}-parameterArn`, scope, parameter.parameterArn);
|
|
40
|
+
(0, utils_1.createCfnOutput)(`${id}-parameterName`, scope, parameter.parameterName);
|
|
64
41
|
return parameter;
|
|
65
42
|
}
|
|
66
43
|
/**
|
|
@@ -72,7 +49,7 @@ class SsmManager {
|
|
|
72
49
|
readStringParameter(id, scope, parameterName) {
|
|
73
50
|
if (!parameterName || parameterName == '')
|
|
74
51
|
throw 'Invalid parameter name';
|
|
75
|
-
return
|
|
52
|
+
return aws_ssm_1.StringParameter.valueFromLookup(scope, parameterName);
|
|
76
53
|
}
|
|
77
54
|
/**
|
|
78
55
|
* Method to read a string parameter from the parameters store in a given region
|
|
@@ -96,7 +73,7 @@ exports.SsmManager = SsmManager;
|
|
|
96
73
|
/**
|
|
97
74
|
* @classdesc Provides utilities to read same/cross region SSM parameters
|
|
98
75
|
*/
|
|
99
|
-
class SSMParameterReader extends
|
|
76
|
+
class SSMParameterReader extends custom_resources_1.AwsCustomResource {
|
|
100
77
|
constructor(scope, name, props) {
|
|
101
78
|
const { parameterName, region } = props;
|
|
102
79
|
const ssmAwsSdkCall = {
|
|
@@ -104,13 +81,13 @@ class SSMParameterReader extends cr.AwsCustomResource {
|
|
|
104
81
|
parameters: {
|
|
105
82
|
Name: `${parameterName}-${scope.props.stage}`,
|
|
106
83
|
},
|
|
107
|
-
physicalResourceId:
|
|
84
|
+
physicalResourceId: custom_resources_1.PhysicalResourceId.of(Date.now().toString()),
|
|
108
85
|
region,
|
|
109
86
|
service: 'SSM',
|
|
110
87
|
};
|
|
111
88
|
super(scope, name, {
|
|
112
89
|
onUpdate: ssmAwsSdkCall,
|
|
113
|
-
policy:
|
|
90
|
+
policy: custom_resources_1.AwsCustomResourcePolicy.fromSdkCalls({ resources: custom_resources_1.AwsCustomResourcePolicy.ANY_RESOURCE }),
|
|
114
91
|
});
|
|
115
92
|
}
|
|
116
93
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { CommonConstruct } from '../../../common';
|
|
1
|
+
import { Vpc, VpcProps } from 'aws-cdk-lib/aws-ec2';
|
|
2
|
+
import { CommonConstruct } from '../../common';
|
|
4
3
|
/**
|
|
5
4
|
* @classdesc Provides operations on AWS VPC.
|
|
6
5
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -15,7 +14,7 @@ import { CommonConstruct } from '../../../common';
|
|
|
15
14
|
* this.vpcManager.createVpc('MyVPC', this)
|
|
16
15
|
* }
|
|
17
16
|
* }
|
|
18
|
-
* @see [CDK VPC Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.@aws-cdk_aws-
|
|
17
|
+
* @see [CDK VPC Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.@aws-cdk_aws-Vpc.html}
|
|
19
18
|
*/
|
|
20
19
|
export declare class VpcManager {
|
|
21
20
|
/**
|
|
@@ -24,19 +23,19 @@ export declare class VpcManager {
|
|
|
24
23
|
* @param scope scope in which this resource is defined
|
|
25
24
|
* @param props
|
|
26
25
|
*/
|
|
27
|
-
createVpc(id: string, scope: CommonConstruct, props:
|
|
26
|
+
createVpc(id: string, scope: CommonConstruct, props: VpcProps): Vpc;
|
|
28
27
|
/**
|
|
29
28
|
* @summary Method to create a common vpc
|
|
30
29
|
* @param scope scope in which this resource is defined
|
|
31
30
|
* @param props
|
|
32
31
|
* @param vpcIdentifier optional identifier for VPC
|
|
33
32
|
*/
|
|
34
|
-
createCommonVpc(scope: CommonConstruct, props:
|
|
33
|
+
createCommonVpc(scope: CommonConstruct, props: VpcProps, vpcIdentifier?: string): Vpc;
|
|
35
34
|
/**
|
|
36
35
|
* @summary Method to retrieve a common vpc
|
|
37
36
|
* @param id scoped id of the resource
|
|
38
37
|
* @param scope scope in which this resource is defined
|
|
39
38
|
* @param vpcIdentifier optional identifier for VPC
|
|
40
39
|
*/
|
|
41
|
-
retrieveCommonVpc(id: string, scope: CommonConstruct, vpcIdentifier?: string): cdk.
|
|
40
|
+
retrieveCommonVpc(id: string, scope: CommonConstruct, vpcIdentifier?: string): import("aws-cdk-lib/aws-ec2").IVpc;
|
|
42
41
|
}
|