@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,18 +1,18 @@
|
|
|
1
1
|
import * as cdk from 'aws-cdk-lib';
|
|
2
2
|
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { CommonConstruct } from '../../../common';
|
|
4
|
+
import { LogProps, MetricFilterProps } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* @stability stable
|
|
7
7
|
* @category cdk-utils.cloudwatch-manager
|
|
8
8
|
* @subcategory Construct
|
|
9
9
|
* @classdesc Provides operations on AWS CloudWatch.
|
|
10
|
-
* - A new instance of this class is injected into {@link
|
|
11
|
-
* - If a custom construct extends {@link
|
|
10
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
11
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
12
12
|
* @example
|
|
13
|
-
* import
|
|
13
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
14
14
|
*
|
|
15
|
-
* class CustomConstruct extends
|
|
15
|
+
* class CustomConstruct extends CommonConstruct {
|
|
16
16
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
17
17
|
* super(parent, id, props)
|
|
18
18
|
* this.props = props
|
|
@@ -26,26 +26,26 @@ export declare class LogManager {
|
|
|
26
26
|
/**
|
|
27
27
|
* @summary Method to create a cloudwatch metric filter
|
|
28
28
|
* @param {string} id scoped id of the resource
|
|
29
|
-
* @param {
|
|
30
|
-
* @param {
|
|
29
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
30
|
+
* @param {MetricFilterProps} props
|
|
31
31
|
* @param {logs.ILogGroup} logGroup
|
|
32
32
|
*/
|
|
33
|
-
createMetricFilter(id: string, scope:
|
|
33
|
+
createMetricFilter(id: string, scope: CommonConstruct, props: MetricFilterProps, logGroup: logs.ILogGroup): {
|
|
34
34
|
metricFilter: cdk.aws_logs.MetricFilter;
|
|
35
35
|
metric: cdk.aws_cloudwatch.Metric;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* @summary Method to create a cloudwatch log group (cfn)
|
|
39
39
|
* @param {string} id scoped id of the resource
|
|
40
|
-
* @param {
|
|
41
|
-
* @param {
|
|
40
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
41
|
+
* @param {LogProps} props
|
|
42
42
|
*/
|
|
43
|
-
createCfnLogGroup(id: string, scope:
|
|
43
|
+
createCfnLogGroup(id: string, scope: CommonConstruct, props: LogProps): cdk.aws_logs.CfnLogGroup;
|
|
44
44
|
/**
|
|
45
45
|
* @summary Method to create a cloudwatch log group
|
|
46
46
|
* @param {string} id scoped id of the resource
|
|
47
|
-
* @param {
|
|
48
|
-
* @param {
|
|
47
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
48
|
+
* @param {LogProps} props
|
|
49
49
|
*/
|
|
50
|
-
createLogGroup(id: string, scope:
|
|
50
|
+
createLogGroup(id: string, scope: CommonConstruct, props: LogProps): cdk.aws_logs.LogGroup;
|
|
51
51
|
}
|
|
@@ -26,18 +26,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.LogManager = void 0;
|
|
27
27
|
const cdk = __importStar(require("aws-cdk-lib"));
|
|
28
28
|
const logs = __importStar(require("aws-cdk-lib/aws-logs"));
|
|
29
|
-
const utils = __importStar(require("
|
|
29
|
+
const utils = __importStar(require("../../../utils"));
|
|
30
30
|
/**
|
|
31
31
|
* @stability stable
|
|
32
32
|
* @category cdk-utils.cloudwatch-manager
|
|
33
33
|
* @subcategory Construct
|
|
34
34
|
* @classdesc Provides operations on AWS CloudWatch.
|
|
35
|
-
* - A new instance of this class is injected into {@link
|
|
36
|
-
* - If a custom construct extends {@link
|
|
35
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
36
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
37
37
|
* @example
|
|
38
|
-
* import
|
|
38
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
39
39
|
*
|
|
40
|
-
* class CustomConstruct extends
|
|
40
|
+
* class CustomConstruct extends CommonConstruct {
|
|
41
41
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
42
42
|
* super(parent, id, props)
|
|
43
43
|
* this.props = props
|
|
@@ -51,8 +51,8 @@ class LogManager {
|
|
|
51
51
|
/**
|
|
52
52
|
* @summary Method to create a cloudwatch metric filter
|
|
53
53
|
* @param {string} id scoped id of the resource
|
|
54
|
-
* @param {
|
|
55
|
-
* @param {
|
|
54
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
55
|
+
* @param {MetricFilterProps} props
|
|
56
56
|
* @param {logs.ILogGroup} logGroup
|
|
57
57
|
*/
|
|
58
58
|
createMetricFilter(id, scope, props, logGroup) {
|
|
@@ -78,8 +78,8 @@ class LogManager {
|
|
|
78
78
|
/**
|
|
79
79
|
* @summary Method to create a cloudwatch log group (cfn)
|
|
80
80
|
* @param {string} id scoped id of the resource
|
|
81
|
-
* @param {
|
|
82
|
-
* @param {
|
|
81
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
82
|
+
* @param {LogProps} props
|
|
83
83
|
*/
|
|
84
84
|
createCfnLogGroup(id, scope, props) {
|
|
85
85
|
if (!props)
|
|
@@ -100,8 +100,8 @@ class LogManager {
|
|
|
100
100
|
/**
|
|
101
101
|
* @summary Method to create a cloudwatch log group
|
|
102
102
|
* @param {string} id scoped id of the resource
|
|
103
|
-
* @param {
|
|
104
|
-
* @param {
|
|
103
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
104
|
+
* @param {LogProps} props
|
|
105
105
|
*/
|
|
106
106
|
createLogGroup(id, scope, props) {
|
|
107
107
|
if (!props)
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import * as cdk from 'aws-cdk-lib';
|
|
2
|
+
import * as watch from 'aws-cdk-lib/aws-cloudwatch';
|
|
3
|
+
import { IMetric } from 'aws-cdk-lib/aws-cloudwatch';
|
|
4
|
+
import { CommonConstruct } from '../../../common';
|
|
5
|
+
import { AlarmProps, AlarmStatusWidgetProps, DashboardProps, GraphWidgetProps, GuageWidgetProps, LogQueryWidgetProps, NumericWidgetProps, TextWidgetProps } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* @stability stable
|
|
8
|
+
* @category cdk-utils.cloudwatch-manager
|
|
9
|
+
* @subcategory Construct
|
|
10
|
+
* @classdesc Provides operations on AWS CloudWatch.
|
|
11
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
12
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
13
|
+
* @example
|
|
14
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
15
|
+
*
|
|
16
|
+
* class CustomConstruct extends CommonConstruct {
|
|
17
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
18
|
+
* super(parent, id, props)
|
|
19
|
+
* this.props = props
|
|
20
|
+
* this.cloudWatchManager.createAlarmForMetric('MyAlarm', this, metric)
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* @see [CDK CloudWatch Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch-readme.html}
|
|
25
|
+
*/
|
|
26
|
+
export declare class CloudWatchManager {
|
|
27
|
+
/**
|
|
28
|
+
* @summary Method to create a cloudwatch alarm for a given expression
|
|
29
|
+
* @param {string} id scoped id of the resource
|
|
30
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
31
|
+
* @param {AlarmProps} props
|
|
32
|
+
*/
|
|
33
|
+
createAlarmForExpression(id: string, scope: CommonConstruct, props: AlarmProps): cdk.aws_cloudwatch.Alarm;
|
|
34
|
+
/**
|
|
35
|
+
* @summary Method to create a cloudwatch alarm for a given metric
|
|
36
|
+
* @param {string} id scoped id of the resource
|
|
37
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
38
|
+
* @param {AlarmProps} props
|
|
39
|
+
* @param metric
|
|
40
|
+
*/
|
|
41
|
+
createAlarmForMetric(id: string, scope: CommonConstruct, props: AlarmProps, metric: watch.Metric): cdk.aws_cloudwatch.Alarm;
|
|
42
|
+
/**
|
|
43
|
+
* @summary Method to create a cloudwatch dashboard
|
|
44
|
+
* @param {string} id scoped id of the resource
|
|
45
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
46
|
+
* @param {DashboardProps} props
|
|
47
|
+
* @param widgets
|
|
48
|
+
*/
|
|
49
|
+
createDashboard(id: string, scope: CommonConstruct, props: DashboardProps, widgets?: watch.IWidget[][]): cdk.aws_cloudwatch.Dashboard;
|
|
50
|
+
/**
|
|
51
|
+
* @summary Method to create cloudwatch widgets
|
|
52
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
53
|
+
* @param props
|
|
54
|
+
*/
|
|
55
|
+
createWidgets(scope: CommonConstruct, props: any[]): any;
|
|
56
|
+
/**
|
|
57
|
+
* @summary Method to create a cloudwatch widget
|
|
58
|
+
* @param {string} id scoped id of the resource
|
|
59
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
60
|
+
* @param props
|
|
61
|
+
*/
|
|
62
|
+
createWidget(id: string, scope: CommonConstruct, props: any): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
63
|
+
/**
|
|
64
|
+
* @summary Method to create a cloudfront distribution widget
|
|
65
|
+
* @param {string} id scoped id of the resource
|
|
66
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
67
|
+
* @param {TextWidgetProps} props
|
|
68
|
+
* @param {string} distributionId the cloudfront distribution id
|
|
69
|
+
*/
|
|
70
|
+
createCloudfrontDistributionWidget(id: string, scope: CommonConstruct, props: any, distributionId: string): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
71
|
+
/**
|
|
72
|
+
* @summary Method to create a step function widget
|
|
73
|
+
* @param {string} id scoped id of the resource
|
|
74
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
75
|
+
* @param {TextWidgetProps} props
|
|
76
|
+
* @param {string} stateMachineArn the step function arn
|
|
77
|
+
*/
|
|
78
|
+
createStateWidget(id: string, scope: CommonConstruct, props: any, stateMachineArn: string): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
79
|
+
/**
|
|
80
|
+
* @summary Method to create an event widget
|
|
81
|
+
* @param {string} id scoped id of the resource
|
|
82
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
83
|
+
* @param {TextWidgetProps} props
|
|
84
|
+
* @param {string} eventBusName the event bus name
|
|
85
|
+
* @param {string} ruleName the event rule name
|
|
86
|
+
*/
|
|
87
|
+
createEventWidget(id: string, scope: CommonConstruct, props: any, eventBusName: string, ruleName: string): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
88
|
+
/**
|
|
89
|
+
* @summary Method to create an api gateway widget
|
|
90
|
+
* @param {string} id scoped id of the resource
|
|
91
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
92
|
+
* @param {TextWidgetProps} props
|
|
93
|
+
* @param {string} apiName the api name
|
|
94
|
+
*/
|
|
95
|
+
createApiGatewayWidget(id: string, scope: CommonConstruct, props: any, apiName: string): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
96
|
+
/**
|
|
97
|
+
* @summary Method to create a lambda function widget
|
|
98
|
+
* @param {string} id scoped id of the resource
|
|
99
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
100
|
+
* @param {TextWidgetProps} props
|
|
101
|
+
* @param {string} functionName the lambda function name
|
|
102
|
+
*/
|
|
103
|
+
createLambdaWidget(id: string, scope: CommonConstruct, props: any, functionName: string): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
104
|
+
/**
|
|
105
|
+
* @summary Method to create a custom widget
|
|
106
|
+
* @param {string} id scoped id of the resource
|
|
107
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
108
|
+
* @param {TextWidgetProps} props
|
|
109
|
+
* @param {string} service the service identifier
|
|
110
|
+
*/
|
|
111
|
+
createCustomWidget(id: string, scope: CommonConstruct, props: any, service: string): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
112
|
+
/**
|
|
113
|
+
* @summary Method to create an ecs cluster widget
|
|
114
|
+
* @param {string} id scoped id of the resource
|
|
115
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
116
|
+
* @param {TextWidgetProps} props
|
|
117
|
+
* @param {string} clusterName the ecs cluster name
|
|
118
|
+
*/
|
|
119
|
+
createEcsClusterWidget(id: string, scope: CommonConstruct, props: any, clusterName: string): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
120
|
+
/**
|
|
121
|
+
* @summary Method to create an ecs service widget
|
|
122
|
+
* @param {string} id scoped id of the resource
|
|
123
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
124
|
+
* @param {TextWidgetProps} props
|
|
125
|
+
* @param {string} clusterName the ecs cluster name
|
|
126
|
+
* @param {string} serviceName the ecs service name
|
|
127
|
+
*/
|
|
128
|
+
createEcsServiceWidget(id: string, scope: CommonConstruct, props: any, clusterName: string, serviceName: string): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
129
|
+
/**
|
|
130
|
+
* @summary Method to create an elb widget
|
|
131
|
+
* @param {string} id scoped id of the resource
|
|
132
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
133
|
+
* @param {TextWidgetProps} props
|
|
134
|
+
* @param {string} loadBalancer the loadbalancer reference
|
|
135
|
+
*/
|
|
136
|
+
createElbWidget(id: string, scope: CommonConstruct, props: any, loadBalancer: string): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
137
|
+
/**
|
|
138
|
+
* @summary Method to create an elasticache widget
|
|
139
|
+
* @param {string} id scoped id of the resource
|
|
140
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
141
|
+
* @param {TextWidgetProps} props
|
|
142
|
+
* @param {string} cacheClusterId the elasticache cluster id
|
|
143
|
+
*/
|
|
144
|
+
createCacheWidget(id: string, scope: CommonConstruct, props: any, cacheClusterId: string): cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.LogQueryWidget | cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
145
|
+
/**
|
|
146
|
+
* @summary Method to create a cloudwatch text widget
|
|
147
|
+
* @param {string} id scoped id of the resource
|
|
148
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
149
|
+
* @param {TextWidgetProps} props
|
|
150
|
+
*/
|
|
151
|
+
createTextWidget(id: string, scope: CommonConstruct, props: TextWidgetProps): cdk.aws_cloudwatch.TextWidget;
|
|
152
|
+
/**
|
|
153
|
+
* @summary Method to create a cloudwatch numeric widget
|
|
154
|
+
* @param {string} id scoped id of the resource
|
|
155
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
156
|
+
* @param {NumericWidgetProps} props
|
|
157
|
+
* @param metrics
|
|
158
|
+
*/
|
|
159
|
+
createSingleValueWidget(id: string, scope: CommonConstruct, props: NumericWidgetProps, metrics: IMetric[]): cdk.aws_cloudwatch.SingleValueWidget;
|
|
160
|
+
/**
|
|
161
|
+
* @summary Method to create a cloudwatch guage widget
|
|
162
|
+
* @param {string} id scoped id of the resource
|
|
163
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
164
|
+
* @param {GuageWidgetProps} props
|
|
165
|
+
* @param metrics
|
|
166
|
+
*/
|
|
167
|
+
createGuageWidget(id: string, scope: CommonConstruct, props: GuageWidgetProps, metrics: IMetric[]): cdk.aws_cloudwatch.GaugeWidget;
|
|
168
|
+
/**
|
|
169
|
+
* @summary Method to create a cloudwatch graph widget
|
|
170
|
+
* @param {string} id scoped id of the resource
|
|
171
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
172
|
+
* @param {GraphWidgetProps} props
|
|
173
|
+
* @param leftYMetrics
|
|
174
|
+
* @param rightYMetrics
|
|
175
|
+
*/
|
|
176
|
+
createGraphWidget(id: string, scope: CommonConstruct, props: GraphWidgetProps, leftYMetrics?: IMetric[], rightYMetrics?: IMetric[]): cdk.aws_cloudwatch.GraphWidget;
|
|
177
|
+
/**
|
|
178
|
+
* @summary Method to create a cloudwatch alarm status widget
|
|
179
|
+
* @param {string} id scoped id of the resource
|
|
180
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
181
|
+
* @param {AlarmStatusWidgetProps} props
|
|
182
|
+
* @param {watch.IAlarm[]} alarms
|
|
183
|
+
*/
|
|
184
|
+
createAlarmStatusWidget(id: string, scope: CommonConstruct, props: AlarmStatusWidgetProps, alarms: watch.IAlarm[]): cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
185
|
+
/**
|
|
186
|
+
* @summary Method to create a cloudwatch log query widget
|
|
187
|
+
* @param {string} id scoped id of the resource
|
|
188
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
189
|
+
* @param {LogQueryWidgetProps} props
|
|
190
|
+
* @param {string[]} logGroupNames
|
|
191
|
+
*/
|
|
192
|
+
createLogQueryWidget(id: string, scope: CommonConstruct, props: LogQueryWidgetProps, logGroupNames: string[]): cdk.aws_cloudwatch.LogQueryWidget;
|
|
193
|
+
/**
|
|
194
|
+
* @summary Utility method to determine the metrics and dimensions
|
|
195
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
196
|
+
* @param {MetricProps[]} metricProps
|
|
197
|
+
*/
|
|
198
|
+
private determineMetrics;
|
|
199
|
+
/**
|
|
200
|
+
* @summary Utility method to determine the time range
|
|
201
|
+
* @param {string?} range
|
|
202
|
+
*/
|
|
203
|
+
private static determineTimeRange;
|
|
204
|
+
/**
|
|
205
|
+
* @summary Utility method to determine the configured alarms
|
|
206
|
+
* @param {string} id scoped id of the resource
|
|
207
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
208
|
+
* @param {watch.AlarmProps[]} alarmProps
|
|
209
|
+
*/
|
|
210
|
+
private determineAlarms;
|
|
211
|
+
}
|
|
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.CloudWatchManager = void 0;
|
|
27
27
|
const cdk = __importStar(require("aws-cdk-lib"));
|
|
28
28
|
const watch = __importStar(require("aws-cdk-lib/aws-cloudwatch"));
|
|
29
|
-
const utils = __importStar(require("
|
|
29
|
+
const utils = __importStar(require("../../../utils"));
|
|
30
30
|
/**
|
|
31
31
|
* @category cdk-utils.cloudwatch-manager
|
|
32
32
|
* @subcategory Construct
|
|
@@ -45,12 +45,12 @@ var CloudWatchWidgetType;
|
|
|
45
45
|
* @category cdk-utils.cloudwatch-manager
|
|
46
46
|
* @subcategory Construct
|
|
47
47
|
* @classdesc Provides operations on AWS CloudWatch.
|
|
48
|
-
* - A new instance of this class is injected into {@link
|
|
49
|
-
* - If a custom construct extends {@link
|
|
48
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
49
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
50
50
|
* @example
|
|
51
|
-
* import
|
|
51
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
52
52
|
*
|
|
53
|
-
* class CustomConstruct extends
|
|
53
|
+
* class CustomConstruct extends CommonConstruct {
|
|
54
54
|
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
55
55
|
* super(parent, id, props)
|
|
56
56
|
* this.props = props
|
|
@@ -64,8 +64,8 @@ class CloudWatchManager {
|
|
|
64
64
|
/**
|
|
65
65
|
* @summary Method to create a cloudwatch alarm for a given expression
|
|
66
66
|
* @param {string} id scoped id of the resource
|
|
67
|
-
* @param {
|
|
68
|
-
* @param {
|
|
67
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
68
|
+
* @param {AlarmProps} props
|
|
69
69
|
*/
|
|
70
70
|
createAlarmForExpression(id, scope, props) {
|
|
71
71
|
if (!props)
|
|
@@ -97,8 +97,8 @@ class CloudWatchManager {
|
|
|
97
97
|
/**
|
|
98
98
|
* @summary Method to create a cloudwatch alarm for a given metric
|
|
99
99
|
* @param {string} id scoped id of the resource
|
|
100
|
-
* @param {
|
|
101
|
-
* @param {
|
|
100
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
101
|
+
* @param {AlarmProps} props
|
|
102
102
|
* @param metric
|
|
103
103
|
*/
|
|
104
104
|
createAlarmForMetric(id, scope, props, metric) {
|
|
@@ -120,8 +120,8 @@ class CloudWatchManager {
|
|
|
120
120
|
/**
|
|
121
121
|
* @summary Method to create a cloudwatch dashboard
|
|
122
122
|
* @param {string} id scoped id of the resource
|
|
123
|
-
* @param {
|
|
124
|
-
* @param {
|
|
123
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
124
|
+
* @param {DashboardProps} props
|
|
125
125
|
* @param widgets
|
|
126
126
|
*/
|
|
127
127
|
createDashboard(id, scope, props, widgets) {
|
|
@@ -139,7 +139,7 @@ class CloudWatchManager {
|
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
141
|
* @summary Method to create cloudwatch widgets
|
|
142
|
-
* @param {
|
|
142
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
143
143
|
* @param props
|
|
144
144
|
*/
|
|
145
145
|
createWidgets(scope, props) {
|
|
@@ -152,7 +152,7 @@ class CloudWatchManager {
|
|
|
152
152
|
/**
|
|
153
153
|
* @summary Method to create a cloudwatch widget
|
|
154
154
|
* @param {string} id scoped id of the resource
|
|
155
|
-
* @param {
|
|
155
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
156
156
|
* @param props
|
|
157
157
|
*/
|
|
158
158
|
createWidget(id, scope, props) {
|
|
@@ -182,8 +182,8 @@ class CloudWatchManager {
|
|
|
182
182
|
/**
|
|
183
183
|
* @summary Method to create a cloudfront distribution widget
|
|
184
184
|
* @param {string} id scoped id of the resource
|
|
185
|
-
* @param {
|
|
186
|
-
* @param {
|
|
185
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
186
|
+
* @param {TextWidgetProps} props
|
|
187
187
|
* @param {string} distributionId the cloudfront distribution id
|
|
188
188
|
*/
|
|
189
189
|
createCloudfrontDistributionWidget(id, scope, props, distributionId) {
|
|
@@ -200,8 +200,8 @@ class CloudWatchManager {
|
|
|
200
200
|
/**
|
|
201
201
|
* @summary Method to create a step function widget
|
|
202
202
|
* @param {string} id scoped id of the resource
|
|
203
|
-
* @param {
|
|
204
|
-
* @param {
|
|
203
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
204
|
+
* @param {TextWidgetProps} props
|
|
205
205
|
* @param {string} stateMachineArn the step function arn
|
|
206
206
|
*/
|
|
207
207
|
createStateWidget(id, scope, props, stateMachineArn) {
|
|
@@ -218,8 +218,8 @@ class CloudWatchManager {
|
|
|
218
218
|
/**
|
|
219
219
|
* @summary Method to create an event widget
|
|
220
220
|
* @param {string} id scoped id of the resource
|
|
221
|
-
* @param {
|
|
222
|
-
* @param {
|
|
221
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
222
|
+
* @param {TextWidgetProps} props
|
|
223
223
|
* @param {string} eventBusName the event bus name
|
|
224
224
|
* @param {string} ruleName the event rule name
|
|
225
225
|
*/
|
|
@@ -240,8 +240,8 @@ class CloudWatchManager {
|
|
|
240
240
|
/**
|
|
241
241
|
* @summary Method to create an api gateway widget
|
|
242
242
|
* @param {string} id scoped id of the resource
|
|
243
|
-
* @param {
|
|
244
|
-
* @param {
|
|
243
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
244
|
+
* @param {TextWidgetProps} props
|
|
245
245
|
* @param {string} apiName the api name
|
|
246
246
|
*/
|
|
247
247
|
createApiGatewayWidget(id, scope, props, apiName) {
|
|
@@ -258,8 +258,8 @@ class CloudWatchManager {
|
|
|
258
258
|
/**
|
|
259
259
|
* @summary Method to create a lambda function widget
|
|
260
260
|
* @param {string} id scoped id of the resource
|
|
261
|
-
* @param {
|
|
262
|
-
* @param {
|
|
261
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
262
|
+
* @param {TextWidgetProps} props
|
|
263
263
|
* @param {string} functionName the lambda function name
|
|
264
264
|
*/
|
|
265
265
|
createLambdaWidget(id, scope, props, functionName) {
|
|
@@ -276,8 +276,8 @@ class CloudWatchManager {
|
|
|
276
276
|
/**
|
|
277
277
|
* @summary Method to create a custom widget
|
|
278
278
|
* @param {string} id scoped id of the resource
|
|
279
|
-
* @param {
|
|
280
|
-
* @param {
|
|
279
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
280
|
+
* @param {TextWidgetProps} props
|
|
281
281
|
* @param {string} service the service identifier
|
|
282
282
|
*/
|
|
283
283
|
createCustomWidget(id, scope, props, service) {
|
|
@@ -294,8 +294,8 @@ class CloudWatchManager {
|
|
|
294
294
|
/**
|
|
295
295
|
* @summary Method to create an ecs cluster widget
|
|
296
296
|
* @param {string} id scoped id of the resource
|
|
297
|
-
* @param {
|
|
298
|
-
* @param {
|
|
297
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
298
|
+
* @param {TextWidgetProps} props
|
|
299
299
|
* @param {string} clusterName the ecs cluster name
|
|
300
300
|
*/
|
|
301
301
|
createEcsClusterWidget(id, scope, props, clusterName) {
|
|
@@ -312,8 +312,8 @@ class CloudWatchManager {
|
|
|
312
312
|
/**
|
|
313
313
|
* @summary Method to create an ecs service widget
|
|
314
314
|
* @param {string} id scoped id of the resource
|
|
315
|
-
* @param {
|
|
316
|
-
* @param {
|
|
315
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
316
|
+
* @param {TextWidgetProps} props
|
|
317
317
|
* @param {string} clusterName the ecs cluster name
|
|
318
318
|
* @param {string} serviceName the ecs service name
|
|
319
319
|
*/
|
|
@@ -334,8 +334,8 @@ class CloudWatchManager {
|
|
|
334
334
|
/**
|
|
335
335
|
* @summary Method to create an elb widget
|
|
336
336
|
* @param {string} id scoped id of the resource
|
|
337
|
-
* @param {
|
|
338
|
-
* @param {
|
|
337
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
338
|
+
* @param {TextWidgetProps} props
|
|
339
339
|
* @param {string} loadBalancer the loadbalancer reference
|
|
340
340
|
*/
|
|
341
341
|
createElbWidget(id, scope, props, loadBalancer) {
|
|
@@ -352,8 +352,8 @@ class CloudWatchManager {
|
|
|
352
352
|
/**
|
|
353
353
|
* @summary Method to create an elasticache widget
|
|
354
354
|
* @param {string} id scoped id of the resource
|
|
355
|
-
* @param {
|
|
356
|
-
* @param {
|
|
355
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
356
|
+
* @param {TextWidgetProps} props
|
|
357
357
|
* @param {string} cacheClusterId the elasticache cluster id
|
|
358
358
|
*/
|
|
359
359
|
createCacheWidget(id, scope, props, cacheClusterId) {
|
|
@@ -370,8 +370,8 @@ class CloudWatchManager {
|
|
|
370
370
|
/**
|
|
371
371
|
* @summary Method to create a cloudwatch text widget
|
|
372
372
|
* @param {string} id scoped id of the resource
|
|
373
|
-
* @param {
|
|
374
|
-
* @param {
|
|
373
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
374
|
+
* @param {TextWidgetProps} props
|
|
375
375
|
*/
|
|
376
376
|
createTextWidget(id, scope, props) {
|
|
377
377
|
if (!props)
|
|
@@ -388,8 +388,8 @@ class CloudWatchManager {
|
|
|
388
388
|
/**
|
|
389
389
|
* @summary Method to create a cloudwatch numeric widget
|
|
390
390
|
* @param {string} id scoped id of the resource
|
|
391
|
-
* @param {
|
|
392
|
-
* @param {
|
|
391
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
392
|
+
* @param {NumericWidgetProps} props
|
|
393
393
|
* @param metrics
|
|
394
394
|
*/
|
|
395
395
|
createSingleValueWidget(id, scope, props, metrics) {
|
|
@@ -412,8 +412,8 @@ class CloudWatchManager {
|
|
|
412
412
|
/**
|
|
413
413
|
* @summary Method to create a cloudwatch guage widget
|
|
414
414
|
* @param {string} id scoped id of the resource
|
|
415
|
-
* @param {
|
|
416
|
-
* @param {
|
|
415
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
416
|
+
* @param {GuageWidgetProps} props
|
|
417
417
|
* @param metrics
|
|
418
418
|
*/
|
|
419
419
|
createGuageWidget(id, scope, props, metrics) {
|
|
@@ -436,8 +436,8 @@ class CloudWatchManager {
|
|
|
436
436
|
/**
|
|
437
437
|
* @summary Method to create a cloudwatch graph widget
|
|
438
438
|
* @param {string} id scoped id of the resource
|
|
439
|
-
* @param {
|
|
440
|
-
* @param {
|
|
439
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
440
|
+
* @param {GraphWidgetProps} props
|
|
441
441
|
* @param leftYMetrics
|
|
442
442
|
* @param rightYMetrics
|
|
443
443
|
*/
|
|
@@ -467,8 +467,8 @@ class CloudWatchManager {
|
|
|
467
467
|
/**
|
|
468
468
|
* @summary Method to create a cloudwatch alarm status widget
|
|
469
469
|
* @param {string} id scoped id of the resource
|
|
470
|
-
* @param {
|
|
471
|
-
* @param {
|
|
470
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
471
|
+
* @param {AlarmStatusWidgetProps} props
|
|
472
472
|
* @param {watch.IAlarm[]} alarms
|
|
473
473
|
*/
|
|
474
474
|
createAlarmStatusWidget(id, scope, props, alarms) {
|
|
@@ -487,8 +487,8 @@ class CloudWatchManager {
|
|
|
487
487
|
/**
|
|
488
488
|
* @summary Method to create a cloudwatch log query widget
|
|
489
489
|
* @param {string} id scoped id of the resource
|
|
490
|
-
* @param {
|
|
491
|
-
* @param {
|
|
490
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
491
|
+
* @param {LogQueryWidgetProps} props
|
|
492
492
|
* @param {string[]} logGroupNames
|
|
493
493
|
*/
|
|
494
494
|
createLogQueryWidget(id, scope, props, logGroupNames) {
|
|
@@ -510,8 +510,8 @@ class CloudWatchManager {
|
|
|
510
510
|
}
|
|
511
511
|
/**
|
|
512
512
|
* @summary Utility method to determine the metrics and dimensions
|
|
513
|
-
* @param {
|
|
514
|
-
* @param {
|
|
513
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
514
|
+
* @param {MetricProps[]} metricProps
|
|
515
515
|
*/
|
|
516
516
|
determineMetrics(scope, metricProps) {
|
|
517
517
|
const metrics = [];
|
|
@@ -648,7 +648,7 @@ class CloudWatchManager {
|
|
|
648
648
|
/**
|
|
649
649
|
* @summary Utility method to determine the configured alarms
|
|
650
650
|
* @param {string} id scoped id of the resource
|
|
651
|
-
* @param {
|
|
651
|
+
* @param {CommonConstruct} scope scope in which this resource is defined
|
|
652
652
|
* @param {watch.AlarmProps[]} alarmProps
|
|
653
653
|
*/
|
|
654
654
|
determineAlarms(id, scope, alarmProps) {
|