terraconstructs 0.0.24 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (422) hide show
  1. package/.jsii +83665 -54911
  2. package/.mise.toml +1 -1
  3. package/.nvmrc +1 -1
  4. package/LICENSE +202 -674
  5. package/go.mod +9 -7
  6. package/go.sum +18 -14
  7. package/lib/asset-manager.d.ts +23 -0
  8. package/lib/asset-manager.js +3 -0
  9. package/lib/asset-staging.d.ts +178 -0
  10. package/lib/asset-staging.js +589 -0
  11. package/lib/assets.d.ts +359 -0
  12. package/lib/assets.js +55 -0
  13. package/lib/aws/arn.js +16 -15
  14. package/lib/aws/aws-asset-manager.d.ts +91 -0
  15. package/lib/aws/aws-asset-manager.js +244 -0
  16. package/lib/aws/aws-construct.js +1 -1
  17. package/lib/aws/aws-stack.d.ts +37 -0
  18. package/lib/aws/aws-stack.js +30 -9
  19. package/lib/aws/aws-tags.js +2 -2
  20. package/lib/aws/cloudwatch/actions/appscaling.d.ts +15 -0
  21. package/lib/aws/cloudwatch/actions/appscaling.js +24 -0
  22. package/lib/aws/cloudwatch/actions/ec2.js +1 -1
  23. package/lib/aws/cloudwatch/actions/index.d.ts +3 -0
  24. package/lib/aws/cloudwatch/actions/index.js +4 -4
  25. package/lib/aws/cloudwatch/actions/lambda.js +1 -1
  26. package/lib/aws/cloudwatch/actions/sns.d.ts +14 -0
  27. package/lib/aws/cloudwatch/actions/sns.js +23 -0
  28. package/lib/aws/cloudwatch/actions/ssm.d.ts +72 -0
  29. package/lib/aws/cloudwatch/actions/ssm.js +104 -0
  30. package/lib/aws/cloudwatch/alarm-base.js +1 -1
  31. package/lib/aws/cloudwatch/alarm-rule.js +1 -1
  32. package/lib/aws/cloudwatch/alarm-status-widget.js +1 -1
  33. package/lib/aws/cloudwatch/alarm.js +1 -1
  34. package/lib/aws/cloudwatch/composite-alarm.js +1 -1
  35. package/lib/aws/cloudwatch/dashboard.js +1 -1
  36. package/lib/aws/cloudwatch/data-protection-policy.js +3 -3
  37. package/lib/aws/cloudwatch/graph.js +8 -8
  38. package/lib/aws/cloudwatch/layout.js +3 -3
  39. package/lib/aws/cloudwatch/log-destinations/kinesis.js +1 -1
  40. package/lib/aws/cloudwatch/log-destinations/lambda.js +1 -1
  41. package/lib/aws/cloudwatch/log-group.js +1 -1
  42. package/lib/aws/cloudwatch/log-query.js +1 -1
  43. package/lib/aws/cloudwatch/log-stream.js +1 -1
  44. package/lib/aws/cloudwatch/metric-filter.js +1 -1
  45. package/lib/aws/cloudwatch/metric.js +2 -2
  46. package/lib/aws/cloudwatch/pattern.js +3 -3
  47. package/lib/aws/cloudwatch/policy.js +1 -1
  48. package/lib/aws/cloudwatch/query-definition.js +2 -2
  49. package/lib/aws/cloudwatch/stats.js +1 -1
  50. package/lib/aws/cloudwatch/subscription-filter.js +1 -1
  51. package/lib/aws/cloudwatch/text.js +1 -1
  52. package/lib/aws/cloudwatch/variable.js +3 -3
  53. package/lib/aws/cloudwatch/widget.js +1 -1
  54. package/lib/aws/compute/access-log.d.ts +478 -0
  55. package/lib/aws/compute/access-log.js +649 -0
  56. package/lib/aws/compute/activity.js +1 -1
  57. package/lib/aws/compute/alb/application-listener-action.js +1 -1
  58. package/lib/aws/compute/alb/application-listener-certificate.js +1 -1
  59. package/lib/aws/compute/alb/application-listener-rule.js +1 -1
  60. package/lib/aws/compute/alb/application-listener.js +1 -1
  61. package/lib/aws/compute/alb/application-load-balancer.js +1 -1
  62. package/lib/aws/compute/alb/application-target-group.js +1 -1
  63. package/lib/aws/compute/alb/conditions.js +1 -1
  64. package/lib/aws/compute/alb/trust-store-revocation.js +1 -1
  65. package/lib/aws/compute/alb/trust-store.js +1 -1
  66. package/lib/aws/compute/api-definition.d.ts +106 -0
  67. package/lib/aws/compute/api-definition.js +200 -0
  68. package/lib/aws/compute/api-key.d.ts +184 -0
  69. package/lib/aws/compute/api-key.js +197 -0
  70. package/lib/aws/compute/apigateway-canned-metrics.generated.d.ts +169 -0
  71. package/lib/aws/compute/apigateway-canned-metrics.generated.js +63 -0
  72. package/lib/aws/compute/apigateway-util.d.ts +31 -0
  73. package/lib/aws/compute/apigateway-util.js +152 -0
  74. package/lib/aws/compute/architecture.js +1 -1
  75. package/lib/aws/compute/aspects/require-imdsv2-aspect.js +2 -2
  76. package/lib/aws/compute/authorizer.d.ts +35 -0
  77. package/lib/aws/compute/authorizer.js +28 -0
  78. package/lib/aws/compute/authorizers/identity-source.d.ts +37 -0
  79. package/lib/aws/compute/authorizers/identity-source.js +61 -0
  80. package/lib/aws/compute/authorizers/index.d.ts +2 -0
  81. package/lib/aws/compute/authorizers/index.js +20 -0
  82. package/lib/aws/compute/authorizers/lambda.d.ts +140 -0
  83. package/lib/aws/compute/authorizers/lambda.js +208 -0
  84. package/lib/aws/compute/base-path-mapping.d.ts +49 -0
  85. package/lib/aws/compute/base-path-mapping.js +52 -0
  86. package/lib/aws/compute/base-scalable-attribute.js +3 -3
  87. package/lib/aws/compute/bastion-host.js +1 -1
  88. package/lib/aws/compute/chain.js +1 -1
  89. package/lib/aws/compute/client-vpn-authorization-rule.js +1 -1
  90. package/lib/aws/compute/client-vpn-endpoint.js +2 -2
  91. package/lib/aws/compute/client-vpn-route.js +2 -2
  92. package/lib/aws/compute/code.d.ts +415 -0
  93. package/lib/aws/compute/code.js +424 -0
  94. package/lib/aws/compute/condition.js +1 -1
  95. package/lib/aws/compute/connections.js +1 -1
  96. package/lib/aws/compute/cors.d.ts +102 -0
  97. package/lib/aws/compute/cors.js +33 -0
  98. package/lib/aws/compute/deployment.d.ts +83 -0
  99. package/lib/aws/compute/deployment.js +158 -0
  100. package/lib/aws/compute/domain-name.d.ts +153 -0
  101. package/lib/aws/compute/domain-name.js +158 -0
  102. package/lib/aws/compute/event-invoke-config.d.ts +2 -2
  103. package/lib/aws/compute/event-invoke-config.js +4 -4
  104. package/lib/aws/compute/event-source-filter.js +2 -2
  105. package/lib/aws/compute/event-source-mapping.d.ts +2 -2
  106. package/lib/aws/compute/event-source-mapping.js +9 -7
  107. package/lib/aws/compute/event-sources/s3-onfailure-destination.js +1 -1
  108. package/lib/aws/compute/event-sources/s3.js +1 -1
  109. package/lib/aws/compute/event-sources/sqs-dlq.js +1 -1
  110. package/lib/aws/compute/event-sources/sqs.js +3 -2
  111. package/lib/aws/compute/fields.js +4 -4
  112. package/lib/aws/compute/function-alias.d.ts +1 -0
  113. package/lib/aws/compute/function-alias.js +8 -2
  114. package/lib/aws/compute/function-base.d.ts +15 -0
  115. package/lib/aws/compute/function-base.js +4 -4
  116. package/lib/aws/compute/function-destinations/event-bridge.js +1 -1
  117. package/lib/aws/compute/function-destinations/function.js +1 -1
  118. package/lib/aws/compute/function-destinations/sqs.js +1 -1
  119. package/lib/aws/compute/function-nodejs/bundling.d.ts +75 -0
  120. package/lib/aws/compute/function-nodejs/bundling.js +405 -0
  121. package/lib/aws/compute/function-nodejs/function.d.ts +99 -0
  122. package/lib/aws/compute/function-nodejs/function.js +175 -0
  123. package/lib/aws/compute/function-nodejs/index.d.ts +2 -0
  124. package/lib/aws/compute/function-nodejs/index.js +19 -0
  125. package/lib/aws/compute/function-nodejs/package-installation.d.ts +8 -0
  126. package/lib/aws/compute/function-nodejs/package-installation.js +36 -0
  127. package/lib/aws/compute/function-nodejs/package-manager.d.ts +33 -0
  128. package/lib/aws/compute/function-nodejs/package-manager.js +99 -0
  129. package/lib/aws/compute/function-nodejs/types.d.ts +410 -0
  130. package/lib/aws/compute/function-nodejs/types.js +81 -0
  131. package/lib/aws/compute/function-nodejs/util.d.ts +60 -0
  132. package/lib/aws/compute/function-nodejs/util.js +202 -0
  133. package/lib/aws/compute/function-url.d.ts +2 -2
  134. package/lib/aws/compute/function-url.js +4 -4
  135. package/lib/aws/compute/function.d.ts +34 -4
  136. package/lib/aws/compute/function.js +91 -17
  137. package/lib/aws/compute/gateway-response.d.ts +157 -0
  138. package/lib/aws/compute/gateway-response.js +156 -0
  139. package/lib/aws/compute/handler.d.ts +10 -0
  140. package/lib/aws/compute/handler.js +20 -0
  141. package/lib/aws/compute/index.d.ts +27 -0
  142. package/lib/aws/compute/index.js +29 -1
  143. package/lib/aws/compute/instance-types.js +1 -1
  144. package/lib/aws/compute/instance.js +1 -1
  145. package/lib/aws/compute/integration.d.ts +311 -0
  146. package/lib/aws/compute/integration.js +165 -0
  147. package/lib/aws/compute/integrations/aws.d.ts +72 -0
  148. package/lib/aws/compute/integrations/aws.js +55 -0
  149. package/lib/aws/compute/integrations/http.d.ts +37 -0
  150. package/lib/aws/compute/integrations/http.js +35 -0
  151. package/lib/aws/compute/integrations/index.d.ts +6 -0
  152. package/lib/aws/compute/integrations/index.js +24 -0
  153. package/lib/aws/compute/integrations/lambda.d.ts +40 -0
  154. package/lib/aws/compute/integrations/lambda.js +73 -0
  155. package/lib/aws/compute/integrations/mock.d.ts +16 -0
  156. package/lib/aws/compute/integrations/mock.js +30 -0
  157. package/lib/aws/compute/integrations/request-context.d.ts +144 -0
  158. package/lib/aws/compute/integrations/request-context.js +3 -0
  159. package/lib/aws/compute/integrations/stepfunctions.d.ts +102 -0
  160. package/lib/aws/compute/integrations/stepfunctions.js +268 -0
  161. package/lib/aws/compute/ip-addresses.js +2 -2
  162. package/lib/aws/compute/ipam.js +1 -1
  163. package/lib/aws/compute/json-schema.d.ts +75 -0
  164. package/lib/aws/compute/json-schema.js +23 -0
  165. package/lib/aws/compute/key-pair.js +1 -1
  166. package/lib/aws/compute/lambda-api.d.ts +46 -0
  167. package/lib/aws/compute/lambda-api.js +64 -0
  168. package/lib/aws/compute/launch-template.js +2 -2
  169. package/lib/aws/compute/lb-shared/base-listener.js +1 -1
  170. package/lib/aws/compute/lb-shared/base-load-balancer.js +2 -2
  171. package/lib/aws/compute/lb-shared/base-target-group.js +1 -1
  172. package/lib/aws/compute/lb-shared/listener-certificate.js +1 -1
  173. package/lib/aws/compute/lb-shared/load-balancer-targets.js +2 -2
  174. package/lib/aws/compute/lb-targets/alb-target.js +3 -3
  175. package/lib/aws/compute/lb-targets/instance-target.js +2 -2
  176. package/lib/aws/compute/lb-targets/ip-target.js +1 -1
  177. package/lib/aws/compute/lb-targets/lambda-target.js +1 -1
  178. package/lib/aws/compute/load-balancer.js +3 -3
  179. package/lib/aws/compute/machine-image/amazon-linux-2022.js +2 -2
  180. package/lib/aws/compute/machine-image/amazon-linux-2023.js +2 -2
  181. package/lib/aws/compute/machine-image/amazon-linux2.js +2 -2
  182. package/lib/aws/compute/machine-image/common.js +1 -1
  183. package/lib/aws/compute/machine-image/machine-image.js +8 -8
  184. package/lib/aws/compute/method.d.ts +219 -0
  185. package/lib/aws/compute/method.js +396 -0
  186. package/lib/aws/compute/methodresponse.d.ts +28 -0
  187. package/lib/aws/compute/methodresponse.js +3 -0
  188. package/lib/aws/compute/model.d.ts +143 -0
  189. package/lib/aws/compute/model.js +141 -0
  190. package/lib/aws/compute/nat.js +5 -5
  191. package/lib/aws/compute/network-acl-types.js +2 -2
  192. package/lib/aws/compute/network-acl.js +3 -3
  193. package/lib/aws/compute/nlb/network-listener-action.js +1 -1
  194. package/lib/aws/compute/nlb/network-listener.js +1 -1
  195. package/lib/aws/compute/nlb/network-load-balancer.js +1 -1
  196. package/lib/aws/compute/nlb/network-target-group.js +1 -1
  197. package/lib/aws/compute/peer.js +1 -1
  198. package/lib/aws/compute/placement-group.js +1 -1
  199. package/lib/aws/compute/port.js +1 -1
  200. package/lib/aws/compute/prefix-list.js +1 -1
  201. package/lib/aws/compute/requestvalidator.d.ts +50 -0
  202. package/lib/aws/compute/requestvalidator.js +59 -0
  203. package/lib/aws/compute/resource.d.ts +223 -0
  204. package/lib/aws/compute/resource.js +316 -0
  205. package/lib/aws/compute/restapi.d.ts +510 -0
  206. package/lib/aws/compute/restapi.js +626 -0
  207. package/lib/aws/compute/route.js +8 -8
  208. package/lib/aws/compute/runtime.d.ts +282 -0
  209. package/lib/aws/compute/runtime.js +337 -0
  210. package/lib/aws/compute/scalable-target.js +3 -3
  211. package/lib/aws/compute/schedule.js +3 -3
  212. package/lib/aws/compute/security-group.js +1 -1
  213. package/lib/aws/compute/stage.d.ts +350 -0
  214. package/lib/aws/compute/stage.js +304 -0
  215. package/lib/aws/compute/state-graph.js +1 -1
  216. package/lib/aws/compute/state-machine-fragment.js +1 -1
  217. package/lib/aws/compute/state-machine.js +4 -4
  218. package/lib/aws/compute/states/choice.js +1 -1
  219. package/lib/aws/compute/states/custom-state.js +1 -1
  220. package/lib/aws/compute/states/distributed-map/item-batcher.js +1 -1
  221. package/lib/aws/compute/states/distributed-map/item-reader.js +5 -5
  222. package/lib/aws/compute/states/distributed-map/result-writer.js +1 -1
  223. package/lib/aws/compute/states/distributed-map.js +1 -1
  224. package/lib/aws/compute/states/fail.js +1 -1
  225. package/lib/aws/compute/states/map-base.js +1 -1
  226. package/lib/aws/compute/states/map.js +1 -1
  227. package/lib/aws/compute/states/parallel.js +1 -1
  228. package/lib/aws/compute/states/pass.js +2 -2
  229. package/lib/aws/compute/states/state.js +1 -1
  230. package/lib/aws/compute/states/succeed.js +1 -1
  231. package/lib/aws/compute/states/task-base.js +2 -2
  232. package/lib/aws/compute/states/task.js +1 -1
  233. package/lib/aws/compute/states/wait.js +2 -2
  234. package/lib/aws/compute/step-scaling-action.js +3 -3
  235. package/lib/aws/compute/step-scaling-policy.js +1 -1
  236. package/lib/aws/compute/stepfunctions-api.d.ts +103 -0
  237. package/lib/aws/compute/stepfunctions-api.js +39 -0
  238. package/lib/aws/compute/subnet-v2.js +2 -2
  239. package/lib/aws/compute/subnet.js +1 -1
  240. package/lib/aws/compute/target-tracking-scaling-policy.js +3 -3
  241. package/lib/aws/compute/task-credentials.js +1 -1
  242. package/lib/aws/compute/task-input.js +1 -1
  243. package/lib/aws/compute/tasks/aws-sdk/call-aws-service.js +1 -1
  244. package/lib/aws/compute/tasks/eventbridge/put-events.js +1 -1
  245. package/lib/aws/compute/tasks/http/invoke.js +1 -1
  246. package/lib/aws/compute/tasks/lambda/invoke.js +1 -1
  247. package/lib/aws/compute/tasks/sqs/send-message.js +1 -1
  248. package/lib/aws/compute/tasks/stepfunctions/invoke-activity.js +1 -1
  249. package/lib/aws/compute/tasks/stepfunctions/start-execution.js +1 -1
  250. package/lib/aws/compute/types.js +1 -1
  251. package/lib/aws/compute/usage-plan.d.ts +194 -0
  252. package/lib/aws/compute/usage-plan.js +174 -0
  253. package/lib/aws/compute/user-data.js +3 -3
  254. package/lib/aws/compute/volume.js +2 -2
  255. package/lib/aws/compute/vpc-endpoint-service.js +1 -1
  256. package/lib/aws/compute/vpc-endpoint.js +6 -6
  257. package/lib/aws/compute/vpc-flow-logs.js +4 -4
  258. package/lib/aws/compute/vpc-link.d.ts +104 -0
  259. package/lib/aws/compute/vpc-link.js +137 -0
  260. package/lib/aws/compute/vpc-v2-base.js +1 -1
  261. package/lib/aws/compute/vpc-v2.js +2 -2
  262. package/lib/aws/compute/vpc.js +4 -4
  263. package/lib/aws/compute/vpn.js +3 -3
  264. package/lib/aws/edge/certificate.js +1 -1
  265. package/lib/aws/edge/distribution.js +3 -3
  266. package/lib/aws/edge/dns-alias-record-targets.js +3 -3
  267. package/lib/aws/edge/dns-record.js +13 -13
  268. package/lib/aws/edge/dns-zone.js +1 -1
  269. package/lib/aws/edge/function.js +2 -2
  270. package/lib/aws/edge/key-value-store.js +4 -4
  271. package/lib/aws/edge/origin.js +3 -3
  272. package/lib/aws/edge/response-headers-policy.js +1 -1
  273. package/lib/aws/encryption/alias.js +1 -1
  274. package/lib/aws/encryption/key.js +1 -1
  275. package/lib/aws/encryption/via-service-principal.js +1 -1
  276. package/lib/aws/iam/grant.js +2 -2
  277. package/lib/aws/iam/group.js +1 -1
  278. package/lib/aws/iam/instance-profile.js +1 -1
  279. package/lib/aws/iam/managed-policy.js +1 -1
  280. package/lib/aws/iam/oidc-provider.js +1 -1
  281. package/lib/aws/iam/policy-document.js +1 -1
  282. package/lib/aws/iam/policy-statement.js +1 -1
  283. package/lib/aws/iam/policy.js +1 -1
  284. package/lib/aws/iam/principals.js +20 -20
  285. package/lib/aws/iam/role.js +1 -1
  286. package/lib/aws/iam/saml-provider.js +2 -2
  287. package/lib/aws/iam/unknown-principal.js +1 -1
  288. package/lib/aws/iam/user.js +5 -5
  289. package/lib/aws/index.d.ts +1 -0
  290. package/lib/aws/index.js +4 -1
  291. package/lib/aws/network/simple-ipv4-vpc.js +1 -1
  292. package/lib/aws/network/subnet-group.js +3 -3
  293. package/lib/aws/network/subnet.js +4 -4
  294. package/lib/aws/notify/archive.js +1 -1
  295. package/lib/aws/notify/connection.js +3 -3
  296. package/lib/aws/notify/event-bus.js +3 -3
  297. package/lib/aws/notify/event-pattern.js +1 -1
  298. package/lib/aws/notify/input.js +2 -2
  299. package/lib/aws/notify/kinesis-stream.js +1 -1
  300. package/lib/aws/notify/notification-rule.d.ts +1 -1
  301. package/lib/aws/notify/notification-rule.js +5 -5
  302. package/lib/aws/notify/policy.js +1 -1
  303. package/lib/aws/notify/queue-policy.js +1 -1
  304. package/lib/aws/notify/queue.js +1 -1
  305. package/lib/aws/notify/resource-policy.js +1 -1
  306. package/lib/aws/notify/rule.js +1 -1
  307. package/lib/aws/notify/schedule.js +1 -1
  308. package/lib/aws/notify/subscription-filter.js +1 -1
  309. package/lib/aws/notify/subscription.js +4 -4
  310. package/lib/aws/notify/subscriptions/email.js +1 -1
  311. package/lib/aws/notify/subscriptions/lambda.js +1 -1
  312. package/lib/aws/notify/subscriptions/sms.js +1 -1
  313. package/lib/aws/notify/subscriptions/sqs.js +1 -1
  314. package/lib/aws/notify/subscriptions/url.js +1 -1
  315. package/lib/aws/notify/targets/event-bus.js +1 -1
  316. package/lib/aws/notify/targets/function.js +1 -1
  317. package/lib/aws/notify/targets/log-group.js +2 -2
  318. package/lib/aws/notify/targets/sqs.js +1 -1
  319. package/lib/aws/notify/targets/state-machine.js +1 -1
  320. package/lib/aws/notify/topic-base.js +1 -1
  321. package/lib/aws/notify/topic.js +6 -5
  322. package/lib/aws/partition.d.ts +21 -0
  323. package/lib/aws/partition.js +42 -0
  324. package/lib/aws/storage/assets/image-asset.d.ts +379 -0
  325. package/lib/aws/storage/assets/image-asset.js +247 -0
  326. package/lib/aws/storage/assets/index.d.ts +2 -0
  327. package/lib/aws/storage/assets/index.js +21 -0
  328. package/lib/aws/storage/assets/s3.d.ts +125 -0
  329. package/lib/aws/storage/assets/s3.js +80 -0
  330. package/lib/aws/storage/auth-token.d.ts +25 -0
  331. package/lib/aws/storage/auth-token.js +54 -0
  332. package/lib/aws/storage/billing.js +1 -1
  333. package/lib/aws/storage/bucket-notifications.js +1 -1
  334. package/lib/aws/storage/bucket-policy.js +1 -1
  335. package/lib/aws/storage/bucket-source.d.ts +1 -1
  336. package/lib/aws/storage/bucket-source.js +4 -4
  337. package/lib/aws/storage/bucket.d.ts +14 -6
  338. package/lib/aws/storage/bucket.js +48 -40
  339. package/lib/aws/storage/capacity.js +1 -1
  340. package/lib/aws/storage/ecr-lifecycle.d.ts +88 -0
  341. package/lib/aws/storage/ecr-lifecycle.js +23 -0
  342. package/lib/aws/storage/ecr-repository.d.ts +446 -0
  343. package/lib/aws/storage/ecr-repository.js +685 -0
  344. package/lib/aws/storage/encryption.js +1 -1
  345. package/lib/aws/storage/index.d.ts +5 -0
  346. package/lib/aws/storage/index.js +10 -3
  347. package/lib/aws/storage/location.d.ts +17 -0
  348. package/lib/aws/storage/location.js +4 -0
  349. package/lib/aws/storage/notification-targets/function.js +1 -1
  350. package/lib/aws/storage/notification-targets/queue.js +1 -1
  351. package/lib/aws/storage/origin-access-identity.js +1 -1
  352. package/lib/aws/storage/parameter.js +2 -2
  353. package/lib/aws/storage/table.js +3 -3
  354. package/lib/aws/storage/util.d.ts +8 -20
  355. package/lib/aws/storage/util.js +56 -34
  356. package/lib/aws/util.d.ts +1 -0
  357. package/lib/aws/util.js +6 -1
  358. package/lib/bundling.d.ts +434 -0
  359. package/lib/bundling.js +368 -0
  360. package/lib/construct-base.js +2 -2
  361. package/lib/duration.js +1 -1
  362. package/lib/expiration.js +1 -1
  363. package/lib/fs/copy.d.ts +2 -0
  364. package/lib/fs/copy.js +57 -0
  365. package/lib/fs/fingerprint.d.ts +21 -0
  366. package/lib/fs/fingerprint.js +165 -0
  367. package/lib/fs/ignore.d.ts +107 -0
  368. package/lib/fs/ignore.js +190 -0
  369. package/lib/fs/index.d.ts +47 -0
  370. package/lib/fs/index.js +88 -0
  371. package/lib/fs/options.d.ts +110 -0
  372. package/lib/fs/options.js +60 -0
  373. package/lib/fs/utils.d.ts +11 -0
  374. package/lib/fs/utils.js +34 -0
  375. package/lib/index.d.ts +5 -0
  376. package/lib/index.js +7 -1
  377. package/lib/private/asset-staging.d.ts +83 -0
  378. package/lib/private/asset-staging.js +205 -0
  379. package/lib/private/cache.d.ts +17 -0
  380. package/lib/private/cache.js +35 -0
  381. package/lib/private/jsii-deprecated.d.ts +2 -0
  382. package/lib/private/jsii-deprecated.js +19 -0
  383. package/lib/private/unique-resource-name.js +3 -2
  384. package/lib/size.js +1 -1
  385. package/lib/stack-base.js +1 -1
  386. package/lib/terra-func.js +2 -2
  387. package/lib/time-zone.js +1 -1
  388. package/node_modules/@balena/dockerignore/CHANGELOG.md +31 -0
  389. package/node_modules/@balena/dockerignore/LICENSE.md +206 -0
  390. package/node_modules/@balena/dockerignore/README.md +261 -0
  391. package/node_modules/@balena/dockerignore/ignore.js +363 -0
  392. package/node_modules/@balena/dockerignore/index.d.ts +45 -0
  393. package/node_modules/@balena/dockerignore/package.json +49 -0
  394. package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  395. package/node_modules/balanced-match/LICENSE.md +21 -0
  396. package/node_modules/balanced-match/README.md +97 -0
  397. package/node_modules/balanced-match/index.js +62 -0
  398. package/node_modules/balanced-match/package.json +48 -0
  399. package/node_modules/concat-map/.travis.yml +4 -0
  400. package/node_modules/concat-map/LICENSE +18 -0
  401. package/node_modules/concat-map/README.markdown +62 -0
  402. package/node_modules/concat-map/example/map.js +6 -0
  403. package/node_modules/concat-map/index.js +13 -0
  404. package/node_modules/concat-map/package.json +43 -0
  405. package/node_modules/concat-map/test/map.js +39 -0
  406. package/node_modules/ignore/LICENSE-MIT +21 -0
  407. package/node_modules/ignore/README.md +412 -0
  408. package/node_modules/ignore/index.d.ts +61 -0
  409. package/node_modules/ignore/index.js +636 -0
  410. package/node_modules/ignore/legacy.js +559 -0
  411. package/node_modules/ignore/package.json +74 -0
  412. package/node_modules/minimatch/LICENSE +15 -0
  413. package/node_modules/minimatch/README.md +230 -0
  414. package/node_modules/minimatch/minimatch.js +947 -0
  415. package/node_modules/minimatch/node_modules/brace-expansion/LICENSE +21 -0
  416. package/node_modules/minimatch/node_modules/brace-expansion/README.md +129 -0
  417. package/node_modules/minimatch/node_modules/brace-expansion/index.js +201 -0
  418. package/node_modules/minimatch/node_modules/brace-expansion/package.json +47 -0
  419. package/node_modules/minimatch/package.json +33 -0
  420. package/package.json +14 -5
  421. package/lib/aws/compute/function-nodejs.d.ts +0 -55
  422. package/lib/aws/compute/function-nodejs.js +0 -70
