@gradientedge/cdk-utils 8.88.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/services/aws/appconfig/main.d.ts +58 -0
- package/dist/src/lib/{manager/aws/app-config-manager.js → services/aws/appconfig/main.js} +25 -43
- 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/constants.d.ts +4 -0
- package/dist/src/lib/services/aws/constants.js +8 -0
- 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/{manager/aws/app-config-manager.ts → services/aws/appconfig/main.ts} +31 -54
- 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/constants.ts +4 -0
- 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.d.ts +0 -65
- 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 -29
- package/dist/src/lib/manager/aws/index.js +0 -45
- 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/index.ts +0 -29
- /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}/index.d.ts +0 -0
- /package/dist/src/lib/{manager → services}/index.js +0 -0
- /package/src/lib/{manager → services}/index.ts +0 -0
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import * as cdk from 'aws-cdk-lib'
|
|
2
2
|
import * as watch from 'aws-cdk-lib/aws-cloudwatch'
|
|
3
3
|
import { IMetric } from 'aws-cdk-lib/aws-cloudwatch'
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import * as utils from '../../../utils'
|
|
5
|
+
import { CommonConstruct } from '../../../common'
|
|
6
|
+
import {
|
|
7
|
+
AlarmProps,
|
|
8
|
+
AlarmStatusWidgetProps,
|
|
9
|
+
DashboardProps,
|
|
10
|
+
GraphWidgetProps,
|
|
11
|
+
GuageWidgetProps,
|
|
12
|
+
LogQueryWidgetProps,
|
|
13
|
+
MetricProps,
|
|
14
|
+
NumericWidgetProps,
|
|
15
|
+
TextWidgetProps,
|
|
16
|
+
} from './types'
|
|
7
17
|
|
|
8
18
|
/**
|
|
9
19
|
* @category cdk-utils.cloudwatch-manager
|
|
@@ -23,12 +33,12 @@ enum CloudWatchWidgetType {
|
|
|
23
33
|
* @category cdk-utils.cloudwatch-manager
|
|
24
34
|
* @subcategory Construct
|
|
25
35
|
* @classdesc Provides operations on AWS CloudWatch.
|
|
26
|
-
* - A new instance of this class is injected into {@link
|
|
27
|
-
* - If a custom construct extends {@link
|
|
36
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
37
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
28
38
|
* @example
|
|
29
|
-
* import
|
|
39
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
30
40
|
*
|
|
31
|
-
* class CustomConstruct extends
|
|
41
|
+
* class CustomConstruct extends CommonConstruct {
|
|
32
42
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
33
43
|
* super(parent, id, props)
|
|
34
44
|
* this.props = props
|
|
@@ -42,10 +52,10 @@ export class CloudWatchManager {
|
|
|
42
52
|
/**
|
|
43
53
|
* @summary Method to create a cloudwatch alarm for a given expression
|
|
44
54
|
* @param {string} id scoped id of the resource
|
|
45
|
-
* @param {
|
|
46
|
-
* @param {
|
|
55
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
56
|
+
* @param {AlarmProps} props
|
|
47
57
|
*/
|
|
48
|
-
public createAlarmForExpression(id: string, scope:
|
|
58
|
+
public createAlarmForExpression(id: string, scope: CommonConstruct, props: AlarmProps) {
|
|
49
59
|
if (!props) throw `Alarm props undefined for ${id}`
|
|
50
60
|
|
|
51
61
|
if (!props.expression) throw `Could not find expression for Alarm props for id:${id}`
|
|
@@ -80,16 +90,11 @@ export class CloudWatchManager {
|
|
|
80
90
|
/**
|
|
81
91
|
* @summary Method to create a cloudwatch alarm for a given metric
|
|
82
92
|
* @param {string} id scoped id of the resource
|
|
83
|
-
* @param {
|
|
84
|
-
* @param {
|
|
93
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
94
|
+
* @param {AlarmProps} props
|
|
85
95
|
* @param metric
|
|
86
96
|
*/
|
|
87
|
-
public createAlarmForMetric(
|
|
88
|
-
id: string,
|
|
89
|
-
scope: common.CommonConstruct,
|
|
90
|
-
props: types.AlarmProps,
|
|
91
|
-
metric: watch.Metric
|
|
92
|
-
) {
|
|
97
|
+
public createAlarmForMetric(id: string, scope: CommonConstruct, props: AlarmProps, metric: watch.Metric) {
|
|
93
98
|
if (!props) throw `Alarm props undefined for ${id}`
|
|
94
99
|
|
|
95
100
|
const alarm = metric.createAlarm(scope, `${id}`, {
|
|
@@ -111,16 +116,11 @@ export class CloudWatchManager {
|
|
|
111
116
|
/**
|
|
112
117
|
* @summary Method to create a cloudwatch dashboard
|
|
113
118
|
* @param {string} id scoped id of the resource
|
|
114
|
-
* @param {
|
|
115
|
-
* @param {
|
|
119
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
120
|
+
* @param {DashboardProps} props
|
|
116
121
|
* @param widgets
|
|
117
122
|
*/
|
|
118
|
-
public createDashboard(
|
|
119
|
-
id: string,
|
|
120
|
-
scope: common.CommonConstruct,
|
|
121
|
-
props: types.DashboardProps,
|
|
122
|
-
widgets?: watch.IWidget[][]
|
|
123
|
-
) {
|
|
123
|
+
public createDashboard(id: string, scope: CommonConstruct, props: DashboardProps, widgets?: watch.IWidget[][]) {
|
|
124
124
|
if (!props) throw `Dashboard props undefined for ${id}`
|
|
125
125
|
|
|
126
126
|
const dashboard = new watch.Dashboard(scope, `${id}`, {
|
|
@@ -138,10 +138,10 @@ export class CloudWatchManager {
|
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* @summary Method to create cloudwatch widgets
|
|
141
|
-
* @param {
|
|
141
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
142
142
|
* @param props
|
|
143
143
|
*/
|
|
144
|
-
public createWidgets(scope:
|
|
144
|
+
public createWidgets(scope: CommonConstruct, props: any[]) {
|
|
145
145
|
if (!props || props.length == 0) throw `Widget props undefined`
|
|
146
146
|
|
|
147
147
|
const widgets: any = []
|
|
@@ -153,10 +153,10 @@ export class CloudWatchManager {
|
|
|
153
153
|
/**
|
|
154
154
|
* @summary Method to create a cloudwatch widget
|
|
155
155
|
* @param {string} id scoped id of the resource
|
|
156
|
-
* @param {
|
|
156
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
157
157
|
* @param props
|
|
158
158
|
*/
|
|
159
|
-
public createWidget(id: string, scope:
|
|
159
|
+
public createWidget(id: string, scope: CommonConstruct, props: any) {
|
|
160
160
|
if (!props) throw `Widget props undefined for ${id}`
|
|
161
161
|
|
|
162
162
|
const metrics = this.determineMetrics(scope, props.metricProps)
|
|
@@ -185,16 +185,11 @@ export class CloudWatchManager {
|
|
|
185
185
|
/**
|
|
186
186
|
* @summary Method to create a cloudfront distribution widget
|
|
187
187
|
* @param {string} id scoped id of the resource
|
|
188
|
-
* @param {
|
|
189
|
-
* @param {
|
|
188
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
189
|
+
* @param {TextWidgetProps} props
|
|
190
190
|
* @param {string} distributionId the cloudfront distribution id
|
|
191
191
|
*/
|
|
192
|
-
public createCloudfrontDistributionWidget(
|
|
193
|
-
id: string,
|
|
194
|
-
scope: common.CommonConstruct,
|
|
195
|
-
props: any,
|
|
196
|
-
distributionId: string
|
|
197
|
-
) {
|
|
192
|
+
public createCloudfrontDistributionWidget(id: string, scope: CommonConstruct, props: any, distributionId: string) {
|
|
198
193
|
if (!props) throw `Widget props undefined for ${id}`
|
|
199
194
|
const metricProps: any[] = props.metricProps
|
|
200
195
|
return this.createWidget(id, scope, {
|
|
@@ -208,11 +203,11 @@ export class CloudWatchManager {
|
|
|
208
203
|
/**
|
|
209
204
|
* @summary Method to create a step function widget
|
|
210
205
|
* @param {string} id scoped id of the resource
|
|
211
|
-
* @param {
|
|
212
|
-
* @param {
|
|
206
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
207
|
+
* @param {TextWidgetProps} props
|
|
213
208
|
* @param {string} stateMachineArn the step function arn
|
|
214
209
|
*/
|
|
215
|
-
public createStateWidget(id: string, scope:
|
|
210
|
+
public createStateWidget(id: string, scope: CommonConstruct, props: any, stateMachineArn: string) {
|
|
216
211
|
if (!props) throw `Widget props undefined for ${id}`
|
|
217
212
|
const metricProps: any[] = props.metricProps
|
|
218
213
|
return this.createWidget(id, scope, {
|
|
@@ -226,18 +221,12 @@ export class CloudWatchManager {
|
|
|
226
221
|
/**
|
|
227
222
|
* @summary Method to create an event widget
|
|
228
223
|
* @param {string} id scoped id of the resource
|
|
229
|
-
* @param {
|
|
230
|
-
* @param {
|
|
224
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
225
|
+
* @param {TextWidgetProps} props
|
|
231
226
|
* @param {string} eventBusName the event bus name
|
|
232
227
|
* @param {string} ruleName the event rule name
|
|
233
228
|
*/
|
|
234
|
-
public createEventWidget(
|
|
235
|
-
id: string,
|
|
236
|
-
scope: common.CommonConstruct,
|
|
237
|
-
props: any,
|
|
238
|
-
eventBusName: string,
|
|
239
|
-
ruleName: string
|
|
240
|
-
) {
|
|
229
|
+
public createEventWidget(id: string, scope: CommonConstruct, props: any, eventBusName: string, ruleName: string) {
|
|
241
230
|
if (!props) throw `Widget props undefined for ${id}`
|
|
242
231
|
const metricProps: any[] = props.metricProps
|
|
243
232
|
return this.createWidget(id, scope, {
|
|
@@ -254,11 +243,11 @@ export class CloudWatchManager {
|
|
|
254
243
|
/**
|
|
255
244
|
* @summary Method to create an api gateway widget
|
|
256
245
|
* @param {string} id scoped id of the resource
|
|
257
|
-
* @param {
|
|
258
|
-
* @param {
|
|
246
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
247
|
+
* @param {TextWidgetProps} props
|
|
259
248
|
* @param {string} apiName the api name
|
|
260
249
|
*/
|
|
261
|
-
public createApiGatewayWidget(id: string, scope:
|
|
250
|
+
public createApiGatewayWidget(id: string, scope: CommonConstruct, props: any, apiName: string) {
|
|
262
251
|
if (!props) throw `Widget props undefined for ${id}`
|
|
263
252
|
const metricProps: any[] = props.metricProps
|
|
264
253
|
return this.createWidget(id, scope, {
|
|
@@ -272,11 +261,11 @@ export class CloudWatchManager {
|
|
|
272
261
|
/**
|
|
273
262
|
* @summary Method to create a lambda function widget
|
|
274
263
|
* @param {string} id scoped id of the resource
|
|
275
|
-
* @param {
|
|
276
|
-
* @param {
|
|
264
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
265
|
+
* @param {TextWidgetProps} props
|
|
277
266
|
* @param {string} functionName the lambda function name
|
|
278
267
|
*/
|
|
279
|
-
public createLambdaWidget(id: string, scope:
|
|
268
|
+
public createLambdaWidget(id: string, scope: CommonConstruct, props: any, functionName: string) {
|
|
280
269
|
if (!props) throw `Widget props undefined for ${id}`
|
|
281
270
|
const metricProps: any[] = props.metricProps
|
|
282
271
|
return this.createWidget(id, scope, {
|
|
@@ -290,11 +279,11 @@ export class CloudWatchManager {
|
|
|
290
279
|
/**
|
|
291
280
|
* @summary Method to create a custom widget
|
|
292
281
|
* @param {string} id scoped id of the resource
|
|
293
|
-
* @param {
|
|
294
|
-
* @param {
|
|
282
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
283
|
+
* @param {TextWidgetProps} props
|
|
295
284
|
* @param {string} service the service identifier
|
|
296
285
|
*/
|
|
297
|
-
public createCustomWidget(id: string, scope:
|
|
286
|
+
public createCustomWidget(id: string, scope: CommonConstruct, props: any, service: string) {
|
|
298
287
|
if (!props) throw `Widget props undefined for ${id}`
|
|
299
288
|
const metricProps: any[] = props.metricProps
|
|
300
289
|
return this.createWidget(id, scope, {
|
|
@@ -308,11 +297,11 @@ export class CloudWatchManager {
|
|
|
308
297
|
/**
|
|
309
298
|
* @summary Method to create an ecs cluster widget
|
|
310
299
|
* @param {string} id scoped id of the resource
|
|
311
|
-
* @param {
|
|
312
|
-
* @param {
|
|
300
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
301
|
+
* @param {TextWidgetProps} props
|
|
313
302
|
* @param {string} clusterName the ecs cluster name
|
|
314
303
|
*/
|
|
315
|
-
public createEcsClusterWidget(id: string, scope:
|
|
304
|
+
public createEcsClusterWidget(id: string, scope: CommonConstruct, props: any, clusterName: string) {
|
|
316
305
|
if (!props) throw `Widget props undefined for ${id}`
|
|
317
306
|
const metricProps: any[] = props.metricProps
|
|
318
307
|
return this.createWidget(id, scope, {
|
|
@@ -326,14 +315,14 @@ export class CloudWatchManager {
|
|
|
326
315
|
/**
|
|
327
316
|
* @summary Method to create an ecs service widget
|
|
328
317
|
* @param {string} id scoped id of the resource
|
|
329
|
-
* @param {
|
|
330
|
-
* @param {
|
|
318
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
319
|
+
* @param {TextWidgetProps} props
|
|
331
320
|
* @param {string} clusterName the ecs cluster name
|
|
332
321
|
* @param {string} serviceName the ecs service name
|
|
333
322
|
*/
|
|
334
323
|
public createEcsServiceWidget(
|
|
335
324
|
id: string,
|
|
336
|
-
scope:
|
|
325
|
+
scope: CommonConstruct,
|
|
337
326
|
props: any,
|
|
338
327
|
clusterName: string,
|
|
339
328
|
serviceName: string
|
|
@@ -354,11 +343,11 @@ export class CloudWatchManager {
|
|
|
354
343
|
/**
|
|
355
344
|
* @summary Method to create an elb widget
|
|
356
345
|
* @param {string} id scoped id of the resource
|
|
357
|
-
* @param {
|
|
358
|
-
* @param {
|
|
346
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
347
|
+
* @param {TextWidgetProps} props
|
|
359
348
|
* @param {string} loadBalancer the loadbalancer reference
|
|
360
349
|
*/
|
|
361
|
-
public createElbWidget(id: string, scope:
|
|
350
|
+
public createElbWidget(id: string, scope: CommonConstruct, props: any, loadBalancer: string) {
|
|
362
351
|
if (!props) throw `Widget props undefined for ${id}`
|
|
363
352
|
const metricProps: any[] = props.metricProps
|
|
364
353
|
return this.createWidget(id, scope, {
|
|
@@ -372,11 +361,11 @@ export class CloudWatchManager {
|
|
|
372
361
|
/**
|
|
373
362
|
* @summary Method to create an elasticache widget
|
|
374
363
|
* @param {string} id scoped id of the resource
|
|
375
|
-
* @param {
|
|
376
|
-
* @param {
|
|
364
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
365
|
+
* @param {TextWidgetProps} props
|
|
377
366
|
* @param {string} cacheClusterId the elasticache cluster id
|
|
378
367
|
*/
|
|
379
|
-
public createCacheWidget(id: string, scope:
|
|
368
|
+
public createCacheWidget(id: string, scope: CommonConstruct, props: any, cacheClusterId: string) {
|
|
380
369
|
if (!props) throw `Widget props undefined for ${id}`
|
|
381
370
|
const metricProps: any[] = props.metricProps
|
|
382
371
|
return this.createWidget(id, scope, {
|
|
@@ -390,10 +379,10 @@ export class CloudWatchManager {
|
|
|
390
379
|
/**
|
|
391
380
|
* @summary Method to create a cloudwatch text widget
|
|
392
381
|
* @param {string} id scoped id of the resource
|
|
393
|
-
* @param {
|
|
394
|
-
* @param {
|
|
382
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
383
|
+
* @param {TextWidgetProps} props
|
|
395
384
|
*/
|
|
396
|
-
public createTextWidget(id: string, scope:
|
|
385
|
+
public createTextWidget(id: string, scope: CommonConstruct, props: TextWidgetProps) {
|
|
397
386
|
if (!props) throw `Widget props undefined for ${id}`
|
|
398
387
|
const widget = new watch.TextWidget({
|
|
399
388
|
markdown: props.markdown,
|
|
@@ -409,16 +398,11 @@ export class CloudWatchManager {
|
|
|
409
398
|
/**
|
|
410
399
|
* @summary Method to create a cloudwatch numeric widget
|
|
411
400
|
* @param {string} id scoped id of the resource
|
|
412
|
-
* @param {
|
|
413
|
-
* @param {
|
|
401
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
402
|
+
* @param {NumericWidgetProps} props
|
|
414
403
|
* @param metrics
|
|
415
404
|
*/
|
|
416
|
-
public createSingleValueWidget(
|
|
417
|
-
id: string,
|
|
418
|
-
scope: common.CommonConstruct,
|
|
419
|
-
props: types.NumericWidgetProps,
|
|
420
|
-
metrics: IMetric[]
|
|
421
|
-
) {
|
|
405
|
+
public createSingleValueWidget(id: string, scope: CommonConstruct, props: NumericWidgetProps, metrics: IMetric[]) {
|
|
422
406
|
if (!props) throw `Widget props undefined for ${id}`
|
|
423
407
|
const widget = new watch.SingleValueWidget({
|
|
424
408
|
region: props.region ?? scope.props.region,
|
|
@@ -439,16 +423,11 @@ export class CloudWatchManager {
|
|
|
439
423
|
/**
|
|
440
424
|
* @summary Method to create a cloudwatch guage widget
|
|
441
425
|
* @param {string} id scoped id of the resource
|
|
442
|
-
* @param {
|
|
443
|
-
* @param {
|
|
426
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
427
|
+
* @param {GuageWidgetProps} props
|
|
444
428
|
* @param metrics
|
|
445
429
|
*/
|
|
446
|
-
public createGuageWidget(
|
|
447
|
-
id: string,
|
|
448
|
-
scope: common.CommonConstruct,
|
|
449
|
-
props: types.GuageWidgetProps,
|
|
450
|
-
metrics: IMetric[]
|
|
451
|
-
) {
|
|
430
|
+
public createGuageWidget(id: string, scope: CommonConstruct, props: GuageWidgetProps, metrics: IMetric[]) {
|
|
452
431
|
if (!props) throw `Widget props undefined for ${id}`
|
|
453
432
|
const widget = new watch.GaugeWidget({
|
|
454
433
|
region: props.region ?? scope.props.region,
|
|
@@ -469,15 +448,15 @@ export class CloudWatchManager {
|
|
|
469
448
|
/**
|
|
470
449
|
* @summary Method to create a cloudwatch graph widget
|
|
471
450
|
* @param {string} id scoped id of the resource
|
|
472
|
-
* @param {
|
|
473
|
-
* @param {
|
|
451
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
452
|
+
* @param {GraphWidgetProps} props
|
|
474
453
|
* @param leftYMetrics
|
|
475
454
|
* @param rightYMetrics
|
|
476
455
|
*/
|
|
477
456
|
public createGraphWidget(
|
|
478
457
|
id: string,
|
|
479
|
-
scope:
|
|
480
|
-
props:
|
|
458
|
+
scope: CommonConstruct,
|
|
459
|
+
props: GraphWidgetProps,
|
|
481
460
|
leftYMetrics?: IMetric[],
|
|
482
461
|
rightYMetrics?: IMetric[]
|
|
483
462
|
) {
|
|
@@ -507,14 +486,14 @@ export class CloudWatchManager {
|
|
|
507
486
|
/**
|
|
508
487
|
* @summary Method to create a cloudwatch alarm status widget
|
|
509
488
|
* @param {string} id scoped id of the resource
|
|
510
|
-
* @param {
|
|
511
|
-
* @param {
|
|
489
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
490
|
+
* @param {AlarmStatusWidgetProps} props
|
|
512
491
|
* @param {watch.IAlarm[]} alarms
|
|
513
492
|
*/
|
|
514
493
|
public createAlarmStatusWidget(
|
|
515
494
|
id: string,
|
|
516
|
-
scope:
|
|
517
|
-
props:
|
|
495
|
+
scope: CommonConstruct,
|
|
496
|
+
props: AlarmStatusWidgetProps,
|
|
518
497
|
alarms: watch.IAlarm[]
|
|
519
498
|
) {
|
|
520
499
|
if (!props) throw `Widget props undefined for ${id}`
|
|
@@ -533,16 +512,11 @@ export class CloudWatchManager {
|
|
|
533
512
|
/**
|
|
534
513
|
* @summary Method to create a cloudwatch log query widget
|
|
535
514
|
* @param {string} id scoped id of the resource
|
|
536
|
-
* @param {
|
|
537
|
-
* @param {
|
|
515
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
516
|
+
* @param {LogQueryWidgetProps} props
|
|
538
517
|
* @param {string[]} logGroupNames
|
|
539
518
|
*/
|
|
540
|
-
public createLogQueryWidget(
|
|
541
|
-
id: string,
|
|
542
|
-
scope: common.CommonConstruct,
|
|
543
|
-
props: types.LogQueryWidgetProps,
|
|
544
|
-
logGroupNames: string[]
|
|
545
|
-
) {
|
|
519
|
+
public createLogQueryWidget(id: string, scope: CommonConstruct, props: LogQueryWidgetProps, logGroupNames: string[]) {
|
|
546
520
|
if (!props) throw `Widget props undefined for ${id}`
|
|
547
521
|
const widget = new watch.LogQueryWidget({
|
|
548
522
|
region: props.region ?? scope.props.region,
|
|
@@ -562,13 +536,13 @@ export class CloudWatchManager {
|
|
|
562
536
|
|
|
563
537
|
/**
|
|
564
538
|
* @summary Utility method to determine the metrics and dimensions
|
|
565
|
-
* @param {
|
|
566
|
-
* @param {
|
|
539
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
540
|
+
* @param {MetricProps[]} metricProps
|
|
567
541
|
*/
|
|
568
|
-
private determineMetrics(scope:
|
|
542
|
+
private determineMetrics(scope: CommonConstruct, metricProps: MetricProps[]) {
|
|
569
543
|
const metrics: watch.IMetric[] = []
|
|
570
544
|
if (metricProps) {
|
|
571
|
-
metricProps.forEach((metricProp:
|
|
545
|
+
metricProps.forEach((metricProp: MetricProps) => {
|
|
572
546
|
let metricDimensions: watch.DimensionHash = metricProp.dimensionsMap || {}
|
|
573
547
|
if (metricProp.functionName) {
|
|
574
548
|
metricDimensions = {
|
|
@@ -705,10 +679,10 @@ export class CloudWatchManager {
|
|
|
705
679
|
/**
|
|
706
680
|
* @summary Utility method to determine the configured alarms
|
|
707
681
|
* @param {string} id scoped id of the resource
|
|
708
|
-
* @param {
|
|
682
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
709
683
|
* @param {watch.AlarmProps[]} alarmProps
|
|
710
684
|
*/
|
|
711
|
-
private determineAlarms(id: string, scope:
|
|
685
|
+
private determineAlarms(id: string, scope: CommonConstruct, alarmProps: watch.AlarmProps[]) {
|
|
712
686
|
const alarms: watch.IAlarm[] = []
|
|
713
687
|
if (alarmProps) {
|
|
714
688
|
alarmProps.forEach((alarmProp: watch.AlarmProps) => {
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import * as watch from 'aws-cdk-lib/aws-cloudwatch'
|
|
2
|
+
import * as logs from 'aws-cdk-lib/aws-logs'
|
|
3
|
+
import { TagProps } from '../../../types'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @category cdk-utils.cloudwatch-manager
|
|
7
|
+
* @subcategory Properties
|
|
8
|
+
*/
|
|
9
|
+
export interface AlarmProps extends watch.AlarmProps {
|
|
10
|
+
expression?: string
|
|
11
|
+
metricProps?: MetricProps[]
|
|
12
|
+
periodInSecs?: number
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @category cdk-utils.cloudwatch-manager
|
|
17
|
+
* @subcategory Properties
|
|
18
|
+
*/
|
|
19
|
+
export interface DashboardProps extends watch.DashboardProps {}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @category cdk-utils.cloudwatch-manager
|
|
23
|
+
* @subcategory Properties
|
|
24
|
+
*/
|
|
25
|
+
export interface MetricProps extends watch.MetricProps {
|
|
26
|
+
stageSuffix: boolean
|
|
27
|
+
periodInSecs?: number
|
|
28
|
+
functionName?: string
|
|
29
|
+
dbClusterIdentifier?: string
|
|
30
|
+
distributionId?: string
|
|
31
|
+
loadBalancer?: string
|
|
32
|
+
serviceName?: string
|
|
33
|
+
clusterName?: string
|
|
34
|
+
apiName?: string
|
|
35
|
+
cacheClusterId?: string
|
|
36
|
+
stateMachineArn?: string
|
|
37
|
+
eventBusName?: string
|
|
38
|
+
ruleName?: string
|
|
39
|
+
service?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @category cdk-utils.cloudwatch-manager
|
|
44
|
+
* @subcategory Properties
|
|
45
|
+
*/
|
|
46
|
+
export interface TextWidgetProps extends watch.TextWidgetProps {
|
|
47
|
+
type: string
|
|
48
|
+
positionX: number
|
|
49
|
+
positionY: number
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @category cdk-utils.cloudwatch-manager
|
|
54
|
+
* @subcategory Properties
|
|
55
|
+
*/
|
|
56
|
+
export interface NumericWidgetProps extends watch.SingleValueWidgetProps {
|
|
57
|
+
type: string
|
|
58
|
+
positionX: number
|
|
59
|
+
positionY: number
|
|
60
|
+
metricProps: watch.MetricProps[]
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @category cdk-utils.cloudwatch-manager
|
|
65
|
+
* @subcategory Properties
|
|
66
|
+
*/
|
|
67
|
+
export interface GuageWidgetProps extends watch.GaugeWidgetProps {
|
|
68
|
+
type: string
|
|
69
|
+
positionX: number
|
|
70
|
+
positionY: number
|
|
71
|
+
metricProps: watch.MetricProps[]
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @category cdk-utils.cloudwatch-manager
|
|
76
|
+
* @subcategory Properties
|
|
77
|
+
*/
|
|
78
|
+
export interface GraphWidgetProps extends watch.GraphWidgetProps {
|
|
79
|
+
type: string
|
|
80
|
+
positionX: number
|
|
81
|
+
positionY: number
|
|
82
|
+
metricProps: MetricProps[]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @category cdk-utils.cloudwatch-manager
|
|
87
|
+
* @subcategory Properties
|
|
88
|
+
*/
|
|
89
|
+
export interface AlarmStatusWidgetProps extends watch.AlarmStatusWidgetProps {
|
|
90
|
+
type: string
|
|
91
|
+
positionX: number
|
|
92
|
+
positionY: number
|
|
93
|
+
alarmProps: watch.AlarmProps[]
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @category cdk-utils.cloudwatch-manager
|
|
98
|
+
* @subcategory Properties
|
|
99
|
+
*/
|
|
100
|
+
export interface LogQueryWidgetProps extends watch.LogQueryWidgetProps {
|
|
101
|
+
type: string
|
|
102
|
+
positionX: number
|
|
103
|
+
positionY: number
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @category cdk-utils.cloudwatch-manager
|
|
108
|
+
* @subcategory Properties
|
|
109
|
+
*/
|
|
110
|
+
export interface MetricFilterProps extends logs.MetricFilterProps {
|
|
111
|
+
periodInSecs: number
|
|
112
|
+
options: watch.MetricOptions
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @category cdk-utils.cloudwatch-manager
|
|
117
|
+
* @subcategory Properties
|
|
118
|
+
*/
|
|
119
|
+
export interface LogProps extends logs.LogGroupProps {
|
|
120
|
+
tags?: TagProps[]
|
|
121
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './main'
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as cdk from 'aws-cdk-lib'
|
|
2
2
|
import * as codebuild from 'aws-cdk-lib/aws-codebuild'
|
|
3
|
-
import
|
|
3
|
+
import { CommonConstruct } from '../../../common'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @stability stable
|
|
7
7
|
* @category cdk-utils.codebuild-manager
|
|
8
8
|
* @subcategory Construct
|
|
9
9
|
* @classdesc Provides operations on AWS Code Build.
|
|
10
|
-
* - A new instance of this class is injected into {@link
|
|
11
|
-
* - If a custom construct extends {@link
|
|
10
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
11
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
12
12
|
* @example
|
|
13
|
-
* import {
|
|
13
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
14
14
|
*
|
|
15
|
-
* class CustomConstruct extends
|
|
15
|
+
* class CustomConstruct extends CommonConstruct {
|
|
16
16
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
17
17
|
* super(parent, id, props)
|
|
18
18
|
* this.props = props
|
|
@@ -29,7 +29,7 @@ export class CodeBuildManager {
|
|
|
29
29
|
* @param scope
|
|
30
30
|
* @param dockerfilePath
|
|
31
31
|
*/
|
|
32
|
-
public createImageForCloudfrontInvalidation(id: string, scope:
|
|
32
|
+
public createImageForCloudfrontInvalidation(id: string, scope: CommonConstruct, dockerfilePath: string) {
|
|
33
33
|
return scope.ecrManager.createDockerImage(`${id}-build-image`, scope, dockerfilePath)
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -43,7 +43,7 @@ export class CodeBuildManager {
|
|
|
43
43
|
*/
|
|
44
44
|
public createProjectForCloudfrontInvalidation(
|
|
45
45
|
id: string,
|
|
46
|
-
scope:
|
|
46
|
+
scope: CommonConstruct,
|
|
47
47
|
dockerFilepath: string,
|
|
48
48
|
distributionId: string,
|
|
49
49
|
paths?: string
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'
|
|
2
|
-
import * as
|
|
3
|
-
import * as types from '../../types'
|
|
4
|
-
import * as utils from '../../utils'
|
|
2
|
+
import * as utils from '../../../utils'
|
|
5
3
|
import * as cdk from 'aws-cdk-lib'
|
|
4
|
+
import { CommonConstruct } from '../../../common'
|
|
5
|
+
import { TableProps } from './types'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @stability stable
|
|
9
9
|
* @category cdk-utils.dynamodb-manager
|
|
10
10
|
* @subcategory Construct
|
|
11
11
|
* @classdesc Provides operations on AWS DynamoDB.
|
|
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
15
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
16
16
|
*
|
|
@@ -28,10 +28,10 @@ export class DynamodbManager {
|
|
|
28
28
|
/**
|
|
29
29
|
* @summary Method to create a table
|
|
30
30
|
* @param {string} id scoped id of the resource
|
|
31
|
-
* @param {
|
|
32
|
-
* @param {
|
|
31
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
32
|
+
* @param {TableProps} props table props
|
|
33
33
|
*/
|
|
34
|
-
public createTable(id: string, scope:
|
|
34
|
+
public createTable(id: string, scope: CommonConstruct, props: TableProps) {
|
|
35
35
|
if (!props) throw `Table props undefined for ${id}`
|
|
36
36
|
|
|
37
37
|
const table = new dynamodb.Table(scope, `${id}`, {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'
|
|
2
|
+
import { TagProps } from '../../../types'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @category cdk-utils.dynamodb-manager
|
|
6
|
+
* @subcategory Properties
|
|
7
|
+
*/
|
|
8
|
+
export interface TableProps extends dynamodb.TableProps {
|
|
9
|
+
tags?: TagProps[]
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './main'
|