@gradientedge/cdk-utils 4.4.7 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/api-destined-function/node_modules/.yarn-integrity +89 -2
- package/app/api-destined-function/node_modules/balanced-match/LICENSE.md +21 -0
- package/app/api-destined-function/node_modules/balanced-match/README.md +97 -0
- package/app/api-destined-function/node_modules/balanced-match/index.js +62 -0
- package/app/api-destined-function/node_modules/balanced-match/package.json +48 -0
- package/app/api-destined-function/node_modules/brace-expansion/LICENSE +21 -0
- package/app/api-destined-function/node_modules/brace-expansion/README.md +129 -0
- package/app/api-destined-function/node_modules/brace-expansion/index.js +201 -0
- package/app/api-destined-function/node_modules/brace-expansion/package.json +47 -0
- package/app/api-destined-function/node_modules/concat-map/.travis.yml +4 -0
- package/app/api-destined-function/node_modules/concat-map/LICENSE +18 -0
- package/app/api-destined-function/node_modules/concat-map/README.markdown +62 -0
- package/app/api-destined-function/node_modules/concat-map/example/map.js +6 -0
- package/app/api-destined-function/node_modules/concat-map/index.js +13 -0
- package/app/api-destined-function/node_modules/concat-map/package.json +43 -0
- package/app/api-destined-function/node_modules/fs.realpath/LICENSE +43 -0
- package/app/api-destined-function/node_modules/fs.realpath/README.md +33 -0
- package/app/api-destined-function/node_modules/fs.realpath/index.js +66 -0
- package/app/api-destined-function/node_modules/fs.realpath/old.js +303 -0
- package/app/api-destined-function/node_modules/fs.realpath/package.json +26 -0
- package/app/api-destined-function/node_modules/glob/LICENSE +21 -0
- package/app/api-destined-function/node_modules/glob/README.md +378 -0
- package/app/api-destined-function/node_modules/glob/common.js +236 -0
- package/app/api-destined-function/node_modules/glob/glob.js +787 -0
- package/app/api-destined-function/node_modules/glob/package.json +52 -0
- package/app/api-destined-function/node_modules/glob/sync.js +483 -0
- package/app/api-destined-function/node_modules/inflight/LICENSE +15 -0
- package/app/api-destined-function/node_modules/inflight/README.md +37 -0
- package/app/api-destined-function/node_modules/inflight/inflight.js +54 -0
- package/app/api-destined-function/node_modules/inflight/package.json +29 -0
- package/app/api-destined-function/node_modules/inherits/LICENSE +16 -0
- package/app/api-destined-function/node_modules/inherits/README.md +42 -0
- package/app/api-destined-function/node_modules/inherits/inherits.js +9 -0
- package/app/api-destined-function/node_modules/inherits/inherits_browser.js +27 -0
- package/app/api-destined-function/node_modules/inherits/package.json +29 -0
- package/app/api-destined-function/node_modules/minimatch/LICENSE +15 -0
- package/app/api-destined-function/node_modules/minimatch/README.md +209 -0
- package/app/api-destined-function/node_modules/minimatch/minimatch.js +952 -0
- package/app/api-destined-function/node_modules/minimatch/package.json +30 -0
- package/app/api-destined-function/node_modules/mkdirp/LICENSE +21 -0
- package/app/api-destined-function/node_modules/mkdirp/bin/cmd.js +68 -0
- package/app/api-destined-function/node_modules/mkdirp/index.js +31 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/find-made.js +29 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/mkdirp-manual.js +64 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/mkdirp-native.js +39 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/opts-arg.js +23 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/path-arg.js +29 -0
- package/app/api-destined-function/node_modules/mkdirp/lib/use-native.js +10 -0
- package/app/api-destined-function/node_modules/mkdirp/package.json +44 -0
- package/app/api-destined-function/node_modules/mkdirp/readme.markdown +266 -0
- package/app/api-destined-function/node_modules/once/LICENSE +15 -0
- package/app/api-destined-function/node_modules/once/README.md +79 -0
- package/app/api-destined-function/node_modules/once/once.js +42 -0
- package/app/api-destined-function/node_modules/once/package.json +33 -0
- package/app/api-destined-function/node_modules/path-is-absolute/index.js +20 -0
- package/app/api-destined-function/node_modules/path-is-absolute/license +21 -0
- package/app/api-destined-function/node_modules/path-is-absolute/package.json +43 -0
- package/app/api-destined-function/node_modules/path-is-absolute/readme.md +59 -0
- package/app/api-destined-function/node_modules/rimraf/LICENSE +15 -0
- package/app/api-destined-function/node_modules/rimraf/README.md +101 -0
- package/app/api-destined-function/node_modules/rimraf/bin.js +68 -0
- package/app/api-destined-function/node_modules/rimraf/package.json +32 -0
- package/app/api-destined-function/node_modules/rimraf/rimraf.js +360 -0
- package/app/api-destined-function/node_modules/uuid/dist/bin/uuid +2 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/app/api-destined-function/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/app/api-destined-function/node_modules/uuid/dist/index.js +79 -0
- package/app/api-destined-function/node_modules/uuid/dist/md5-browser.js +223 -0
- package/app/api-destined-function/node_modules/uuid/dist/md5.js +23 -0
- package/app/api-destined-function/node_modules/uuid/dist/nil.js +8 -0
- package/app/api-destined-function/node_modules/uuid/dist/parse.js +45 -0
- package/app/api-destined-function/node_modules/uuid/dist/regex.js +8 -0
- package/app/api-destined-function/node_modules/uuid/dist/rng-browser.js +26 -0
- package/app/api-destined-function/node_modules/uuid/dist/rng.js +24 -0
- package/app/api-destined-function/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/app/api-destined-function/node_modules/uuid/dist/sha1.js +23 -0
- package/app/api-destined-function/node_modules/uuid/dist/stringify.js +39 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/app/api-destined-function/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/app/api-destined-function/node_modules/uuid/dist/v1.js +107 -0
- package/app/api-destined-function/node_modules/uuid/dist/v3.js +16 -0
- package/app/api-destined-function/node_modules/uuid/dist/v35.js +78 -0
- package/app/api-destined-function/node_modules/uuid/dist/v4.js +37 -0
- package/app/api-destined-function/node_modules/uuid/dist/v5.js +16 -0
- package/app/api-destined-function/node_modules/uuid/dist/validate.js +17 -0
- package/app/api-destined-function/node_modules/uuid/dist/version.js +21 -0
- package/app/api-destined-function/node_modules/wrappy/LICENSE +15 -0
- package/app/api-destined-function/node_modules/wrappy/README.md +36 -0
- package/app/api-destined-function/node_modules/wrappy/package.json +29 -0
- package/app/api-destined-function/node_modules/wrappy/wrappy.js +33 -0
- package/app/api-destined-function/package.json +6 -1
- package/app/api-destined-function/src/lib/lambda.ts +1 -3
- package/dist/app/api-destined-function/layers/nodejs/node_modules/.bin/uuid +2 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/.yarn-integrity +109 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/LICENSE +21 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/README.md +16 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.mts +10 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.ts +80 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/package.json +54 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/LICENSE.md +9 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/README.md +505 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/bin/uuid +2 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/index.js +79 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5-browser.js +223 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5.js +23 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/nil.js +8 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/parse.js +45 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/regex.js +8 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng-browser.js +26 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng.js +24 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1.js +23 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/stringify.js +39 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v1.js +107 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v3.js +16 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v35.js +78 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v4.js +37 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v5.js +16 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/validate.js +17 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/version.js +21 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/package.json +135 -0
- package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/wrapper.mjs +10 -0
- package/dist/app/api-destined-function/layers/nodejs/package.json +30 -0
- package/dist/app/api-destined-function/src/lib/lambda.d.ts +17 -0
- package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +1 -0
- package/dist/app/api-destined-function/src/lib/lambda.js +32 -0
- package/dist/app/api-destined-function/src/lib/lambda.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/src/lib/common/construct.d.ts +81 -0
- package/dist/src/lib/common/construct.d.ts.map +1 -0
- package/dist/src/lib/common/construct.js +136 -0
- package/dist/src/lib/common/construct.js.map +1 -0
- package/dist/src/lib/common/index.d.ts +3 -0
- package/dist/src/lib/common/index.d.ts.map +1 -0
- package/dist/src/lib/common/index.js +15 -0
- package/dist/src/lib/common/index.js.map +1 -0
- package/dist/src/lib/common/stack.d.ts +55 -0
- package/dist/src/lib/common/stack.d.ts.map +1 -0
- package/dist/src/lib/common/stack.js +148 -0
- package/dist/src/lib/common/stack.js.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts +17 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js +18 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts +20 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js +20 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts +36 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js +30 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +5 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/index.js +17 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/index.js.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +135 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts.map +1 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +488 -0
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js.map +1 -0
- package/dist/src/lib/construct/graphql-api-lambda/index.d.ts +2 -0
- package/dist/src/lib/construct/graphql-api-lambda/index.d.ts.map +1 -0
- package/dist/src/lib/construct/graphql-api-lambda/index.js +14 -0
- package/dist/src/lib/construct/graphql-api-lambda/index.js.map +1 -0
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +113 -0
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts.map +1 -0
- package/dist/src/lib/construct/graphql-api-lambda/main.js +202 -0
- package/dist/src/lib/construct/graphql-api-lambda/main.js.map +1 -0
- package/dist/src/lib/construct/index.d.ts +5 -0
- package/dist/src/lib/construct/index.d.ts.map +1 -0
- package/dist/src/lib/construct/index.js +17 -0
- package/dist/src/lib/construct/index.js.map +1 -0
- package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts +2 -0
- package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts.map +1 -0
- package/dist/src/lib/construct/site-with-ecs-backend/index.js +14 -0
- package/dist/src/lib/construct/site-with-ecs-backend/index.js.map +1 -0
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +168 -0
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts.map +1 -0
- package/dist/src/lib/construct/site-with-ecs-backend/main.js +328 -0
- package/dist/src/lib/construct/site-with-ecs-backend/main.js.map +1 -0
- package/dist/src/lib/construct/static-site/index.d.ts +2 -0
- package/dist/src/lib/construct/static-site/index.d.ts.map +1 -0
- package/dist/src/lib/construct/static-site/index.js +14 -0
- package/dist/src/lib/construct/static-site/index.js.map +1 -0
- package/dist/src/lib/construct/static-site/main.d.ts +95 -0
- package/dist/src/lib/construct/static-site/main.d.ts.map +1 -0
- package/dist/src/lib/construct/static-site/main.js +169 -0
- package/dist/src/lib/construct/static-site/main.js.map +1 -0
- package/dist/src/lib/manager/aws/acm-manager.d.ts +47 -0
- package/dist/src/lib/manager/aws/acm-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/acm-manager.js +91 -0
- package/dist/src/lib/manager/aws/acm-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/api-manager.d.ts +44 -0
- package/dist/src/lib/manager/aws/api-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/api-manager.js +112 -0
- package/dist/src/lib/manager/aws/api-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/app-config-manager.d.ts +66 -0
- package/dist/src/lib/manager/aws/app-config-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/app-config-manager.js +149 -0
- package/dist/src/lib/manager/aws/app-config-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/cloudfront-manager.d.ts +113 -0
- package/dist/src/lib/manager/aws/cloudfront-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/cloudfront-manager.js +283 -0
- package/dist/src/lib/manager/aws/cloudfront-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts +49 -0
- package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/cloudtrail-manager.js +100 -0
- package/dist/src/lib/manager/aws/cloudtrail-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts +122 -0
- package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/cloudwatch-manager.js +353 -0
- package/dist/src/lib/manager/aws/cloudwatch-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/codebuild-manager.d.ts +41 -0
- package/dist/src/lib/manager/aws/codebuild-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/codebuild-manager.js +95 -0
- package/dist/src/lib/manager/aws/codebuild-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/dynamodb-manager.d.ts +33 -0
- package/dist/src/lib/manager/aws/dynamodb-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/dynamodb-manager.js +80 -0
- package/dist/src/lib/manager/aws/dynamodb-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/ecr-manager.d.ts +32 -0
- package/dist/src/lib/manager/aws/ecr-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/ecr-manager.js +61 -0
- package/dist/src/lib/manager/aws/ecr-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/ecs-manager.d.ts +49 -0
- package/dist/src/lib/manager/aws/ecs-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/ecs-manager.js +104 -0
- package/dist/src/lib/manager/aws/ecs-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/eks-manager.d.ts +37 -0
- package/dist/src/lib/manager/aws/eks-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/eks-manager.js +110 -0
- package/dist/src/lib/manager/aws/eks-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/elasticache-manager.d.ts +43 -0
- package/dist/src/lib/manager/aws/elasticache-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/elasticache-manager.js +103 -0
- package/dist/src/lib/manager/aws/elasticache-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/event-manager.d.ts +68 -0
- package/dist/src/lib/manager/aws/event-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/event-manager.js +163 -0
- package/dist/src/lib/manager/aws/event-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/iam-manager.d.ts +155 -0
- package/dist/src/lib/manager/aws/iam-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/iam-manager.js +381 -0
- package/dist/src/lib/manager/aws/iam-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/index.d.ts +24 -0
- package/dist/src/lib/manager/aws/index.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/index.js +36 -0
- package/dist/src/lib/manager/aws/index.js.map +1 -0
- package/dist/src/lib/manager/aws/lambda-manager.d.ts +95 -0
- package/dist/src/lib/manager/aws/lambda-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/lambda-manager.js +197 -0
- package/dist/src/lib/manager/aws/lambda-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/log-manager.d.ts +52 -0
- package/dist/src/lib/manager/aws/log-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/log-manager.js +109 -0
- package/dist/src/lib/manager/aws/log-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/route53-manager.d.ts +69 -0
- package/dist/src/lib/manager/aws/route53-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/route53-manager.js +159 -0
- package/dist/src/lib/manager/aws/route53-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/s3-manager.d.ts +74 -0
- package/dist/src/lib/manager/aws/s3-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/s3-manager.js +203 -0
- package/dist/src/lib/manager/aws/s3-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/secrets-manager.d.ts +58 -0
- package/dist/src/lib/manager/aws/secrets-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/secrets-manager.js +117 -0
- package/dist/src/lib/manager/aws/secrets-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/sns-manager.d.ts +43 -0
- package/dist/src/lib/manager/aws/sns-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/sns-manager.js +91 -0
- package/dist/src/lib/manager/aws/sns-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/ssm-manager.d.ts +61 -0
- package/dist/src/lib/manager/aws/ssm-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/ssm-manager.js +125 -0
- package/dist/src/lib/manager/aws/ssm-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/vpc-manager.d.ts +46 -0
- package/dist/src/lib/manager/aws/vpc-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/vpc-manager.js +95 -0
- package/dist/src/lib/manager/aws/vpc-manager.js.map +1 -0
- package/dist/src/lib/manager/aws/waf-manager.d.ts +40 -0
- package/dist/src/lib/manager/aws/waf-manager.d.ts.map +1 -0
- package/dist/src/lib/manager/aws/waf-manager.js +90 -0
- package/dist/src/lib/manager/aws/waf-manager.js.map +1 -0
- package/dist/src/lib/manager/index.d.ts +2 -0
- package/dist/src/lib/manager/index.d.ts.map +1 -0
- package/dist/src/lib/manager/index.js +14 -0
- package/dist/src/lib/manager/index.js.map +1 -0
- package/dist/src/lib/types/aws/index.d.ts +487 -0
- package/dist/src/lib/types/aws/index.d.ts.map +1 -0
- package/dist/src/lib/types/aws/index.js +3 -0
- package/dist/src/lib/types/aws/index.js.map +1 -0
- package/dist/src/lib/types/index.d.ts +2 -0
- package/dist/src/lib/types/index.d.ts.map +1 -0
- package/dist/src/lib/types/index.js +14 -0
- package/dist/src/lib/types/index.js.map +1 -0
- package/dist/src/lib/utils/aws/index.d.ts +16 -0
- package/dist/src/lib/utils/aws/index.d.ts.map +1 -0
- package/dist/src/lib/utils/aws/index.js +50 -0
- package/dist/src/lib/utils/aws/index.js.map +1 -0
- package/dist/src/lib/utils/index.d.ts +63 -0
- package/dist/src/lib/utils/index.d.ts.map +1 -0
- package/dist/src/lib/utils/index.js +85 -0
- package/dist/src/lib/utils/index.js.map +1 -0
- package/package.json +11 -11
- package/src/lib/common/construct.ts +2 -0
- package/src/lib/manager/aws/elasticache-manager.ts +98 -0
- package/src/lib/manager/aws/index.ts +1 -0
- package/src/lib/types/aws/index.ts +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudfront-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/cloudfront-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAA;AAClC,OAAO,KA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+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.CloudFrontManager = void 0;
|
|
23
|
+
const cdk = __importStar(require("aws-cdk-lib"));
|
|
24
|
+
const cloudfront = __importStar(require("aws-cdk-lib/aws-cloudfront"));
|
|
25
|
+
const lambda = __importStar(require("aws-cdk-lib/aws-lambda"));
|
|
26
|
+
const cr = __importStar(require("aws-cdk-lib/custom-resources"));
|
|
27
|
+
const utils = __importStar(require("../../utils"));
|
|
28
|
+
/**
|
|
29
|
+
* @stability stable
|
|
30
|
+
* @category cdk-utils.cloudfront-manager
|
|
31
|
+
* @subcategory Construct
|
|
32
|
+
* @classdesc Provides operations on AWS CloudFront.
|
|
33
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
34
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
35
|
+
* @example
|
|
36
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
37
|
+
*
|
|
38
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
39
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
40
|
+
* super(parent, id, props)
|
|
41
|
+
* this.props = props
|
|
42
|
+
* this.cloudFrontManager.createCloudFrontDistribution(
|
|
43
|
+
* 'MyDistribution',
|
|
44
|
+
* this,
|
|
45
|
+
* siteBucket,
|
|
46
|
+
* logBucket,
|
|
47
|
+
* originAccessIdentity,
|
|
48
|
+
* certificate
|
|
49
|
+
* )
|
|
50
|
+
* }
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* @see [CDK CloudFront Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront-readme.html}
|
|
54
|
+
*/
|
|
55
|
+
class CloudFrontManager {
|
|
56
|
+
createOriginAccessIdentity(id, scope, accessBucket) {
|
|
57
|
+
const oai = new cloudfront.OriginAccessIdentity(scope, `${id}`, {
|
|
58
|
+
comment: `${id} - ${scope.props.stage} stage`,
|
|
59
|
+
});
|
|
60
|
+
if (accessBucket)
|
|
61
|
+
accessBucket.grantRead(oai);
|
|
62
|
+
return oai;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use `createDistributionWithS3Origin` instead
|
|
66
|
+
*
|
|
67
|
+
* @summary Method to create a cloudfront distribution
|
|
68
|
+
* @param {string} id scoped id of the resource
|
|
69
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
70
|
+
* @param {types.CloudFrontProps} props distribution properties
|
|
71
|
+
* @param {s3.IBucket?} siteBucket
|
|
72
|
+
* @param {s3.IBucket?} logBucket
|
|
73
|
+
* @param {cloudfront.OriginAccessIdentity?} oai
|
|
74
|
+
* @param {acm.ICertificate?} certificate
|
|
75
|
+
* @param {string[]?} aliases
|
|
76
|
+
*/
|
|
77
|
+
createCloudFrontDistribution(id, scope, props, siteBucket, logBucket, oai, certificate, aliases) {
|
|
78
|
+
if (!siteBucket)
|
|
79
|
+
throw `SiteBucket not defined`;
|
|
80
|
+
if (!certificate)
|
|
81
|
+
throw `Certificate not defined`;
|
|
82
|
+
if (!props)
|
|
83
|
+
throw `CloudFront props undefined`;
|
|
84
|
+
const distribution = new cloudfront.CloudFrontWebDistribution(scope, `${id}`, {
|
|
85
|
+
comment: `${id} - ${scope.props.stage} stage`,
|
|
86
|
+
defaultRootObject: props.defaultRootObject,
|
|
87
|
+
enabled: props.enabled ?? true,
|
|
88
|
+
enableIpV6: props.enableIpV6,
|
|
89
|
+
errorConfigurations: props.errorConfigurations,
|
|
90
|
+
geoRestriction: props.geoRestriction,
|
|
91
|
+
httpVersion: props.httpVersion ?? cloudfront.HttpVersion.HTTP2,
|
|
92
|
+
loggingConfig: {
|
|
93
|
+
bucket: logBucket,
|
|
94
|
+
prefix: 'cloudfront/',
|
|
95
|
+
},
|
|
96
|
+
originConfigs: [
|
|
97
|
+
{
|
|
98
|
+
s3OriginSource: {
|
|
99
|
+
s3BucketSource: siteBucket,
|
|
100
|
+
originAccessIdentity: oai,
|
|
101
|
+
},
|
|
102
|
+
behaviors: [{ isDefaultBehavior: true }],
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
priceClass: props.priceClass ?? cloudfront.PriceClass.PRICE_CLASS_ALL,
|
|
106
|
+
viewerCertificate: cloudfront.ViewerCertificate.fromAcmCertificate(certificate, {
|
|
107
|
+
aliases: aliases ? [...aliases, ...[siteBucket.bucketName]] : [siteBucket.bucketName],
|
|
108
|
+
securityPolicy: cloudfront.SecurityPolicyProtocol.TLS_V1_1_2016,
|
|
109
|
+
sslMethod: cloudfront.SSLMethod.SNI,
|
|
110
|
+
}),
|
|
111
|
+
webACLId: props.webACLId,
|
|
112
|
+
});
|
|
113
|
+
utils.createCfnOutput(`${id}-distributionId`, scope, distribution.distributionId);
|
|
114
|
+
utils.createCfnOutput(`${id}-distributionDomainName`, scope, distribution.distributionDomainName);
|
|
115
|
+
return distribution;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Method to create a CloudFront distribution with S3 Origin
|
|
119
|
+
* @param {string} id scoped id of the resource
|
|
120
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
121
|
+
* @param {types.DistributionProps} props distribution properties
|
|
122
|
+
* @param {origins.S3Origin} origin
|
|
123
|
+
* @param {s3.IBucket} siteBucket
|
|
124
|
+
* @param {s3.IBucket?} logBucket
|
|
125
|
+
* @param {cloudfront.OriginAccessIdentity?} oai
|
|
126
|
+
* @param {acm.ICertificate?} certificate
|
|
127
|
+
* @param {string[]?} aliases
|
|
128
|
+
* @param {cloudfront.FunctionAssociation?} defaultFunctionAssociations
|
|
129
|
+
*/
|
|
130
|
+
createDistributionWithS3Origin(id, scope, props, origin, siteBucket, logBucket, oai, certificate, aliases, defaultFunctionAssociations) {
|
|
131
|
+
const distribution = new cloudfront.Distribution(scope, `${id}`, {
|
|
132
|
+
certificate: certificate,
|
|
133
|
+
comment: `${id} - ${scope.props.stage} stage`,
|
|
134
|
+
defaultBehavior: {
|
|
135
|
+
cachePolicy: props.defaultBehavior ? props.defaultBehavior.cachePolicy : undefined,
|
|
136
|
+
origin: origin,
|
|
137
|
+
originRequestPolicy: props.defaultBehavior ? props.defaultBehavior.originRequestPolicy : undefined,
|
|
138
|
+
functionAssociations: defaultFunctionAssociations ?? undefined,
|
|
139
|
+
},
|
|
140
|
+
additionalBehaviors: props.additionalBehaviors,
|
|
141
|
+
defaultRootObject: props.defaultRootObject,
|
|
142
|
+
domainNames: aliases ? [...aliases, ...[siteBucket.bucketName]] : [siteBucket.bucketName],
|
|
143
|
+
enabled: props.enabled ?? true,
|
|
144
|
+
enableIpv6: props.enableIpv6,
|
|
145
|
+
enableLogging: props.enableLogging ?? true,
|
|
146
|
+
errorResponses: props.errorResponses,
|
|
147
|
+
geoRestriction: props.geoRestriction,
|
|
148
|
+
httpVersion: props.httpVersion ?? cloudfront.HttpVersion.HTTP2,
|
|
149
|
+
logBucket: logBucket,
|
|
150
|
+
logIncludesCookies: props.logIncludesCookies ?? true,
|
|
151
|
+
logFilePrefix: props.logFilePrefix ?? `edge/`,
|
|
152
|
+
minimumProtocolVersion: props.minimumProtocolVersion ?? cloudfront.SecurityPolicyProtocol.TLS_V1_2_2021,
|
|
153
|
+
priceClass: props.priceClass ?? cloudfront.PriceClass.PRICE_CLASS_ALL,
|
|
154
|
+
webAclId: props.webAclId,
|
|
155
|
+
});
|
|
156
|
+
utils.createCfnOutput(`${id}-distributionId`, scope, distribution.distributionId);
|
|
157
|
+
utils.createCfnOutput(`${id}-distributionDomainName`, scope, distribution.distributionDomainName);
|
|
158
|
+
return distribution;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Method to create a CloudFront distribution with HTTP Origin
|
|
162
|
+
* @param {string} id scoped id of the resource
|
|
163
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
164
|
+
* @param {types.DistributionProps} props distribution properties
|
|
165
|
+
* @param {origins.S3Origin} origin
|
|
166
|
+
* @param {string[]} domainNames
|
|
167
|
+
* @param {s3.IBucket?} logBucket
|
|
168
|
+
* @param {acm.ICertificate?} certificate
|
|
169
|
+
* @param {cloudfront.FunctionAssociation?} defaultFunctionAssociations
|
|
170
|
+
*/
|
|
171
|
+
createDistributionWithHttpOrigin(id, scope, props, origin, domainNames, logBucket, certificate, defaultFunctionAssociations) {
|
|
172
|
+
const distribution = new cloudfront.Distribution(scope, `${id}`, {
|
|
173
|
+
certificate: certificate,
|
|
174
|
+
comment: `${id} - ${scope.props.stage} stage`,
|
|
175
|
+
defaultBehavior: {
|
|
176
|
+
cachePolicy: props.defaultBehavior ? props.defaultBehavior.cachePolicy : undefined,
|
|
177
|
+
origin: origin,
|
|
178
|
+
originRequestPolicy: props.defaultBehavior ? props.defaultBehavior.originRequestPolicy : undefined,
|
|
179
|
+
functionAssociations: defaultFunctionAssociations ?? undefined,
|
|
180
|
+
},
|
|
181
|
+
additionalBehaviors: props.additionalBehaviors,
|
|
182
|
+
defaultRootObject: props.defaultRootObject,
|
|
183
|
+
domainNames: domainNames,
|
|
184
|
+
enabled: props.enabled ?? true,
|
|
185
|
+
enableIpv6: props.enableIpv6,
|
|
186
|
+
enableLogging: props.enableLogging ?? true,
|
|
187
|
+
errorResponses: props.errorResponses,
|
|
188
|
+
geoRestriction: props.geoRestriction,
|
|
189
|
+
httpVersion: props.httpVersion ?? cloudfront.HttpVersion.HTTP2,
|
|
190
|
+
logBucket: logBucket,
|
|
191
|
+
logIncludesCookies: props.logIncludesCookies ?? true,
|
|
192
|
+
logFilePrefix: props.logFilePrefix ?? `edge/`,
|
|
193
|
+
minimumProtocolVersion: props.minimumProtocolVersion ?? cloudfront.SecurityPolicyProtocol.TLS_V1_2_2021,
|
|
194
|
+
priceClass: props.priceClass ?? cloudfront.PriceClass.PRICE_CLASS_ALL,
|
|
195
|
+
webAclId: props.webAclId,
|
|
196
|
+
});
|
|
197
|
+
utils.createCfnOutput(`${id}-distributionId`, scope, distribution.distributionId);
|
|
198
|
+
utils.createCfnOutput(`${id}-distributionDomainName`, scope, distribution.distributionDomainName);
|
|
199
|
+
return distribution;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @summary Method to provision a Lambda@Edge function
|
|
203
|
+
*
|
|
204
|
+
* @param {string} id scoped id of the resource
|
|
205
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
206
|
+
* @param {types.LambdaEdgeProps} props lambda@edge properties
|
|
207
|
+
* @param {lambda.ILayerVersion[]} layers
|
|
208
|
+
* @param {lambda.AssetCode} code
|
|
209
|
+
* @param {Map<string, string>} environment
|
|
210
|
+
* @param {ec2.IVpc} vpc
|
|
211
|
+
* @param {ec2.ISecurityGroup[]} securityGroups
|
|
212
|
+
* @param {efs.IAccessPoint} accessPoint
|
|
213
|
+
* @param {string} mountPath
|
|
214
|
+
*/
|
|
215
|
+
createEdgeFunction(id, scope, props, layers, code, environment, vpc, securityGroups, accessPoint, mountPath) {
|
|
216
|
+
if (!props)
|
|
217
|
+
throw 'EdgeFunction props undefined';
|
|
218
|
+
const edgeFunction = new cloudfront.experimental.EdgeFunction(scope, `${id}`, {
|
|
219
|
+
code: code,
|
|
220
|
+
environment: {
|
|
221
|
+
...environment,
|
|
222
|
+
},
|
|
223
|
+
filesystem: accessPoint ? lambda.FileSystem.fromEfsAccessPoint(accessPoint, mountPath ?? '/mnt/msg') : undefined,
|
|
224
|
+
functionName: `${props.functionName}-${scope.props.stage}`,
|
|
225
|
+
handler: props.handler ?? 'index.handler',
|
|
226
|
+
layers: layers,
|
|
227
|
+
logRetention: props.logRetention,
|
|
228
|
+
memorySize: props.memorySize,
|
|
229
|
+
reservedConcurrentExecutions: props.reservedConcurrentExecutions,
|
|
230
|
+
runtime: props.runtime ?? lambda.Runtime.NODEJS_14_X,
|
|
231
|
+
securityGroups: securityGroups,
|
|
232
|
+
stackId: `${id}-stack-id-${scope.props.stage}`,
|
|
233
|
+
timeout: props.timeoutInSecs ? cdk.Duration.seconds(props.timeoutInSecs) : cdk.Duration.minutes(1),
|
|
234
|
+
vpc: vpc,
|
|
235
|
+
});
|
|
236
|
+
utils.createCfnOutput(`${id}-edgeArn`, scope, edgeFunction.edgeArn);
|
|
237
|
+
utils.createCfnOutput(`${id}-edgeFunctionArn`, scope, edgeFunction.functionArn);
|
|
238
|
+
utils.createCfnOutput(`${id}-edgeFunctionName`, scope, edgeFunction.functionName);
|
|
239
|
+
return edgeFunction;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
*
|
|
243
|
+
* @param id
|
|
244
|
+
* @param scope
|
|
245
|
+
* @param dockerFilePath
|
|
246
|
+
* @param distributionId
|
|
247
|
+
* @param paths
|
|
248
|
+
*/
|
|
249
|
+
invalidateCache(id, scope, dockerFilePath, distributionId, paths) {
|
|
250
|
+
new cr.AwsCustomResource(scope, `${id}-trigger-codebuild-${new Date().getTime()}`, {
|
|
251
|
+
onCreate: {
|
|
252
|
+
service: 'CodeBuild',
|
|
253
|
+
action: 'startBuild',
|
|
254
|
+
parameters: {
|
|
255
|
+
projectName: scope.codeBuildManager.createProjectForCloudfrontInvalidation(id, scope, dockerFilePath, distributionId, paths).projectName,
|
|
256
|
+
},
|
|
257
|
+
physicalResourceId: cr.PhysicalResourceId.fromResponse('build.id'),
|
|
258
|
+
},
|
|
259
|
+
policy: cr.AwsCustomResourcePolicy.fromSdkCalls({ resources: cr.AwsCustomResourcePolicy.ANY_RESOURCE }),
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* @summary Method to provision a Cloudfront function
|
|
264
|
+
*
|
|
265
|
+
* @param {string} id scoped id of the resource
|
|
266
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
267
|
+
* @param {types.CloudfrontFunctionProps} props
|
|
268
|
+
*/
|
|
269
|
+
createCloudfrontFunction(id, scope, props) {
|
|
270
|
+
const cloudfrontFunction = new cloudfront.Function(scope, `${id}`, {
|
|
271
|
+
code: cloudfront.FunctionCode.fromFile({
|
|
272
|
+
filePath: props.functionFilePath,
|
|
273
|
+
}),
|
|
274
|
+
comment: props.comment,
|
|
275
|
+
functionName: `${props.functionName}-${scope.props.stage}`,
|
|
276
|
+
});
|
|
277
|
+
utils.createCfnOutput(`${id}-functionArn`, scope, cloudfrontFunction.functionArn);
|
|
278
|
+
utils.createCfnOutput(`${id}-functionName`, scope, cloudfrontFunction.functionName);
|
|
279
|
+
return cloudfrontFunction;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
exports.CloudFrontManager = CloudFrontManager;
|
|
283
|
+
//# sourceMappingURL=cloudfront-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudfront-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/cloudfront-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAkC;AAElC,uEAAwD;AAIxD,+DAAgD;A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,sCAAsC,CACxE,EAAE,EACF,KAAK,EACL,cAAc,EACd,cAAc,EACd,KAAK,CACN,CAAC,WAAW;iBACd;gBACD,kBAAkB,EAAE,EAAE,CAAC,kBAAkB,CAAC,YAAY,CAAC,UAAU,CAAC;aACnE;YACD,MAAM,EAAE,EAAE,CAAC,uBAAuB,CAAC,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,YAAY,EAAE,CAAC;SACxG,CAAC,CAAA;IACJ,CAAC;IAED;;;;;;OAMG;IACI,wBAAwB,CAAC,EAAU,EAAE,KAA6B,EAAE,KAAoC;QAC7G,MAAM,kBAAkB,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACjE,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC;gBACrC,QAAQ,EAAE,KAAK,CAAC,gBAAgB;aACjC,CAAC;YACF,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,YAAY,EAAE,GAAG,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;SAC3D,CAAC,CAAA;QAEF,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;QACjF,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAA;QAEnF,OAAO,kBAAkB,CAAA;IAC3B,CAAC;CACF;AApSD,8CAoSC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as cloudtrail from 'aws-cdk-lib/aws-cloudtrail';
|
|
2
|
+
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
3
|
+
import * as s3 from 'aws-cdk-lib/aws-s3';
|
|
4
|
+
import * as common from '../../common';
|
|
5
|
+
import * as types from '../../types';
|
|
6
|
+
/**
|
|
7
|
+
* @stability stable
|
|
8
|
+
* @category cdk-utils.cloudtrail-manager
|
|
9
|
+
* @subcategory Construct
|
|
10
|
+
* @classdesc Provides operations on AWS CloudTrail.
|
|
11
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
12
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
13
|
+
* @example
|
|
14
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
15
|
+
*
|
|
16
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
17
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
18
|
+
* super(parent, id, props)
|
|
19
|
+
* this.props = props
|
|
20
|
+
* this.cloudTrailManager.createCloudTrail(
|
|
21
|
+
* 'MyTrail',
|
|
22
|
+
* this,
|
|
23
|
+
* logGroup,
|
|
24
|
+
* dataBucket,
|
|
25
|
+
* logBucket,
|
|
26
|
+
* logBucketPolicy
|
|
27
|
+
* )
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* @see [CDK CloudTrail Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudtrail-readme.html}
|
|
32
|
+
*/
|
|
33
|
+
export declare class CloudTrailManager {
|
|
34
|
+
/**
|
|
35
|
+
* @summary Method to create a cloud trail
|
|
36
|
+
* @param {string} id scoped id of the resource
|
|
37
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
38
|
+
* @param {types.CloudTrailProps} props
|
|
39
|
+
* @param {logs.CfnLogGroup} logGroup
|
|
40
|
+
* @param {s3.IBucket} dataBucket
|
|
41
|
+
* @param {s3.IBucket} logBucket
|
|
42
|
+
* @param {s3.CfnBucketPolicy} logBucketPolicy
|
|
43
|
+
*/
|
|
44
|
+
createCloudTrail(id: string, scope: common.CommonConstruct, props: types.CloudTrailProps, logGroup: logs.CfnLogGroup, dataBucket: s3.IBucket, logBucket: s3.IBucket, logBucketPolicy: s3.CfnBucketPolicy): {
|
|
45
|
+
cloudTrailRole: import("aws-cdk-lib/aws-iam").CfnRole;
|
|
46
|
+
cloudTrail: cloudtrail.CfnTrail;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=cloudtrail-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudtrail-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/cloudtrail-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAA;AACxD,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAA;AACxC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAGpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,iBAAiB;IAC5B;;;;;;;;;OASG;IACI,gBAAgB,CACrB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,KAAK,EAAE,KAAK,CAAC,eAAe,EAC5B,QAAQ,EAAE,IAAI,CAAC,WAAW,EAC1B,UAAU,EAAE,EAAE,CAAC,OAAO,EACtB,SAAS,EAAE,EAAE,CAAC,OAAO,EACrB,eAAe,EAAE,EAAE,CAAC,eAAe;;;;CAwCtC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.CloudTrailManager = void 0;
|
|
23
|
+
const cloudtrail = __importStar(require("aws-cdk-lib/aws-cloudtrail"));
|
|
24
|
+
const utils = __importStar(require("../../utils"));
|
|
25
|
+
/**
|
|
26
|
+
* @stability stable
|
|
27
|
+
* @category cdk-utils.cloudtrail-manager
|
|
28
|
+
* @subcategory Construct
|
|
29
|
+
* @classdesc Provides operations on AWS CloudTrail.
|
|
30
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
31
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
32
|
+
* @example
|
|
33
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
34
|
+
*
|
|
35
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
36
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
37
|
+
* super(parent, id, props)
|
|
38
|
+
* this.props = props
|
|
39
|
+
* this.cloudTrailManager.createCloudTrail(
|
|
40
|
+
* 'MyTrail',
|
|
41
|
+
* this,
|
|
42
|
+
* logGroup,
|
|
43
|
+
* dataBucket,
|
|
44
|
+
* logBucket,
|
|
45
|
+
* logBucketPolicy
|
|
46
|
+
* )
|
|
47
|
+
* }
|
|
48
|
+
* }
|
|
49
|
+
*
|
|
50
|
+
* @see [CDK CloudTrail Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudtrail-readme.html}
|
|
51
|
+
*/
|
|
52
|
+
class CloudTrailManager {
|
|
53
|
+
/**
|
|
54
|
+
* @summary Method to create a cloud trail
|
|
55
|
+
* @param {string} id scoped id of the resource
|
|
56
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
57
|
+
* @param {types.CloudTrailProps} props
|
|
58
|
+
* @param {logs.CfnLogGroup} logGroup
|
|
59
|
+
* @param {s3.IBucket} dataBucket
|
|
60
|
+
* @param {s3.IBucket} logBucket
|
|
61
|
+
* @param {s3.CfnBucketPolicy} logBucketPolicy
|
|
62
|
+
*/
|
|
63
|
+
createCloudTrail(id, scope, props, logGroup, dataBucket, logBucket, logBucketPolicy) {
|
|
64
|
+
if (!props)
|
|
65
|
+
throw `CloudTrail props undefined`;
|
|
66
|
+
const role = scope.iamManager.createRoleForCloudTrail(`${id}Role`, scope, logGroup);
|
|
67
|
+
const cloudTrail = new cloudtrail.CfnTrail(scope, `${id}`, {
|
|
68
|
+
cloudWatchLogsLogGroupArn: logGroup.attrArn,
|
|
69
|
+
cloudWatchLogsRoleArn: role.attrArn,
|
|
70
|
+
enableLogFileValidation: props.enableLogFileValidation,
|
|
71
|
+
eventSelectors: [
|
|
72
|
+
{
|
|
73
|
+
dataResources: [
|
|
74
|
+
{
|
|
75
|
+
type: 'AWS::S3::Object',
|
|
76
|
+
values: [dataBucket.arnForObjects('')],
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
includeManagementEvents: false,
|
|
80
|
+
readWriteType: 'WriteOnly',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
includeGlobalServiceEvents: props.includeGlobalServiceEvents,
|
|
84
|
+
isLogging: props.isLogging,
|
|
85
|
+
isMultiRegionTrail: props.isMultiRegionTrail,
|
|
86
|
+
s3BucketName: logBucket.bucketName,
|
|
87
|
+
s3KeyPrefix: `logs-${props.trailName}`,
|
|
88
|
+
tags: [{ key: 'service', value: scope.props.name }],
|
|
89
|
+
trailName: `${props.trailName}-${scope.props.stage}`,
|
|
90
|
+
});
|
|
91
|
+
cloudTrail.addDependsOn(logBucketPolicy);
|
|
92
|
+
cloudTrail.addDependsOn(logGroup);
|
|
93
|
+
cloudTrail.addDependsOn(role);
|
|
94
|
+
utils.createCfnOutput(`${id}-trailName`, scope, cloudTrail.trailName);
|
|
95
|
+
utils.createCfnOutput(`${id}-trailArn`, scope, cloudTrail.attrArn);
|
|
96
|
+
return { cloudTrailRole: role, cloudTrail };
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.CloudTrailManager = CloudTrailManager;
|
|
100
|
+
//# sourceMappingURL=cloudtrail-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudtrail-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/cloudtrail-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAwD;AAKxD,mDAAoC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAa,iBAAiB;IAC5B;;;;;;;;;OASG;IACI,gBAAgB,CACrB,EAAU,EACV,KAA6B,EAC7B,KAA4B,EAC5B,QAA0B,EAC1B,UAAsB,EACtB,SAAqB,EACrB,eAAmC;QAEnC,IAAI,CAAC,KAAK;YAAE,MAAM,4BAA4B,CAAA;QAE9C,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAA;QAEnF,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YACzD,yBAAyB,EAAE,QAAQ,CAAC,OAAO;YAC3C,qBAAqB,EAAE,IAAI,CAAC,OAAO;YACnC,uBAAuB,EAAE,KAAK,CAAC,uBAAuB;YACtD,cAAc,EAAE;gBACd;oBACE,aAAa,EAAE;wBACb;4BACE,IAAI,EAAE,iBAAiB;4BACvB,MAAM,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;yBACvC;qBACF;oBACD,uBAAuB,EAAE,KAAK;oBAC9B,aAAa,EAAE,WAAW;iBAC3B;aACF;YACD,0BAA0B,EAAE,KAAK,CAAC,0BAA0B;YAC5D,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;YAC5C,YAAY,EAAE,SAAS,CAAC,UAAU;YAClC,WAAW,EAAE,QAAQ,KAAK,CAAC,SAAS,EAAE;YACtC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YACnD,SAAS,EAAE,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;SACrD,CAAC,CAAA;QAEF,UAAU,CAAC,YAAY,CAAC,eAAe,CAAC,CAAA;QACxC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAA;QACjC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;QAE7B,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;QACrE,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;QAElE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;IAC7C,CAAC;CACF;AA1DD,8CA0DC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
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 * as common from '../../common';
|
|
5
|
+
import * as types 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 common.CommonConstruct} constructor.
|
|
12
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
13
|
+
* @example
|
|
14
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
15
|
+
*
|
|
16
|
+
* class CustomConstruct extends common.common.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 {common.CommonConstruct} scope scope in which this resource is defined
|
|
31
|
+
* @param {types.AlarmProps} props
|
|
32
|
+
*/
|
|
33
|
+
createAlarmForExpression(id: string, scope: common.CommonConstruct, props: types.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 {common.CommonConstruct} scope scope in which this resource is defined
|
|
38
|
+
* @param {types.AlarmProps} props
|
|
39
|
+
* @param metric
|
|
40
|
+
*/
|
|
41
|
+
createAlarmForMetric(id: string, scope: common.CommonConstruct, props: types.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 {common.CommonConstruct} scope scope in which this resource is defined
|
|
46
|
+
* @param {types.DashboardProps} props
|
|
47
|
+
* @param widgets
|
|
48
|
+
*/
|
|
49
|
+
createDashboard(id: string, scope: common.CommonConstruct, props: types.DashboardProps, widgets?: watch.IWidget[][]): cdk.aws_cloudwatch.Dashboard;
|
|
50
|
+
/**
|
|
51
|
+
* @summary Method to create cloudwatch widgets
|
|
52
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
53
|
+
* @param props
|
|
54
|
+
*/
|
|
55
|
+
createWidgets(scope: common.CommonConstruct, props: any[]): any;
|
|
56
|
+
/**
|
|
57
|
+
* @summary Method to create a cloudwatch widget
|
|
58
|
+
* @param {string} id scoped id of the resource
|
|
59
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
60
|
+
* @param props
|
|
61
|
+
*/
|
|
62
|
+
createWidget(id: string, scope: common.CommonConstruct, props: any): 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 cloudwatch text widget
|
|
65
|
+
* @param {string} id scoped id of the resource
|
|
66
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
67
|
+
* @param {types.TextWidgetProps} props
|
|
68
|
+
*/
|
|
69
|
+
createTextWidget(id: string, scope: common.CommonConstruct, props: types.TextWidgetProps): cdk.aws_cloudwatch.TextWidget;
|
|
70
|
+
/**
|
|
71
|
+
* @summary Method to create a cloudwatch numeric widget
|
|
72
|
+
* @param {string} id scoped id of the resource
|
|
73
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
74
|
+
* @param {types.NumericWidgetProps} props
|
|
75
|
+
* @param metrics
|
|
76
|
+
*/
|
|
77
|
+
createSingleValueWidget(id: string, scope: common.CommonConstruct, props: types.NumericWidgetProps, metrics: IMetric[]): cdk.aws_cloudwatch.SingleValueWidget;
|
|
78
|
+
/**
|
|
79
|
+
* @summary Method to create a cloudwatch graph widget
|
|
80
|
+
* @param {string} id scoped id of the resource
|
|
81
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
82
|
+
* @param {types.GraphWidgetProps} props
|
|
83
|
+
* @param leftYMetrics
|
|
84
|
+
* @param rightYMetrics
|
|
85
|
+
*/
|
|
86
|
+
createGraphWidget(id: string, scope: common.CommonConstruct, props: types.GraphWidgetProps, leftYMetrics?: IMetric[], rightYMetrics?: IMetric[]): cdk.aws_cloudwatch.GraphWidget;
|
|
87
|
+
/**
|
|
88
|
+
* @summary Method to create a cloudwatch alarm status widget
|
|
89
|
+
* @param {string} id scoped id of the resource
|
|
90
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
91
|
+
* @param {types.AlarmStatusWidgetProps} props
|
|
92
|
+
* @param {watch.IAlarm[]} alarms
|
|
93
|
+
*/
|
|
94
|
+
createAlarmStatusWidget(id: string, scope: common.CommonConstruct, props: types.AlarmStatusWidgetProps, alarms: watch.IAlarm[]): cdk.aws_cloudwatch.AlarmStatusWidget;
|
|
95
|
+
/**
|
|
96
|
+
* @summary Method to create a cloudwatch log query widget
|
|
97
|
+
* @param {string} id scoped id of the resource
|
|
98
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
99
|
+
* @param {types.LogQueryWidgetProps} props
|
|
100
|
+
* @param {string[]} logGroupNames
|
|
101
|
+
*/
|
|
102
|
+
createLogQueryWidget(id: string, scope: common.CommonConstruct, props: types.LogQueryWidgetProps, logGroupNames: string[]): cdk.aws_cloudwatch.LogQueryWidget;
|
|
103
|
+
/**
|
|
104
|
+
* @summary Utility method to determine the metrics and dimensions
|
|
105
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
106
|
+
* @param {types.MetricProps[]} metricProps
|
|
107
|
+
*/
|
|
108
|
+
private determineMetrics;
|
|
109
|
+
/**
|
|
110
|
+
* @summary Utility method to determine the time range
|
|
111
|
+
* @param {string?} range
|
|
112
|
+
*/
|
|
113
|
+
private static determineTimeRange;
|
|
114
|
+
/**
|
|
115
|
+
* @summary Utility method to determine the configured alarms
|
|
116
|
+
* @param {string} id scoped id of the resource
|
|
117
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
118
|
+
* @param {watch.AlarmProps[]} alarmProps
|
|
119
|
+
*/
|
|
120
|
+
private determineAlarms;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=cloudwatch-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudwatch-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/cloudwatch-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAepC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,iBAAiB;IAC5B;;;;;OAKG;IACI,wBAAwB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU;IAgClG;;;;;;OAMG;IACI,oBAAoB,CACzB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,KAAK,EAAE,KAAK,CAAC,UAAU,EACvB,MAAM,EAAE,KAAK,CAAC,MAAM;IAoBtB;;;;;;OAMG;IACI,eAAe,CACpB,EAAE,EAAE,MAAM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