@@ -0,0 +1,510 @@
1
+ import { apiGatewayAccount, apiGatewayRestApi, apiGatewayRestApiPolicy } from "@cdktf/provider-aws";
2
+ import { Construct } from "constructs";
3
+ import { ApiDefinition } from "./api-definition";
4
+ import { ApiKeyOptions, IApiKey } from "./api-key";
5
+ import { Deployment } from "./deployment";
6
+ import { DomainName, DomainNameOptions } from "./domain-name";
7
+ import { GatewayResponse, GatewayResponseOptions } from "./gateway-response";
8
+ import { Method } from "./method";
9
+ import { Model, ModelOptions } from "./model";
10
+ import { RequestValidator, RequestValidatorOptions } from "./requestvalidator";
11
+ import { IResource, ResourceOptions } from "./resource";
12
+ import { Stage, StageOptions } from "./stage";
13
+ import { Size } from "../../size";
14
+ import { UsagePlan, UsagePlanProps } from "./usage-plan";
15
+ import { AwsConstructBase, AwsConstructProps } from "../aws-construct";
16
+ import * as cloudwatch from "../cloudwatch";
17
+ import * as ec2 from "../compute";
18
+ import * as iam from "../iam";
19
+ export interface IRestApi extends iam.IAwsConstructWithPolicy {
20
+ /**
21
+ * The ID of this API Gateway RestApi.
22
+ * @attribute
23
+ */
24
+ readonly restApiId: string;
25
+ /**
26
+ * The name of this API Gateway RestApi.
27
+ * @attribute
28
+ */
29
+ readonly restApiName: string;
30
+ /**
31
+ * The resource ID of the root resource.
32
+ * @attribute
33
+ */
34
+ readonly restApiRootResourceId: string;
35
+ /**
36
+ * API Gateway deployment that represents the latest changes of the API.
37
+ * This resource will be automatically updated every time the REST API model changes.
38
+ * `undefined` when no deployment is configured.
39
+ */
40
+ readonly latestDeployment?: Deployment;
41
+ /**
42
+ * API Gateway stage that points to the latest deployment (if defined).
43
+ */
44
+ deploymentStage: Stage;
45
+ /**
46
+ * Represents the root resource ("/") of this API. Use it to define the API model:
47
+ *
48
+ * api.root.addMethod('ANY', redirectToHomePage); // "ANY /"
49
+ * api.root.addResource('friends').addMethod('GET', getFriendsHandler); // "GET /friends"
50
+ *
51
+ */
52
+ readonly root: IResource;
53
+ /**
54
+ * Gets the "execute-api" ARN
55
+ * @returns The "execute-api" ARN.
56
+ * @default "*" returns the execute API ARN for all methods/resources in
57
+ * this API.
58
+ * @param method The method (default `*`)
59
+ * @param path The resource path. Must start with '/' (default `*`)
60
+ * @param stage The stage (default `*`)
61
+ */
62
+ arnForExecuteApi(method?: string, path?: string, stage?: string): string;
63
+ }
64
+ /**
65
+ * Represents the props that all Rest APIs share
66
+ */
67
+ export interface RestApiBaseProps extends AwsConstructProps {
68
+ /**
69
+ * Indicates if a Deployment should be automatically created for this API,
70
+ * and recreated when the API model (resources, methods) changes.
71
+ *
72
+ * Since API Gateway deployments are immutable, When this option is enabled
73
+ * (by default), an AWS::ApiGateway::Deployment resource will automatically
74
+ * created with a logical ID that hashes the API model (methods, resources
75
+ * and options). This means that when the model changes, the logical ID of
76
+ * this CloudFormation resource will change, and a new deployment will be
77
+ * created.
78
+ *
79
+ * If this is set, `latestDeployment` will refer to the `Deployment` object
80
+ * and `deploymentStage` will refer to a `Stage` that points to this
81
+ * deployment. To customize the stage options, use the `deployOptions`
82
+ * property.
83
+ *
84
+ * A CloudFormation Output will also be defined with the root URL endpoint
85
+ * of this REST API.
86
+ *
87
+ * @default true
88
+ */
89
+ readonly deploy?: boolean;
90
+ /**
91
+ * Options for the API Gateway stage that will always point to the latest
92
+ * deployment when `deploy` is enabled. If `deploy` is disabled,
93
+ * this value cannot be set.
94
+ *
95
+ * @default - Based on defaults of `StageOptions`.
96
+ */
97
+ readonly deployOptions?: StageOptions;
98
+ /**
99
+ * A name for the API Gateway RestApi resource.
100
+ *
101
+ * @default - ID of the RestApi construct.
102
+ */
103
+ readonly restApiName?: string;
104
+ /**
105
+ * Custom header parameters for the request.
106
+ * @see https://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html
107
+ *
108
+ * @default - No parameters.
109
+ */
110
+ readonly parameters?: {
111
+ [key: string]: string;
112
+ };
113
+ /**
114
+ * A policy document that contains the permissions for this RestApi
115
+ *
116
+ * @default - No policy.
117
+ */
118
+ readonly policy?: iam.PolicyDocument;
119
+ /**
120
+ * Indicates whether to roll back the resource if a warning occurs while API
121
+ * Gateway is creating the RestApi resource.
122
+ *
123
+ * @default false
124
+ */
125
+ readonly failOnWarnings?: boolean;
126
+ /**
127
+ * Configure a custom domain name and map it to this API.
128
+ *
129
+ * @default - no domain name is defined, use `addDomainName` or directly define a `DomainName`.
130
+ */
131
+ readonly domainName?: DomainNameOptions;
132
+ /**
133
+ * Automatically configure an AWS CloudWatch role for API Gateway.
134
+ *
135
+ * @default true
136
+ */
137
+ readonly cloudWatchRole?: boolean;
138
+ /**
139
+ * A list of the endpoint types of the API. Use this property when creating
140
+ * an API.
141
+ *
142
+ * @default EndpointType.EDGE
143
+ */
144
+ readonly endpointTypes?: EndpointType[];
145
+ /**
146
+ * The EndpointConfiguration property type specifies the endpoint types of a REST API
147
+ * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-restapi-endpointconfiguration.html
148
+ *
149
+ * @default EndpointType.EDGE
150
+ */
151
+ readonly endpointConfiguration?: EndpointConfiguration;
152
+ /**
153
+ * Specifies whether clients can invoke the API using the default execute-api
154
+ * endpoint. To require that clients use a custom domain name to invoke the
155
+ * API, disable the default endpoint.
156
+ * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
157
+ *
158
+ * @default false
159
+ */
160
+ readonly disableExecuteApiEndpoint?: boolean;
161
+ /**
162
+ * A description of the RestApi construct.
163
+ *
164
+ * @default - 'Automatically created by the RestApi construct'
165
+ */
166
+ readonly description?: string;
167
+ }
168
+ /**
169
+ * Props to create a new instance of RestApi
170
+ */
171
+ export interface RestApiProps extends RestApiBaseProps, ResourceOptions {
172
+ /**
173
+ * The list of binary media mime-types that are supported by the RestApi
174
+ * resource, such as "image/png" or "application/octet-stream"
175
+ *
176
+ * @default - RestApi supports only UTF-8-encoded text payloads.
177
+ */
178
+ readonly binaryMediaTypes?: string[];
179
+ /**
180
+ * A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative
181
+ * between 0 and 10485760 (10M) bytes, inclusive) or disable compression
182
+ * (when undefined) on an API. When compression is enabled, compression or
183
+ * decompression is not applied on the payload if the payload size is
184
+ * smaller than this value. Setting it to zero allows compression for any
185
+ * payload size.
186
+ *
187
+ * @default - Compression is disabled.
188
+ */
189
+ readonly minCompressionSize?: Size;
190
+ /**
191
+ * The source of the API key for metering requests according to a usage
192
+ * plan.
193
+ *
194
+ * @default - Metering is disabled.
195
+ */
196
+ readonly apiKeySourceType?: ApiKeySourceType;
197
+ }
198
+ /**
199
+ * Props to instantiate a new SpecRestApi
200
+ */
201
+ export interface SpecRestApiProps extends RestApiBaseProps {
202
+ /**
203
+ * An OpenAPI definition compatible with API Gateway.
204
+ * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-import-api.html
205
+ */
206
+ readonly apiDefinition: ApiDefinition;
207
+ /**
208
+ * A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative
209
+ * between 0 and 10485760 (10M) bytes, inclusive) or disable compression
210
+ * (when undefined) on an API. When compression is enabled, compression or
211
+ * decompression is not applied on the payload if the payload size is
212
+ * smaller than this value. Setting it to zero allows compression for any
213
+ * payload size.
214
+ *
215
+ * @default - Compression is disabled.
216
+ */
217
+ readonly minCompressionSize?: Size;
218
+ }
219
+ /**
220
+ * Base implementation that are common to various implementations of IRestApi
221
+ */
222
+ export declare abstract class RestApiBase extends AwsConstructBase implements IRestApi, iam.IAwsConstructWithPolicy {
223
+ /**
224
+ * Checks if the given object is an instance of RestApiBase.
225
+ * @internal
226
+ */
227
+ static _isRestApiBase(x: any): x is RestApiBase;
228
+ /**
229
+ * API Gateway deployment that represents the latest changes of the API.
230
+ * This resource will be automatically updated every time the REST API model changes.
231
+ * This will be undefined if `deploy` is false.
232
+ */
233
+ get latestDeployment(): Deployment | undefined;
234
+ /**
235
+ * The first domain name mapped to this API, if defined through the `domainName`
236
+ * configuration prop, or added via `addDomainName`
237
+ */
238
+ get domainName(): DomainName | undefined;
239
+ /**
240
+ * The deployed root URL of this REST API.
241
+ */
242
+ get url(): string;
243
+ /**
244
+ * The ID of this API Gateway RestApi.
245
+ */
246
+ abstract readonly restApiId: string;
247
+ /**
248
+ * The resource ID of the root resource.
249
+ *
250
+ * @attribute
251
+ */
252
+ abstract readonly restApiRootResourceId: string;
253
+ /**
254
+ * Represents the root resource of this API endpoint ('/').
255
+ * Resources and Methods are added to this resource.
256
+ */
257
+ abstract readonly root: IResource;
258
+ /**
259
+ * API Gateway stage that points to the latest deployment (if defined).
260
+ *
261
+ * If `deploy` is disabled, you will need to explicitly assign this value in order to
262
+ * set up integrations.
263
+ */
264
+ deploymentStage: Stage;
265
+ /**
266
+ * A human friendly name for this Rest API. Note that this is different from `restApiId`.
267
+ * @attribute
268
+ */
269
+ readonly restApiName: string;
270
+ private _latestDeployment?;
271
+ private _domainName?;
272
+ private _allowedVpcEndpoints;
273
+ protected cloudWatchAccount?: apiGatewayAccount.ApiGatewayAccount;
274
+ protected internalPolicy?: iam.PolicyDocument;
275
+ protected policyAttachment?: apiGatewayRestApiPolicy.ApiGatewayRestApiPolicy;
276
+ constructor(scope: Construct, id: string, props?: RestApiBaseProps);
277
+ abstract addToResourcePolicy(statement: iam.PolicyStatement): iam.AddToResourcePolicyResult;
278
+ /**
279
+ * Returns the URL for an HTTP path.
280
+ *
281
+ * Fails if `deploymentStage` is not set either by `deploy` or explicitly.
282
+ */
283
+ urlForPath(path?: string): string;
284
+ /**
285
+ * Defines an API Gateway domain name and maps it to this API.
286
+ * @param id The construct id
287
+ * @param options custom domain options
288
+ */
289
+ addDomainName(id: string, options: DomainNameOptions): DomainName;
290
+ /**
291
+ * Adds a usage plan.
292
+ */
293
+ addUsagePlan(id: string, props?: UsagePlanProps): UsagePlan;
294
+ arnForExecuteApi(method?: string, path?: string, stage?: string): string;
295
+ /**
296
+ * Adds a new gateway response.
297
+ */
298
+ addGatewayResponse(id: string, options: GatewayResponseOptions): GatewayResponse;
299
+ /**
300
+ * Add an ApiKey to the deploymentStage
301
+ */
302
+ addApiKey(id: string, options?: ApiKeyOptions): IApiKey;
303
+ /**
304
+ * Add a resource policy that only allows API execution from a VPC Endpoint to create a private API.
305
+ *
306
+ * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-resource-policies-examples.html#apigateway-resource-policies-source-vpc-example
307
+ *
308
+ * @param vpcEndpoints the interface VPC endpoints to grant access to
309
+ */
310
+ grantInvokeFromVpcEndpointsOnly(vpcEndpoints: ec2.IVpcEndpoint[]): void;
311
+ /**
312
+ * Returns the given named metric for this API
313
+ */
314
+ metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric;
315
+ /**
316
+ * Metric for the number of client-side errors captured in a given period.
317
+ *
318
+ * Default: sum over 5 minutes
319
+ */
320
+ metricClientError(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
321
+ /**
322
+ * Metric for the number of server-side errors captured in a given period.
323
+ *
324
+ * Default: sum over 5 minutes
325
+ */
326
+ metricServerError(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
327
+ /**
328
+ * Metric for the number of requests served from the API cache in a given period.
329
+ *
330
+ * Default: sum over 5 minutes
331
+ */
332
+ metricCacheHitCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
333
+ /**
334
+ * Metric for the number of requests served from the backend in a given period,
335
+ * when API caching is enabled.
336
+ *
337
+ * Default: sum over 5 minutes
338
+ */
339
+ metricCacheMissCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
340
+ /**
341
+ * Metric for the total number API requests in a given period.
342
+ *
343
+ * Default: sample count over 5 minutes
344
+ */
345
+ metricCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
346
+ /**
347
+ * Metric for the time between when API Gateway relays a request to the backend
348
+ * and when it receives a response from the backend.
349
+ *
350
+ * Default: average over 5 minutes.
351
+ */
352
+ metricIntegrationLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
353
+ /**
354
+ * The time between when API Gateway receives a request from a client
355
+ * and when it returns a response to the client.
356
+ * The latency includes the integration latency and other API Gateway overhead.
357
+ *
358
+ * Default: average over 5 minutes.
359
+ */
360
+ metricLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
361
+ /**
362
+ * Internal API used by `Method` to keep an inventory of methods at the API
363
+ * level for validation purposes.
364
+ *
365
+ * @internal
366
+ */
367
+ _attachMethod(_method: Method): void;
368
+ /**
369
+ * Associates a Deployment resource with this REST API.
370
+ *
371
+ * @internal
372
+ */
373
+ _attachDeployment(_deployment: Deployment): void;
374
+ /**
375
+ * Associates a Stage with this REST API
376
+ *
377
+ * @internal
378
+ */
379
+ _attachStage(stage: Stage): void;
380
+ /**
381
+ * @internal
382
+ */
383
+ protected _configureCloudWatchRole(apiResource: apiGatewayRestApi.ApiGatewayRestApi, cloudWatchRoleEnabled?: boolean): void;
384
+ /**
385
+ * @internal
386
+ */
387
+ protected _configureDeployment(props: RestApiBaseProps): void;
388
+ /**
389
+ * @internal
390
+ */
391
+ protected _configureEndpoints(props: RestApiBaseProps): apiGatewayRestApi.ApiGatewayRestApiEndpointConfiguration | undefined;
392
+ private cannedMetric;
393
+ get outputs(): Record<string, any>;
394
+ }
395
+ /**
396
+ * Represents a REST API in Amazon API Gateway, created with an OpenAPI specification.
397
+ *
398
+ * Some properties normally accessible on @see `RestApi` - such as the description -
399
+ * must be declared in the specification. All Resources and Methods need to be defined as
400
+ * part of the OpenAPI specification file, and cannot be added via the CDK.
401
+ *
402
+ * By default, the API will automatically be deployed and accessible from a
403
+ * public endpoint.
404
+ *
405
+ *
406
+ * @resource aws_api_gateway_rest_api
407
+ */
408
+ export declare class SpecRestApi extends RestApiBase {
409
+ readonly restApiId: string;
410
+ readonly restApiRootResourceId: string;
411
+ readonly root: IResource;
412
+ private readonly resource;
413
+ constructor(scope: Construct, id: string, props: SpecRestApiProps);
414
+ addToResourcePolicy(statement: iam.PolicyStatement): iam.AddToResourcePolicyResult;
415
+ }
416
+ /**
417
+ * Attributes that can be specified when importing a RestApi
418
+ */
419
+ export interface RestApiAttributes {
420
+ /**
421
+ * The ID of the API Gateway RestApi.
422
+ */
423
+ readonly restApiId: string;
424
+ /**
425
+ * The name of the API Gateway RestApi.
426
+ *
427
+ * @default - ID of the RestApi construct.
428
+ */
429
+ readonly restApiName?: string;
430
+ /**
431
+ * The resource ID of the root resource.
432
+ */
433
+ readonly rootResourceId: string;
434
+ }
435
+ /**
436
+ * Represents a REST API in Amazon API Gateway.
437
+ *
438
+ * Use `addResource` and `addMethod` to configure the API model.
439
+ *
440
+ * By default, the API will automatically be deployed and accessible from a
441
+ * public endpoint.
442
+ */
443
+ export declare class RestApi extends RestApiBase {
444
+ /**
445
+ * Return whether the given object is a `RestApi`
446
+ */
447
+ static isRestApi(x: any): x is RestApi;
448
+ /**
449
+ * Import an existing RestApi.
450
+ */
451
+ static fromRestApiId(scope: Construct, id: string, restApiId: string): IRestApi;
452
+ /**
453
+ * Import an existing RestApi that can be configured with additional Methods and Resources.
454
+ */
455
+ static fromRestApiAttributes(scope: Construct, id: string, attrs: RestApiAttributes): IRestApi;
456
+ readonly restApiId: string;
457
+ readonly root: IResource;
458
+ readonly restApiRootResourceId: string;
459
+ private readonly resource;
460
+ /**
461
+ * The list of methods bound to this RestApi
462
+ */
463
+ readonly methods: Method[];
464
+ /**
465
+ * This list of deployments bound to this RestApi
466
+ */
467
+ private readonly deployments;
468
+ constructor(scope: Construct, id: string, props?: RestApiProps);
469
+ addToResourcePolicy(statement: iam.PolicyStatement): iam.AddToResourcePolicyResult;
470
+ addModel(id: string, props: ModelOptions): Model;
471
+ addRequestValidator(id: string, props: RequestValidatorOptions): RequestValidator;
472
+ /**
473
+ * Internal API used by `Method` to keep an inventory of methods at the API
474
+ * level for validation purposes.
475
+ *
476
+ * @internal
477
+ */
478
+ _attachMethod(method: Method): void;
479
+ /** @internal */
480
+ _attachDeployment(deployment: Deployment): void;
481
+ private validateRestApi;
482
+ }
483
+ /**
484
+ * The endpoint configuration of a REST API, including VPCs and endpoint types.
485
+ *
486
+ * EndpointConfiguration is a property of the AWS::ApiGateway::RestApi resource.
487
+ */
488
+ export interface EndpointConfiguration {
489
+ /**
490
+ * A list of endpoint types of an API or its custom domain name.
491
+ *
492
+ * @default EndpointType.EDGE
493
+ */
494
+ readonly types: EndpointType[];
495
+ /**
496
+ * A list of VPC Endpoints against which to create Route53 ALIASes
497
+ *
498
+ * @default - no ALIASes are created for the endpoint.
499
+ */
500
+ readonly vpcEndpoints?: ec2.IVpcEndpoint[];
501
+ }
502
+ export declare enum ApiKeySourceType {
503
+ HEADER = "HEADER",
504
+ AUTHORIZER = "AUTHORIZER"
505
+ }
506
+ export declare enum EndpointType {
507
+ EDGE = "EDGE",
508
+ REGIONAL = "REGIONAL",
509
+ PRIVATE = "PRIVATE"
510
+ }