@gradientedge/cdk-utils 4.4.1 → 4.4.5
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/README.md +2 -6
- package/app/api-destined-function/package.json +0 -1
- package/lerna.json +6 -0
- package/package.json +15 -16
- package/src/lib/common/construct.ts +2 -1
- package/src/lib/common/stack.ts +2 -1
- package/src/lib/construct/api-to-eventbridge-target/api-destination-event.ts +2 -1
- package/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.ts +2 -1
- package/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.ts +2 -1
- package/src/lib/construct/api-to-eventbridge-target/main.ts +2 -1
- package/src/lib/construct/graphql-api-lambda/main.ts +2 -1
- package/src/lib/construct/site-with-ecs-backend/main.ts +2 -1
- package/src/lib/construct/static-site/main.ts +2 -1
- package/src/lib/manager/aws/acm-manager.ts +2 -1
- package/src/lib/manager/aws/api-manager.ts +2 -1
- package/src/lib/manager/aws/app-config-manager.ts +4 -2
- package/src/lib/manager/aws/cloudfront-manager.ts +2 -1
- package/src/lib/manager/aws/cloudtrail-manager.ts +2 -1
- package/src/lib/manager/aws/cloudwatch-manager.ts +4 -2
- package/src/lib/manager/aws/codebuild-manager.ts +2 -1
- package/src/lib/manager/aws/dynamodb-manager.ts +2 -1
- package/src/lib/manager/aws/ecr-manager.ts +2 -1
- package/src/lib/manager/aws/ecs-manager.ts +2 -1
- package/src/lib/manager/aws/eks-manager.ts +2 -1
- package/src/lib/manager/aws/event-manager.ts +2 -1
- package/src/lib/manager/aws/iam-manager.ts +2 -1
- package/src/lib/manager/aws/lambda-manager.ts +2 -1
- package/src/lib/manager/aws/log-manager.ts +2 -1
- package/src/lib/manager/aws/route53-manager.ts +2 -1
- package/src/lib/manager/aws/s3-manager.ts +2 -1
- package/src/lib/manager/aws/secrets-manager.ts +2 -1
- package/src/lib/manager/aws/sns-manager.ts +2 -1
- package/src/lib/manager/aws/ssm-manager.ts +4 -2
- package/src/lib/manager/aws/vpc-manager.ts +4 -2
- package/src/lib/manager/aws/waf-manager.ts +2 -1
- package/src/lib/types/aws/index.ts +98 -47
- package/src/lib/utils/aws/index.ts +1 -1
- package/src/lib/utils/index.ts +8 -9
- package/api-docs/AcmManager.html +0 -619
- package/api-docs/AcmProps.html +0 -235
- package/api-docs/AlarmProps.html +0 -235
- package/api-docs/AlarmStatusWidgetProps.html +0 -235
- package/api-docs/ApiDestinationEvent.html +0 -294
- package/api-docs/ApiDestinationEventType.html +0 -235
- package/api-docs/ApiDestinedLambda.html +0 -294
- package/api-docs/ApiDestinedLambdaEnvironment.html +0 -235
- package/api-docs/ApiDestinedLambdaType.html +0 -235
- package/api-docs/ApiDestinedRestApi.html +0 -294
- package/api-docs/ApiDestinedRestApiType.html +0 -235
- package/api-docs/ApiManager.html +0 -763
- package/api-docs/ApiToEventBridgeTarget.html +0 -1874
- package/api-docs/ApiToEventBridgeTarget.jpg +0 -0
- package/api-docs/ApiToEventBridgeTargetEventProps.html +0 -235
- package/api-docs/ApiToEventBridgeTargetLambdaProps.html +0 -235
- package/api-docs/ApiToEventBridgeTargetProps.html +0 -235
- package/api-docs/AppConfigManager.html +0 -1200
- package/api-docs/AppConfigProps.html +0 -235
- package/api-docs/CloudFrontManager.html +0 -2399
- package/api-docs/CloudFrontProps.html +0 -235
- package/api-docs/CloudTrailManager.html +0 -634
- package/api-docs/CloudTrailProps.html +0 -235
- package/api-docs/CloudWatchManager.html +0 -2983
- package/api-docs/CloudfrontFunctionProps.html +0 -235
- package/api-docs/CodeBuildManager.html +0 -733
- package/api-docs/CommonConstruct.html +0 -1296
- package/api-docs/CommonStack.html +0 -810
- package/api-docs/CommonStackProps.html +0 -235
- package/api-docs/DashboardProps.html +0 -235
- package/api-docs/DistributionProps.html +0 -235
- package/api-docs/DynamodbManager.html +0 -527
- package/api-docs/EcrManager.html +0 -527
- package/api-docs/EcsClusterProps.html +0 -235
- package/api-docs/EcsManager.html +0 -877
- package/api-docs/EcsTaskProps.html +0 -235
- package/api-docs/EksClusterProps.html +0 -235
- package/api-docs/EksManager.html +0 -577
- package/api-docs/EventBusProps.html +0 -235
- package/api-docs/EventManager.html +0 -1451
- package/api-docs/EventRuleProps.html +0 -235
- package/api-docs/GraphQLApiLambda.html +0 -1668
- package/api-docs/GraphQLApiLambda.jpg +0 -0
- package/api-docs/GraphQlApiLambdaEnvironment.html +0 -235
- package/api-docs/GraphQlApiLambdaProps.html +0 -235
- package/api-docs/GraphWidgetProps.html +0 -235
- package/api-docs/HealthCheck.html +0 -235
- package/api-docs/IamManager.html +0 -3818
- package/api-docs/LambdaEdgeProps.html +0 -235
- package/api-docs/LambdaEnvironment.html +0 -235
- package/api-docs/LambdaManager.html +0 -2375
- package/api-docs/LambdaProps.html +0 -235
- package/api-docs/LogManager.html +0 -952
- package/api-docs/LogProps.html +0 -235
- package/api-docs/LogQueryWidgetProps.html +0 -235
- package/api-docs/MetricFilterProps.html +0 -235
- package/api-docs/MetricProps.html +0 -235
- package/api-docs/NumericWidgetProps.html +0 -235
- package/api-docs/Route53Manager.html +0 -1457
- package/api-docs/Route53Props.html +0 -235
- package/api-docs/RuleProps.html +0 -235
- package/api-docs/S3BucketProps.html +0 -235
- package/api-docs/S3Manager.html +0 -1543
- package/api-docs/SSMParameterReader.html +0 -428
- package/api-docs/SSMParameterReaderProps.html +0 -235
- package/api-docs/SecretsManager.html +0 -1137
- package/api-docs/SiteWithEcsBackend.html +0 -2388
- package/api-docs/SiteWithEcsBackendProps.html +0 -235
- package/api-docs/SnsManager.html +0 -777
- package/api-docs/SsmManager.html +0 -952
- package/api-docs/StaticSite.html +0 -1355
- package/api-docs/StaticSiteProps.html +0 -235
- package/api-docs/SubscriptionProps.html +0 -235
- package/api-docs/TableProps.html +0 -235
- package/api-docs/TextWidgetProps.html +0 -235
- package/api-docs/VpcManager.html +0 -983
- package/api-docs/WafIPSetProps.html +0 -235
- package/api-docs/WafManager.html +0 -727
- package/api-docs/WafWebACLProps.html +0 -235
- package/api-docs/common_construct.ts.html +0 -275
- package/api-docs/common_stack.ts.html +0 -299
- package/api-docs/construct_api-to-eventbridge-target_api-destination-event.ts.html +0 -171
- package/api-docs/construct_api-to-eventbridge-target_api-destined-lambda.ts.html +0 -174
- package/api-docs/construct_api-to-eventbridge-target_api-destined-rest-api.ts.html +0 -186
- package/api-docs/construct_api-to-eventbridge-target_main.ts.html +0 -747
- package/api-docs/construct_graphql-api-lambda_main.ts.html +0 -404
- package/api-docs/construct_site-with-ecs-backend_main.ts.html +0 -540
- package/api-docs/construct_static-site_main.ts.html +0 -370
- package/api-docs/global.html +0 -1527
- package/api-docs/index.html +0 -207
- package/api-docs/manager_aws_acm-manager.ts.html +0 -232
- package/api-docs/manager_aws_api-manager.ts.html +0 -256
- package/api-docs/manager_aws_app-config-manager.ts.html +0 -305
- package/api-docs/manager_aws_cloudfront-manager.ts.html +0 -487
- package/api-docs/manager_aws_cloudtrail-manager.ts.html +0 -247
- package/api-docs/manager_aws_cloudwatch-manager.ts.html +0 -548
- package/api-docs/manager_aws_codebuild-manager.ts.html +0 -236
- package/api-docs/manager_aws_dynamodb-manager.ts.html +0 -215
- package/api-docs/manager_aws_ecr-manager.ts.html +0 -195
- package/api-docs/manager_aws_ecs-manager.ts.html +0 -255
- package/api-docs/manager_aws_eks-manager.ts.html +0 -256
- package/api-docs/manager_aws_event-manager.ts.html +0 -332
- package/api-docs/manager_aws_iam-manager.ts.html +0 -569
- package/api-docs/manager_aws_lambda-manager.ts.html +0 -396
- package/api-docs/manager_aws_log-manager.ts.html +0 -255
- package/api-docs/manager_aws_route53-manager.ts.html +0 -329
- package/api-docs/manager_aws_s3-manager.ts.html +0 -357
- package/api-docs/manager_aws_secrets-manager.ts.html +0 -270
- package/api-docs/manager_aws_sns-manager.ts.html +0 -242
- package/api-docs/manager_aws_ssm-manager.ts.html +0 -268
- package/api-docs/manager_aws_vpc-manager.ts.html +0 -239
- package/api-docs/manager_aws_waf-manager.ts.html +0 -228
- package/api-docs/scripts/app.min.js +0 -1
- package/api-docs/scripts/linenumber.js +0 -26
- package/api-docs/scripts/search.js +0 -39
- package/api-docs/styles/app.min.css +0 -1
- package/api-docs/styles/iframe.css +0 -13
- package/api-docs/styles/prettify-jsdoc.css +0 -111
- package/api-docs/styles/prettify-tomorrow.css +0 -132
- package/api-docs/styles/reset.css +0 -44
- package/api-docs/tutorial-Architecture.html +0 -147
- package/api-docs/tutorial-Build.html +0 -146
- package/api-docs/tutorial-CI-CD.html +0 -150
- package/api-docs/tutorial-Development.html +0 -223
- package/api-docs/types_aws_index.ts.html +0 -611
- package/api-docs/utils_aws_index.ts.html +0 -189
- package/api-docs/utils_index.ts.html +0 -225
- package/app/api-destined-function/node_modules/uuid/dist/bin/uuid +0 -2
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/index.js +0 -9
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/md5.js +0 -215
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/nil.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/parse.js +0 -35
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/regex.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/rng.js +0 -19
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/stringify.js +0 -30
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v1.js +0 -95
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v3.js +0 -4
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v35.js +0 -64
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v4.js +0 -24
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v5.js +0 -4
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/validate.js +0 -7
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/version.js +0 -11
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/index.js +0 -9
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/md5.js +0 -13
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/nil.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/parse.js +0 -35
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/regex.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/rng.js +0 -12
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/sha1.js +0 -13
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/stringify.js +0 -29
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v1.js +0 -95
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v3.js +0 -4
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v35.js +0 -64
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v4.js +0 -24
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v5.js +0 -4
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/validate.js +0 -7
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/version.js +0 -11
- package/app/api-destined-function/node_modules/uuid/dist/index.js +0 -79
- package/app/api-destined-function/node_modules/uuid/dist/md5-browser.js +0 -223
- package/app/api-destined-function/node_modules/uuid/dist/md5.js +0 -23
- package/app/api-destined-function/node_modules/uuid/dist/nil.js +0 -8
- package/app/api-destined-function/node_modules/uuid/dist/parse.js +0 -45
- package/app/api-destined-function/node_modules/uuid/dist/regex.js +0 -8
- package/app/api-destined-function/node_modules/uuid/dist/rng-browser.js +0 -26
- package/app/api-destined-function/node_modules/uuid/dist/rng.js +0 -24
- package/app/api-destined-function/node_modules/uuid/dist/sha1-browser.js +0 -104
- package/app/api-destined-function/node_modules/uuid/dist/sha1.js +0 -23
- package/app/api-destined-function/node_modules/uuid/dist/stringify.js +0 -39
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuid.min.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
- package/app/api-destined-function/node_modules/uuid/dist/uuid-bin.js +0 -85
- package/app/api-destined-function/node_modules/uuid/dist/v1.js +0 -107
- package/app/api-destined-function/node_modules/uuid/dist/v3.js +0 -16
- package/app/api-destined-function/node_modules/uuid/dist/v35.js +0 -78
- package/app/api-destined-function/node_modules/uuid/dist/v4.js +0 -37
- package/app/api-destined-function/node_modules/uuid/dist/v5.js +0 -16
- package/app/api-destined-function/node_modules/uuid/dist/validate.js +0 -17
- package/app/api-destined-function/node_modules/uuid/dist/version.js +0 -21
- package/dist/app/api-destined-function/src/lib/lambda.d.ts +0 -19
- package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +0 -1
- package/dist/app/api-destined-function/src/lib/lambda.js +0 -34
- package/dist/app/api-destined-function/src/lib/lambda.js.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/src/lib/common/construct.d.ts +0 -79
- package/dist/src/lib/common/construct.d.ts.map +0 -1
- package/dist/src/lib/common/construct.js +0 -133
- package/dist/src/lib/common/construct.js.map +0 -1
- package/dist/src/lib/common/index.d.ts +0 -3
- package/dist/src/lib/common/index.d.ts.map +0 -1
- package/dist/src/lib/common/index.js +0 -15
- package/dist/src/lib/common/index.js.map +0 -1
- package/dist/src/lib/common/stack.d.ts +0 -54
- package/dist/src/lib/common/stack.d.ts.map +0 -1
- package/dist/src/lib/common/stack.js +0 -147
- package/dist/src/lib/common/stack.js.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts +0 -16
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js +0 -17
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts +0 -19
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js +0 -19
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts +0 -35
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js +0 -29
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +0 -5
- package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/index.js +0 -17
- package/dist/src/lib/construct/api-to-eventbridge-target/index.js.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +0 -134
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts.map +0 -1
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +0 -487
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/index.d.ts +0 -2
- package/dist/src/lib/construct/graphql-api-lambda/index.d.ts.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/index.js +0 -14
- package/dist/src/lib/construct/graphql-api-lambda/index.js.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +0 -112
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts.map +0 -1
- package/dist/src/lib/construct/graphql-api-lambda/main.js +0 -201
- package/dist/src/lib/construct/graphql-api-lambda/main.js.map +0 -1
- package/dist/src/lib/construct/index.d.ts +0 -5
- package/dist/src/lib/construct/index.d.ts.map +0 -1
- package/dist/src/lib/construct/index.js +0 -17
- package/dist/src/lib/construct/index.js.map +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts +0 -2
- package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts.map +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/index.js +0 -14
- package/dist/src/lib/construct/site-with-ecs-backend/index.js.map +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +0 -167
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts.map +0 -1
- package/dist/src/lib/construct/site-with-ecs-backend/main.js +0 -327
- package/dist/src/lib/construct/site-with-ecs-backend/main.js.map +0 -1
- package/dist/src/lib/construct/static-site/index.d.ts +0 -2
- package/dist/src/lib/construct/static-site/index.d.ts.map +0 -1
- package/dist/src/lib/construct/static-site/index.js +0 -14
- package/dist/src/lib/construct/static-site/index.js.map +0 -1
- package/dist/src/lib/construct/static-site/main.d.ts +0 -94
- package/dist/src/lib/construct/static-site/main.d.ts.map +0 -1
- package/dist/src/lib/construct/static-site/main.js +0 -168
- package/dist/src/lib/construct/static-site/main.js.map +0 -1
- package/dist/src/lib/manager/aws/acm-manager.d.ts +0 -46
- package/dist/src/lib/manager/aws/acm-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/acm-manager.js +0 -90
- package/dist/src/lib/manager/aws/acm-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/api-manager.d.ts +0 -43
- package/dist/src/lib/manager/aws/api-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/api-manager.js +0 -111
- package/dist/src/lib/manager/aws/api-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/app-config-manager.d.ts +0 -64
- package/dist/src/lib/manager/aws/app-config-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/app-config-manager.js +0 -147
- package/dist/src/lib/manager/aws/app-config-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/cloudfront-manager.d.ts +0 -112
- package/dist/src/lib/manager/aws/cloudfront-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/cloudfront-manager.js +0 -282
- package/dist/src/lib/manager/aws/cloudfront-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts +0 -48
- package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/cloudtrail-manager.js +0 -99
- package/dist/src/lib/manager/aws/cloudtrail-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts +0 -121
- package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/cloudwatch-manager.js +0 -351
- package/dist/src/lib/manager/aws/cloudwatch-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/codebuild-manager.d.ts +0 -40
- package/dist/src/lib/manager/aws/codebuild-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/codebuild-manager.js +0 -94
- package/dist/src/lib/manager/aws/codebuild-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/dynamodb-manager.d.ts +0 -32
- package/dist/src/lib/manager/aws/dynamodb-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/dynamodb-manager.js +0 -79
- package/dist/src/lib/manager/aws/dynamodb-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/ecr-manager.d.ts +0 -31
- package/dist/src/lib/manager/aws/ecr-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/ecr-manager.js +0 -60
- package/dist/src/lib/manager/aws/ecr-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/ecs-manager.d.ts +0 -48
- package/dist/src/lib/manager/aws/ecs-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/ecs-manager.js +0 -103
- package/dist/src/lib/manager/aws/ecs-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/eks-manager.d.ts +0 -36
- package/dist/src/lib/manager/aws/eks-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/eks-manager.js +0 -109
- package/dist/src/lib/manager/aws/eks-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/event-manager.d.ts +0 -67
- package/dist/src/lib/manager/aws/event-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/event-manager.js +0 -162
- package/dist/src/lib/manager/aws/event-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/iam-manager.d.ts +0 -154
- package/dist/src/lib/manager/aws/iam-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/iam-manager.js +0 -380
- package/dist/src/lib/manager/aws/iam-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/index.d.ts +0 -23
- package/dist/src/lib/manager/aws/index.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/index.js +0 -35
- package/dist/src/lib/manager/aws/index.js.map +0 -1
- package/dist/src/lib/manager/aws/lambda-manager.d.ts +0 -94
- package/dist/src/lib/manager/aws/lambda-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/lambda-manager.js +0 -196
- package/dist/src/lib/manager/aws/lambda-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/log-manager.d.ts +0 -51
- package/dist/src/lib/manager/aws/log-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/log-manager.js +0 -108
- package/dist/src/lib/manager/aws/log-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/route53-manager.d.ts +0 -68
- package/dist/src/lib/manager/aws/route53-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/route53-manager.js +0 -158
- package/dist/src/lib/manager/aws/route53-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/s3-manager.d.ts +0 -73
- package/dist/src/lib/manager/aws/s3-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/s3-manager.js +0 -202
- package/dist/src/lib/manager/aws/s3-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/secrets-manager.d.ts +0 -57
- package/dist/src/lib/manager/aws/secrets-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/secrets-manager.js +0 -116
- package/dist/src/lib/manager/aws/secrets-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/sns-manager.d.ts +0 -42
- package/dist/src/lib/manager/aws/sns-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/sns-manager.js +0 -90
- package/dist/src/lib/manager/aws/sns-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/ssm-manager.d.ts +0 -59
- package/dist/src/lib/manager/aws/ssm-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/ssm-manager.js +0 -123
- package/dist/src/lib/manager/aws/ssm-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/vpc-manager.d.ts +0 -45
- package/dist/src/lib/manager/aws/vpc-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/vpc-manager.js +0 -93
- package/dist/src/lib/manager/aws/vpc-manager.js.map +0 -1
- package/dist/src/lib/manager/aws/waf-manager.d.ts +0 -39
- package/dist/src/lib/manager/aws/waf-manager.d.ts.map +0 -1
- package/dist/src/lib/manager/aws/waf-manager.js +0 -89
- package/dist/src/lib/manager/aws/waf-manager.js.map +0 -1
- package/dist/src/lib/manager/index.d.ts +0 -2
- package/dist/src/lib/manager/index.d.ts.map +0 -1
- package/dist/src/lib/manager/index.js +0 -14
- package/dist/src/lib/manager/index.js.map +0 -1
- package/dist/src/lib/types/aws/index.d.ts +0 -429
- package/dist/src/lib/types/aws/index.d.ts.map +0 -1
- package/dist/src/lib/types/aws/index.js +0 -3
- package/dist/src/lib/types/aws/index.js.map +0 -1
- package/dist/src/lib/types/index.d.ts +0 -2
- package/dist/src/lib/types/index.d.ts.map +0 -1
- package/dist/src/lib/types/index.js +0 -14
- package/dist/src/lib/types/index.js.map +0 -1
- package/dist/src/lib/utils/aws/index.d.ts +0 -16
- package/dist/src/lib/utils/aws/index.d.ts.map +0 -1
- package/dist/src/lib/utils/aws/index.js +0 -50
- package/dist/src/lib/utils/aws/index.js.map +0 -1
- package/dist/src/lib/utils/index.d.ts +0 -64
- package/dist/src/lib/utils/index.d.ts.map +0 -1
- package/dist/src/lib/utils/index.js +0 -86
- package/dist/src/lib/utils/index.js.map +0 -1
- package/img/ApiToEventBridgeTarget.jpg +0 -0
- package/img/GraphQLApiLambda.jpg +0 -0
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<!DOCTYPE html>
|
|
4
|
-
<html lang="en">
|
|
5
|
-
|
|
6
|
-
<head>
|
|
7
|
-
|
|
8
|
-
<meta charset="utf-8">
|
|
9
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
10
|
-
<title>Gradient Edge CDK Utils manager/aws/log-manager.ts</title>
|
|
11
|
-
|
|
12
|
-
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
|
|
13
|
-
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
|
14
|
-
<script src="./build/entry.js"></script>
|
|
15
|
-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
16
|
-
<!--[if lt IE 9]>
|
|
17
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
18
|
-
<![endif]-->
|
|
19
|
-
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
|
|
20
|
-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
|
|
21
|
-
<link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
|
|
22
|
-
<link type="text/css" rel="stylesheet" href="styles/app.min.css">
|
|
23
|
-
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
|
|
24
|
-
<link type="text/css" rel="stylesheet" href="">
|
|
25
|
-
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</head>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<body class="layout small-header">
|
|
33
|
-
<div id="stickyNavbarOverlay"></div>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<div class="top-nav">
|
|
37
|
-
<div class="inner">
|
|
38
|
-
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
|
|
39
|
-
<span aria-hidden="true"></span>
|
|
40
|
-
<span aria-hidden="true"></span>
|
|
41
|
-
<span aria-hidden="true"></span>
|
|
42
|
-
</a>
|
|
43
|
-
<div class="logo">
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<a href="index.html">
|
|
47
|
-
<h1 class="navbar-item">Gradient Edge CDK Utils Documentation</h1>
|
|
48
|
-
</a>
|
|
49
|
-
|
|
50
|
-
</div>
|
|
51
|
-
<div class="menu">
|
|
52
|
-
|
|
53
|
-
<div class="navigation">
|
|
54
|
-
<a
|
|
55
|
-
href="index.html"
|
|
56
|
-
class="link"
|
|
57
|
-
>
|
|
58
|
-
API Documentation
|
|
59
|
-
</a>
|
|
60
|
-
|
|
61
|
-
<div class="dropdown is-hoverable is-right">
|
|
62
|
-
<a class="dropdown-trigger link">
|
|
63
|
-
Tutorials
|
|
64
|
-
<i class="fas fa-chevron-down fa-xs"></i>
|
|
65
|
-
</a>
|
|
66
|
-
<div class="dropdown-menu">
|
|
67
|
-
<div class="dropdown-content">
|
|
68
|
-
|
|
69
|
-
<a class="dropdown-item" href="tutorial-Architecture.html">
|
|
70
|
-
Architecture
|
|
71
|
-
</a>
|
|
72
|
-
|
|
73
|
-
<a class="dropdown-item" href="tutorial-Build.html">
|
|
74
|
-
Build
|
|
75
|
-
</a>
|
|
76
|
-
|
|
77
|
-
<a class="dropdown-item" href="tutorial-CI-CD.html">
|
|
78
|
-
CI-CD
|
|
79
|
-
</a>
|
|
80
|
-
|
|
81
|
-
<a class="dropdown-item" href="tutorial-Development.html">
|
|
82
|
-
Development
|
|
83
|
-
</a>
|
|
84
|
-
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<a
|
|
92
|
-
class="link user-link "
|
|
93
|
-
href="https://github.com/gradientedge/cdk-utils"
|
|
94
|
-
>
|
|
95
|
-
Github
|
|
96
|
-
</a>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
<div id="main">
|
|
105
|
-
<div
|
|
106
|
-
class="sidebar "
|
|
107
|
-
id="sidebarNav"
|
|
108
|
-
>
|
|
109
|
-
|
|
110
|
-
<div class="search-wrapper">
|
|
111
|
-
<input id="search" type="text" placeholder="Search docs..." class="input">
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
<nav>
|
|
115
|
-
|
|
116
|
-
<h2><a href="index.html">Documentation</a></h2><div class="category"></div><div class="category"><h2>Application Integration</h2><h3>Classes</h3><ul><li><a href="EventManager.html">EventManager</a></li><li><a href="SnsManager.html">SnsManager</a></li></ul><h3>Interfaces</h3><ul><li><a href="EventBusProps.html">EventBusProps</a></li><li><a href="EventRuleProps.html">EventRuleProps</a></li><li><a href="RuleProps.html">RuleProps</a></li><li><a href="SubscriptionProps.html">SubscriptionProps</a></li></ul></div><div class="category"><h2>Compute</h2><h3>Classes</h3><ul><li><a href="LambdaManager.html">LambdaManager</a></li></ul><h3>Interfaces</h3><ul><li><a href="HealthCheck.html">HealthCheck</a></li><li><a href="LambdaEdgeProps.html">LambdaEdgeProps</a></li><li><a href="LambdaProps.html">LambdaProps</a></li></ul></div><div class="category"><h2>Constructs</h2><h3>Classes</h3><ul><li><a href="ApiDestinationEvent.html">ApiDestinationEvent</a></li><li><a href="ApiDestinedLambda.html">ApiDestinedLambda</a></li><li><a href="ApiDestinedRestApi.html">ApiDestinedRestApi</a></li><li><a href="ApiToEventBridgeTarget.html">ApiToEventBridgeTarget</a></li><li><a href="CommonConstruct.html">CommonConstruct</a></li><li><a href="GraphQLApiLambda.html">GraphQLApiLambda</a></li><li><a href="SiteWithEcsBackend.html">SiteWithEcsBackend</a></li><li><a href="StaticSite.html">StaticSite</a></li></ul><h3>Interfaces</h3><ul><li><a href="ApiDestinationEventType.html">ApiDestinationEventType</a></li><li><a href="ApiDestinedLambdaEnvironment.html">ApiDestinedLambdaEnvironment</a></li><li><a href="ApiDestinedLambdaType.html">ApiDestinedLambdaType</a></li><li><a href="ApiDestinedRestApiType.html">ApiDestinedRestApiType</a></li><li><a href="ApiToEventBridgeTargetEventProps.html">ApiToEventBridgeTargetEventProps</a></li><li><a href="ApiToEventBridgeTargetLambdaProps.html">ApiToEventBridgeTargetLambdaProps</a></li><li><a href="ApiToEventBridgeTargetProps.html">ApiToEventBridgeTargetProps</a></li><li><a href="CommonStackProps.html">CommonStackProps</a></li><li><a href="GraphQlApiLambdaEnvironment.html">GraphQlApiLambdaEnvironment</a></li><li><a href="GraphQlApiLambdaProps.html">GraphQlApiLambdaProps</a></li><li><a href="LambdaEnvironment.html">LambdaEnvironment</a></li><li><a href="SiteWithEcsBackendProps.html">SiteWithEcsBackendProps</a></li><li><a href="StaticSiteProps.html">StaticSiteProps</a></li></ul></div><div class="category"><h2>Containers</h2><h3>Classes</h3><ul><li><a href="EcrManager.html">EcrManager</a></li><li><a href="EcsManager.html">EcsManager</a></li><li><a href="EksManager.html">EksManager</a></li></ul><h3>Interfaces</h3><ul><li><a href="EcsClusterProps.html">EcsClusterProps</a></li><li><a href="EcsTaskProps.html">EcsTaskProps</a></li><li><a href="EksClusterProps.html">EksClusterProps</a></li></ul></div><div class="category"><h2>Developer Tools</h2><h3>Classes</h3><ul><li><a href="CodeBuildManager.html">CodeBuildManager</a></li></ul></div><div class="category"><h2>Management & Governance</h2><h3>Classes</h3><ul><li><a href="AppConfigManager.html">AppConfigManager</a></li><li><a href="CloudTrailManager.html">CloudTrailManager</a></li><li><a href="CloudWatchManager.html">CloudWatchManager</a></li><li><a href="LogManager.html">LogManager</a></li><li><a href="SsmManager.html">SsmManager</a></li><li><a href="SSMParameterReader.html">SSMParameterReader</a></li></ul><h3>Interfaces</h3><ul><li><a href="AlarmProps.html">AlarmProps</a></li><li><a href="AlarmStatusWidgetProps.html">AlarmStatusWidgetProps</a></li><li><a href="AppConfigProps.html">AppConfigProps</a></li><li><a href="CloudTrailProps.html">CloudTrailProps</a></li><li><a href="DashboardProps.html">DashboardProps</a></li><li><a href="GraphWidgetProps.html">GraphWidgetProps</a></li><li><a href="LogProps.html">LogProps</a></li><li><a href="LogQueryWidgetProps.html">LogQueryWidgetProps</a></li><li><a href="MetricFilterProps.html">MetricFilterProps</a></li><li><a href="MetricProps.html">MetricProps</a></li><li><a href="NumericWidgetProps.html">NumericWidgetProps</a></li><li><a href="SSMParameterReaderProps.html">SSMParameterReaderProps</a></li><li><a href="TextWidgetProps.html">TextWidgetProps</a></li></ul></div><div class="category"><h2>Networking & Content Delivery</h2><h3>Classes</h3><ul><li><a href="ApiManager.html">ApiManager</a></li><li><a href="CloudFrontManager.html">CloudFrontManager</a></li><li><a href="Route53Manager.html">Route53Manager</a></li><li><a href="VpcManager.html">VpcManager</a></li></ul><h3>Interfaces</h3><ul><li><a href="CloudfrontFunctionProps.html">CloudfrontFunctionProps</a></li><li><a href="CloudFrontProps.html">CloudFrontProps</a></li><li><a href="DistributionProps.html">DistributionProps</a></li><li><a href="Route53Props.html">Route53Props</a></li></ul></div><div class="category"><h2>Security, Identity & Compliance</h2><h3>Classes</h3><ul><li><a href="AcmManager.html">AcmManager</a></li><li><a href="IamManager.html">IamManager</a></li><li><a href="SecretsManager.html">SecretsManager</a></li><li><a href="WafManager.html">WafManager</a></li></ul><h3>Interfaces</h3><ul><li><a href="AcmProps.html">AcmProps</a></li><li><a href="WafIPSetProps.html">WafIPSetProps</a></li><li><a href="WafWebACLProps.html">WafWebACLProps</a></li></ul></div><div class="category"><h2>Stacks</h2><h3>Classes</h3><ul><li><a href="CommonStack.html">CommonStack</a></li></ul></div><div class="category"><h2>Storage</h2><h3>Classes</h3><ul><li><a href="DynamodbManager.html">DynamodbManager</a></li><li><a href="S3Manager.html">S3Manager</a></li></ul><h3>Interfaces</h3><ul><li><a href="S3BucketProps.html">S3BucketProps</a></li><li><a href="TableProps.html">TableProps</a></li></ul></div><div class="category"><h2>Utils</h2><h3>Global</h3><ul><li><a href="global.html#ArnsByRegion">ArnsByRegion</a></li><li><a href="global.html#CloudWatchWidgetType">CloudWatchWidgetType</a></li><li><a href="global.html#CommonVpcIdentifier">CommonVpcIdentifier</a></li><li><a href="global.html#createCfnOutput">createCfnOutput</a></li><li><a href="global.html#defaultResponseObject">defaultResponseObject</a></li><li><a href="global.html#isDevStage">isDevStage</a></li><li><a href="global.html#isPrdStage">isPrdStage</a></li><li><a href="global.html#isTestStage">isTestStage</a></li><li><a href="global.html#isUatStage">isUatStage</a></li><li><a href="global.html#redirectError">redirectError</a></li><li><a href="global.html#redirectSuccess">redirectSuccess</a></li></ul></div><div class="category"><h2>Utils
|
|
117
|
-
LogLevel enumeration</h2><h3>Global</h3><ul><li><a href="global.html#LogLevel">LogLevel</a></li></ul></div>
|
|
118
|
-
|
|
119
|
-
</nav>
|
|
120
|
-
</div>
|
|
121
|
-
<div class="core" id="main-content-wrapper">
|
|
122
|
-
<div class="content">
|
|
123
|
-
<header class="page-title">
|
|
124
|
-
<p>Source</p>
|
|
125
|
-
<h1>manager/aws/log-manager.ts</h1>
|
|
126
|
-
</header>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<section>
|
|
133
|
-
<article>
|
|
134
|
-
<pre class="prettyprint source linenums"><code>import * as cdk from 'aws-cdk-lib'
|
|
135
|
-
import * as logs from 'aws-cdk-lib/aws-logs'
|
|
136
|
-
import * as common from '../../common'
|
|
137
|
-
import * as types from '../../types'
|
|
138
|
-
import * as utils from '../../utils'
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* @stability stable
|
|
142
|
-
* @category Management & Governance
|
|
143
|
-
* @classdesc Provides operations on AWS CloudWatch.
|
|
144
|
-
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
145
|
-
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
146
|
-
* @example
|
|
147
|
-
* import * as common from '@gradientedge/cdk-utils'
|
|
148
|
-
*
|
|
149
|
-
* class CustomConstruct extends common.common.CommonConstruct {
|
|
150
|
-
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
151
|
-
* super(parent, id, props)
|
|
152
|
-
* this.props = props
|
|
153
|
-
* this.logsManager.createMetricFilter('MyMetricFilter', this, logGroup)
|
|
154
|
-
* }
|
|
155
|
-
* }
|
|
156
|
-
*
|
|
157
|
-
* @see [CDK CloudWatch Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs-readme.html}
|
|
158
|
-
*/
|
|
159
|
-
export class LogManager {
|
|
160
|
-
/**
|
|
161
|
-
* @summary Method to create a cloudwatch metric filter
|
|
162
|
-
* @param {string} id scoped id of the resource
|
|
163
|
-
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
164
|
-
* @param {types.MetricFilterProps} props
|
|
165
|
-
* @param {logs.ILogGroup} logGroup
|
|
166
|
-
*/
|
|
167
|
-
public createMetricFilter(
|
|
168
|
-
id: string,
|
|
169
|
-
scope: common.CommonConstruct,
|
|
170
|
-
props: types.MetricFilterProps,
|
|
171
|
-
logGroup: logs.ILogGroup
|
|
172
|
-
) {
|
|
173
|
-
if (!props) throw `MetricFilter props undefined`
|
|
174
|
-
|
|
175
|
-
const metricFilter = new logs.MetricFilter(scope, `${id}`, {
|
|
176
|
-
logGroup: logGroup,
|
|
177
|
-
metricName: props.metricName,
|
|
178
|
-
metricNamespace: props.metricNamespace,
|
|
179
|
-
metricValue: props.metricValue,
|
|
180
|
-
defaultValue: props.defaultValue,
|
|
181
|
-
filterPattern: props.filterPattern,
|
|
182
|
-
})
|
|
183
|
-
|
|
184
|
-
const metric = props.options
|
|
185
|
-
? metricFilter.metric({
|
|
186
|
-
dimensionsMap: props.options.dimensionsMap,
|
|
187
|
-
statistic: props.options.statistic,
|
|
188
|
-
period: props.periodInSecs ? cdk.Duration.seconds(props.periodInSecs) : cdk.Duration.minutes(5),
|
|
189
|
-
})
|
|
190
|
-
: metricFilter.metric()
|
|
191
|
-
|
|
192
|
-
return { metricFilter, metric }
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* @summary Method to create a cloudwatch log group (cfn)
|
|
197
|
-
* @param {string} id scoped id of the resource
|
|
198
|
-
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
199
|
-
* @param {types.LogProps} props
|
|
200
|
-
*/
|
|
201
|
-
public createCfnLogGroup(id: string, scope: common.CommonConstruct, props: types.LogProps) {
|
|
202
|
-
if (!props) throw `Logs props undefined`
|
|
203
|
-
|
|
204
|
-
const logGroup = new logs.CfnLogGroup(scope, `${id}`, {
|
|
205
|
-
logGroupName: `${props.logGroupName}-${scope.props.stage}`,
|
|
206
|
-
retentionInDays: props.retention,
|
|
207
|
-
})
|
|
208
|
-
|
|
209
|
-
utils.createCfnOutput(`${id}-logGroupArn`, scope, logGroup.attrArn)
|
|
210
|
-
|
|
211
|
-
return logGroup
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* @summary Method to create a cloudwatch log group
|
|
216
|
-
* @param {string} id scoped id of the resource
|
|
217
|
-
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
218
|
-
* @param {types.LogProps} props
|
|
219
|
-
*/
|
|
220
|
-
public createLogGroup(id: string, scope: common.CommonConstruct, props: types.LogProps) {
|
|
221
|
-
if (!props) throw `Logs props undefined`
|
|
222
|
-
|
|
223
|
-
const logGroup = new logs.LogGroup(scope, `${id}`, {
|
|
224
|
-
logGroupName: `${props.logGroupName}-${scope.props.stage}`,
|
|
225
|
-
retention: props.retention,
|
|
226
|
-
removalPolicy: props.removalPolicy ?? cdk.RemovalPolicy.DESTROY,
|
|
227
|
-
})
|
|
228
|
-
|
|
229
|
-
utils.createCfnOutput(`${id}-logGroupArn`, scope, logGroup.logGroupArn)
|
|
230
|
-
|
|
231
|
-
return logGroup
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
</code></pre>
|
|
235
|
-
</article>
|
|
236
|
-
</section>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
</div>
|
|
242
|
-
|
|
243
|
-
</div>
|
|
244
|
-
<div id="side-nav" class="side-nav">
|
|
245
|
-
</div>
|
|
246
|
-
</div>
|
|
247
|
-
<script src="scripts/app.min.js"></script>
|
|
248
|
-
<script>PR.prettyPrint();</script>
|
|
249
|
-
<script src="scripts/linenumber.js"> </script>
|
|
250
|
-
|
|
251
|
-
<script src="scripts/search.js"> </script>
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
</body>
|
|
255
|
-
</html>
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<!DOCTYPE html>
|
|
4
|
-
<html lang="en">
|
|
5
|
-
|
|
6
|
-
<head>
|
|
7
|
-
|
|
8
|
-
<meta charset="utf-8">
|
|
9
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
10
|
-
<title>Gradient Edge CDK Utils manager/aws/route53-manager.ts</title>
|
|
11
|
-
|
|
12
|
-
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
|
|
13
|
-
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
|
14
|
-
<script src="./build/entry.js"></script>
|
|
15
|
-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
16
|
-
<!--[if lt IE 9]>
|
|
17
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
18
|
-
<![endif]-->
|
|
19
|
-
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
|
|
20
|
-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
|
|
21
|
-
<link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
|
|
22
|
-
<link type="text/css" rel="stylesheet" href="styles/app.min.css">
|
|
23
|
-
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
|
|
24
|
-
<link type="text/css" rel="stylesheet" href="">
|
|
25
|
-
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</head>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<body class="layout small-header">
|
|
33
|
-
<div id="stickyNavbarOverlay"></div>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<div class="top-nav">
|
|
37
|
-
<div class="inner">
|
|
38
|
-
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
|
|
39
|
-
<span aria-hidden="true"></span>
|
|
40
|
-
<span aria-hidden="true"></span>
|
|
41
|
-
<span aria-hidden="true"></span>
|
|
42
|
-
</a>
|
|
43
|
-
<div class="logo">
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<a href="index.html">
|
|
47
|
-
<h1 class="navbar-item">Gradient Edge CDK Utils Documentation</h1>
|
|
48
|
-
</a>
|
|
49
|
-
|
|
50
|
-
</div>
|
|
51
|
-
<div class="menu">
|
|
52
|
-
|
|
53
|
-
<div class="navigation">
|
|
54
|
-
<a
|
|
55
|
-
href="index.html"
|
|
56
|
-
class="link"
|
|
57
|
-
>
|
|
58
|
-
API Documentation
|
|
59
|
-
</a>
|
|
60
|
-
|
|
61
|
-
<div class="dropdown is-hoverable is-right">
|
|
62
|
-
<a class="dropdown-trigger link">
|
|
63
|
-
Tutorials
|
|
64
|
-
<i class="fas fa-chevron-down fa-xs"></i>
|
|
65
|
-
</a>
|
|
66
|
-
<div class="dropdown-menu">
|
|
67
|
-
<div class="dropdown-content">
|
|
68
|
-
|
|
69
|
-
<a class="dropdown-item" href="tutorial-Architecture.html">
|
|
70
|
-
Architecture
|
|
71
|
-
</a>
|
|
72
|
-
|
|
73
|
-
<a class="dropdown-item" href="tutorial-Build.html">
|
|
74
|
-
Build
|
|
75
|
-
</a>
|
|
76
|
-
|
|
77
|
-
<a class="dropdown-item" href="tutorial-CI-CD.html">
|
|
78
|
-
CI-CD
|
|
79
|
-
</a>
|
|
80
|
-
|
|
81
|
-
<a class="dropdown-item" href="tutorial-Development.html">
|
|
82
|
-
Development
|
|
83
|
-
</a>
|
|
84
|
-
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<a
|
|
92
|
-
class="link user-link "
|
|
93
|
-
href="https://github.com/gradientedge/cdk-utils"
|
|
94
|
-
>
|
|
95
|
-
Github
|
|
96
|
-
</a>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
<div id="main">
|
|
105
|
-
<div
|
|
106
|
-
class="sidebar "
|
|
107
|
-
id="sidebarNav"
|
|
108
|
-
>
|
|
109
|
-
|
|
110
|
-
<div class="search-wrapper">
|
|
111
|
-
<input id="search" type="text" placeholder="Search docs..." class="input">
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
<nav>
|
|
115
|
-
|
|
116
|
-
<h2><a href="index.html">Documentation</a></h2><div class="category"></div><div class="category"><h2>Application Integration</h2><h3>Classes</h3><ul><li><a href="EventManager.html">EventManager</a></li><li><a href="SnsManager.html">SnsManager</a></li></ul><h3>Interfaces</h3><ul><li><a href="EventBusProps.html">EventBusProps</a></li><li><a href="EventRuleProps.html">EventRuleProps</a></li><li><a href="RuleProps.html">RuleProps</a></li><li><a href="SubscriptionProps.html">SubscriptionProps</a></li></ul></div><div class="category"><h2>Compute</h2><h3>Classes</h3><ul><li><a href="LambdaManager.html">LambdaManager</a></li></ul><h3>Interfaces</h3><ul><li><a href="HealthCheck.html">HealthCheck</a></li><li><a href="LambdaEdgeProps.html">LambdaEdgeProps</a></li><li><a href="LambdaProps.html">LambdaProps</a></li></ul></div><div class="category"><h2>Constructs</h2><h3>Classes</h3><ul><li><a href="ApiDestinationEvent.html">ApiDestinationEvent</a></li><li><a href="ApiDestinedLambda.html">ApiDestinedLambda</a></li><li><a href="ApiDestinedRestApi.html">ApiDestinedRestApi</a></li><li><a href="ApiToEventBridgeTarget.html">ApiToEventBridgeTarget</a></li><li><a href="CommonConstruct.html">CommonConstruct</a></li><li><a href="GraphQLApiLambda.html">GraphQLApiLambda</a></li><li><a href="SiteWithEcsBackend.html">SiteWithEcsBackend</a></li><li><a href="StaticSite.html">StaticSite</a></li></ul><h3>Interfaces</h3><ul><li><a href="ApiDestinationEventType.html">ApiDestinationEventType</a></li><li><a href="ApiDestinedLambdaEnvironment.html">ApiDestinedLambdaEnvironment</a></li><li><a href="ApiDestinedLambdaType.html">ApiDestinedLambdaType</a></li><li><a href="ApiDestinedRestApiType.html">ApiDestinedRestApiType</a></li><li><a href="ApiToEventBridgeTargetEventProps.html">ApiToEventBridgeTargetEventProps</a></li><li><a href="ApiToEventBridgeTargetLambdaProps.html">ApiToEventBridgeTargetLambdaProps</a></li><li><a href="ApiToEventBridgeTargetProps.html">ApiToEventBridgeTargetProps</a></li><li><a href="CommonStackProps.html">CommonStackProps</a></li><li><a href="GraphQlApiLambdaEnvironment.html">GraphQlApiLambdaEnvironment</a></li><li><a href="GraphQlApiLambdaProps.html">GraphQlApiLambdaProps</a></li><li><a href="LambdaEnvironment.html">LambdaEnvironment</a></li><li><a href="SiteWithEcsBackendProps.html">SiteWithEcsBackendProps</a></li><li><a href="StaticSiteProps.html">StaticSiteProps</a></li></ul></div><div class="category"><h2>Containers</h2><h3>Classes</h3><ul><li><a href="EcrManager.html">EcrManager</a></li><li><a href="EcsManager.html">EcsManager</a></li><li><a href="EksManager.html">EksManager</a></li></ul><h3>Interfaces</h3><ul><li><a href="EcsClusterProps.html">EcsClusterProps</a></li><li><a href="EcsTaskProps.html">EcsTaskProps</a></li><li><a href="EksClusterProps.html">EksClusterProps</a></li></ul></div><div class="category"><h2>Developer Tools</h2><h3>Classes</h3><ul><li><a href="CodeBuildManager.html">CodeBuildManager</a></li></ul></div><div class="category"><h2>Management & Governance</h2><h3>Classes</h3><ul><li><a href="AppConfigManager.html">AppConfigManager</a></li><li><a href="CloudTrailManager.html">CloudTrailManager</a></li><li><a href="CloudWatchManager.html">CloudWatchManager</a></li><li><a href="LogManager.html">LogManager</a></li><li><a href="SsmManager.html">SsmManager</a></li><li><a href="SSMParameterReader.html">SSMParameterReader</a></li></ul><h3>Interfaces</h3><ul><li><a href="AlarmProps.html">AlarmProps</a></li><li><a href="AlarmStatusWidgetProps.html">AlarmStatusWidgetProps</a></li><li><a href="AppConfigProps.html">AppConfigProps</a></li><li><a href="CloudTrailProps.html">CloudTrailProps</a></li><li><a href="DashboardProps.html">DashboardProps</a></li><li><a href="GraphWidgetProps.html">GraphWidgetProps</a></li><li><a href="LogProps.html">LogProps</a></li><li><a href="LogQueryWidgetProps.html">LogQueryWidgetProps</a></li><li><a href="MetricFilterProps.html">MetricFilterProps</a></li><li><a href="MetricProps.html">MetricProps</a></li><li><a href="NumericWidgetProps.html">NumericWidgetProps</a></li><li><a href="SSMParameterReaderProps.html">SSMParameterReaderProps</a></li><li><a href="TextWidgetProps.html">TextWidgetProps</a></li></ul></div><div class="category"><h2>Networking & Content Delivery</h2><h3>Classes</h3><ul><li><a href="ApiManager.html">ApiManager</a></li><li><a href="CloudFrontManager.html">CloudFrontManager</a></li><li><a href="Route53Manager.html">Route53Manager</a></li><li><a href="VpcManager.html">VpcManager</a></li></ul><h3>Interfaces</h3><ul><li><a href="CloudfrontFunctionProps.html">CloudfrontFunctionProps</a></li><li><a href="CloudFrontProps.html">CloudFrontProps</a></li><li><a href="DistributionProps.html">DistributionProps</a></li><li><a href="Route53Props.html">Route53Props</a></li></ul></div><div class="category"><h2>Security, Identity & Compliance</h2><h3>Classes</h3><ul><li><a href="AcmManager.html">AcmManager</a></li><li><a href="IamManager.html">IamManager</a></li><li><a href="SecretsManager.html">SecretsManager</a></li><li><a href="WafManager.html">WafManager</a></li></ul><h3>Interfaces</h3><ul><li><a href="AcmProps.html">AcmProps</a></li><li><a href="WafIPSetProps.html">WafIPSetProps</a></li><li><a href="WafWebACLProps.html">WafWebACLProps</a></li></ul></div><div class="category"><h2>Stacks</h2><h3>Classes</h3><ul><li><a href="CommonStack.html">CommonStack</a></li></ul></div><div class="category"><h2>Storage</h2><h3>Classes</h3><ul><li><a href="DynamodbManager.html">DynamodbManager</a></li><li><a href="S3Manager.html">S3Manager</a></li></ul><h3>Interfaces</h3><ul><li><a href="S3BucketProps.html">S3BucketProps</a></li><li><a href="TableProps.html">TableProps</a></li></ul></div><div class="category"><h2>Utils</h2><h3>Global</h3><ul><li><a href="global.html#ArnsByRegion">ArnsByRegion</a></li><li><a href="global.html#CloudWatchWidgetType">CloudWatchWidgetType</a></li><li><a href="global.html#CommonVpcIdentifier">CommonVpcIdentifier</a></li><li><a href="global.html#createCfnOutput">createCfnOutput</a></li><li><a href="global.html#defaultResponseObject">defaultResponseObject</a></li><li><a href="global.html#isDevStage">isDevStage</a></li><li><a href="global.html#isPrdStage">isPrdStage</a></li><li><a href="global.html#isTestStage">isTestStage</a></li><li><a href="global.html#isUatStage">isUatStage</a></li><li><a href="global.html#redirectError">redirectError</a></li><li><a href="global.html#redirectSuccess">redirectSuccess</a></li></ul></div><div class="category"><h2>Utils
|
|
117
|
-
LogLevel enumeration</h2><h3>Global</h3><ul><li><a href="global.html#LogLevel">LogLevel</a></li></ul></div>
|
|
118
|
-
|
|
119
|
-
</nav>
|
|
120
|
-
</div>
|
|
121
|
-
<div class="core" id="main-content-wrapper">
|
|
122
|
-
<div class="content">
|
|
123
|
-
<header class="page-title">
|
|
124
|
-
<p>Source</p>
|
|
125
|
-
<h1>manager/aws/route53-manager.ts</h1>
|
|
126
|
-
</header>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<section>
|
|
133
|
-
<article>
|
|
134
|
-
<pre class="prettyprint source linenums"><code>import * as apig from 'aws-cdk-lib/aws-apigateway'
|
|
135
|
-
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront'
|
|
136
|
-
import * as route53 from 'aws-cdk-lib/aws-route53'
|
|
137
|
-
import * as route53Targets from 'aws-cdk-lib/aws-route53-targets'
|
|
138
|
-
import * as common from '../../common'
|
|
139
|
-
import * as types from '../../types'
|
|
140
|
-
import * as utils from '../../utils'
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @stability stable
|
|
144
|
-
* @category Networking & Content Delivery
|
|
145
|
-
* @classdesc Provides operations on AWS Route53.
|
|
146
|
-
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
147
|
-
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
148
|
-
* @example
|
|
149
|
-
* import * as common from '@gradientedge/cdk-utils'
|
|
150
|
-
*
|
|
151
|
-
* class CustomConstruct extends common.common.CommonConstruct {
|
|
152
|
-
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
153
|
-
* super(parent, id, props)
|
|
154
|
-
* this.props = props
|
|
155
|
-
* this.route53Manager.createHostedZone('MyHostedZone', this)
|
|
156
|
-
* }
|
|
157
|
-
* }
|
|
158
|
-
*
|
|
159
|
-
* @see [CDK Route53 Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_route53-readme.html}
|
|
160
|
-
*/
|
|
161
|
-
export class Route53Manager {
|
|
162
|
-
/**
|
|
163
|
-
* @summary Method to create a hosted zone
|
|
164
|
-
* @param {string} id scoped id of the resource
|
|
165
|
-
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
166
|
-
* @param {types.Route53Props} props
|
|
167
|
-
*/
|
|
168
|
-
public createHostedZone(id: string, scope: common.CommonConstruct, props: types.Route53Props) {
|
|
169
|
-
let hostedZone: route53.IHostedZone
|
|
170
|
-
|
|
171
|
-
if (!props) throw `Route53 props undefined`
|
|
172
|
-
|
|
173
|
-
if (props.useExistingHostedZone) {
|
|
174
|
-
hostedZone = route53.HostedZone.fromLookup(scope, `${id}`, {
|
|
175
|
-
domainName: scope.props.domainName,
|
|
176
|
-
})
|
|
177
|
-
} else {
|
|
178
|
-
hostedZone = new route53.HostedZone(scope, `${id}`, {
|
|
179
|
-
zoneName: scope.props.domainName,
|
|
180
|
-
comment: `Hosted zone for ${scope.props.domainName}`,
|
|
181
|
-
})
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
utils.createCfnOutput(`${id}-hostedZoneId`, scope, hostedZone.hostedZoneId)
|
|
185
|
-
utils.createCfnOutput(`${id}-hostedZoneArn`, scope, hostedZone.hostedZoneArn)
|
|
186
|
-
|
|
187
|
-
return hostedZone
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* @summary Method to create/lookup a hosted zone
|
|
192
|
-
* @param {string} id scoped id of the resource
|
|
193
|
-
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
194
|
-
* @param useExistingHostedZone Flag to indicate whether to lookup vs create new hosted zone
|
|
195
|
-
*/
|
|
196
|
-
public withHostedZoneFromFullyQualifiedDomainName(
|
|
197
|
-
id: string,
|
|
198
|
-
scope: common.CommonConstruct,
|
|
199
|
-
useExistingHostedZone: boolean
|
|
200
|
-
) {
|
|
201
|
-
let hostedZone: route53.IHostedZone
|
|
202
|
-
|
|
203
|
-
if (useExistingHostedZone) {
|
|
204
|
-
hostedZone = route53.HostedZone.fromLookup(scope, `${id}`, {
|
|
205
|
-
domainName: scope.fullyQualifiedDomainName,
|
|
206
|
-
})
|
|
207
|
-
} else {
|
|
208
|
-
hostedZone = new route53.HostedZone(scope, `${id}`, {
|
|
209
|
-
zoneName: scope.fullyQualifiedDomainName,
|
|
210
|
-
comment: `Hosted zone for ${scope.fullyQualifiedDomainName}`,
|
|
211
|
-
})
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
utils.createCfnOutput(`${id}-hostedZoneId`, scope, hostedZone.hostedZoneId)
|
|
215
|
-
utils.createCfnOutput(`${id}-hostedZoneArn`, scope, hostedZone.hostedZoneArn)
|
|
216
|
-
|
|
217
|
-
return hostedZone
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* @summary Method to create a-record for cloudfront target
|
|
222
|
-
* @param {string} id scoped id of the resource
|
|
223
|
-
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
224
|
-
* @param {cloudfront.IDistribution} distribution
|
|
225
|
-
* @param {route53.IHostedZone} hostedZone
|
|
226
|
-
* @param {string} recordName
|
|
227
|
-
*/
|
|
228
|
-
public createCloudFrontTargetARecord(
|
|
229
|
-
id: string,
|
|
230
|
-
scope: common.CommonConstruct,
|
|
231
|
-
distribution?: cloudfront.IDistribution,
|
|
232
|
-
hostedZone?: route53.IHostedZone,
|
|
233
|
-
recordName?: string
|
|
234
|
-
) {
|
|
235
|
-
if (!distribution) throw `Distribution undefined`
|
|
236
|
-
if (!hostedZone) throw `HostedZone undefined`
|
|
237
|
-
|
|
238
|
-
const aRecord = new route53.ARecord(scope, `${id}`, {
|
|
239
|
-
recordName: recordName && scope.isProductionStage() ? `${recordName}` : `${recordName}-${scope.props.stage}`,
|
|
240
|
-
target: route53.RecordTarget.fromAlias(new route53Targets.CloudFrontTarget(distribution)),
|
|
241
|
-
zone: hostedZone,
|
|
242
|
-
})
|
|
243
|
-
|
|
244
|
-
utils.createCfnOutput(`${id}-aRecordDomainName`, scope, aRecord.domainName)
|
|
245
|
-
|
|
246
|
-
return aRecord
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* @summary Method to create a-record for cloudfront target
|
|
251
|
-
* @param {string} id scoped id of the resource
|
|
252
|
-
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
253
|
-
* @param {cloudfront.IDistribution} distribution
|
|
254
|
-
* @param {route53.IHostedZone} hostedZone
|
|
255
|
-
* @param {string} recordName
|
|
256
|
-
*/
|
|
257
|
-
public createCloudFrontTargetARecordV2(
|
|
258
|
-
id: string,
|
|
259
|
-
scope: common.CommonConstruct,
|
|
260
|
-
distribution?: cloudfront.IDistribution,
|
|
261
|
-
hostedZone?: route53.IHostedZone,
|
|
262
|
-
recordName?: string
|
|
263
|
-
) {
|
|
264
|
-
if (!distribution) throw `Distribution undefined`
|
|
265
|
-
if (!hostedZone) throw `HostedZone undefined`
|
|
266
|
-
|
|
267
|
-
const aRecord = new route53.ARecord(scope, `${id}`, {
|
|
268
|
-
recordName: recordName,
|
|
269
|
-
target: route53.RecordTarget.fromAlias(new route53Targets.CloudFrontTarget(distribution)),
|
|
270
|
-
zone: hostedZone,
|
|
271
|
-
})
|
|
272
|
-
|
|
273
|
-
utils.createCfnOutput(`${id}-aRecordDomainName`, scope, aRecord.domainName)
|
|
274
|
-
|
|
275
|
-
return aRecord
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* @summary Method to create a-record for restApi gateway target
|
|
280
|
-
* @param {string} id scoped id of the resource
|
|
281
|
-
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
282
|
-
* @param recordName
|
|
283
|
-
* @param apiDomain
|
|
284
|
-
* @param hostedZone
|
|
285
|
-
*/
|
|
286
|
-
public createApiGatewayARecord(
|
|
287
|
-
id: string,
|
|
288
|
-
scope: common.CommonConstruct,
|
|
289
|
-
recordName: string,
|
|
290
|
-
apiDomain: apig.DomainName,
|
|
291
|
-
hostedZone: route53.IHostedZone
|
|
292
|
-
) {
|
|
293
|
-
let apiRecordName = ''
|
|
294
|
-
if (recordName && recordName !== '')
|
|
295
|
-
apiRecordName = scope.isProductionStage() ? `${recordName}` : `${recordName}-${scope.props.stage}`
|
|
296
|
-
|
|
297
|
-
const apiARecord = new route53.ARecord(scope, `${id}`, {
|
|
298
|
-
recordName: apiRecordName,
|
|
299
|
-
target: route53.RecordTarget.fromAlias(new route53Targets.ApiGatewayDomain(apiDomain)),
|
|
300
|
-
zone: hostedZone,
|
|
301
|
-
})
|
|
302
|
-
|
|
303
|
-
utils.createCfnOutput(`${id}-a-record-domain-name`, scope, apiARecord.domainName)
|
|
304
|
-
|
|
305
|
-
return apiARecord
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
</code></pre>
|
|
309
|
-
</article>
|
|
310
|
-
</section>
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
</div>
|
|
316
|
-
|
|
317
|
-
</div>
|
|
318
|
-
<div id="side-nav" class="side-nav">
|
|
319
|
-
</div>
|
|
320
|
-
</div>
|
|
321
|
-
<script src="scripts/app.min.js"></script>
|
|
322
|
-
<script>PR.prettyPrint();</script>
|
|
323
|
-
<script src="scripts/linenumber.js"> </script>
|
|
324
|
-
|
|
325
|
-
<script src="scripts/search.js"> </script>
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
</body>
|
|
329
|
-
</html>
|