monorise 0.0.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.
Files changed (416) hide show
  1. package/dist/base/index.d.ts +254 -0
  2. package/dist/base/index.js +44 -0
  3. package/dist/base/index.js.map +1 -0
  4. package/dist/cli/cli.d.ts +1 -0
  5. package/dist/cli/cli.js +461 -0
  6. package/dist/cli/cli.js.map +1 -0
  7. package/dist/core/index.d.ts +4767 -0
  8. package/dist/core/index.js +7941 -0
  9. package/dist/core/index.js.map +1 -0
  10. package/dist/index.d.ts +11 -0
  11. package/dist/index.js +11 -0
  12. package/dist/react/actions/app.action.d.ts +46 -0
  13. package/dist/react/actions/app.action.d.ts.map +1 -0
  14. package/dist/react/actions/auth.action.d.ts +24 -0
  15. package/dist/react/actions/auth.action.d.ts.map +1 -0
  16. package/dist/react/actions/config.action.d.ts +10 -0
  17. package/dist/react/actions/config.action.d.ts.map +1 -0
  18. package/dist/react/actions/core.action.d.ts +219 -0
  19. package/dist/react/actions/core.action.d.ts.map +1 -0
  20. package/dist/react/index.d.ts +1093 -0
  21. package/dist/react/index.d.ts.map +1 -0
  22. package/dist/react/index.js +2344 -0
  23. package/dist/react/index.js.map +1 -0
  24. package/dist/react/lib/api.d.ts +38 -0
  25. package/dist/react/lib/api.d.ts.map +1 -0
  26. package/dist/react/lib/constant.d.ts +2 -0
  27. package/dist/react/lib/constant.d.ts.map +1 -0
  28. package/dist/react/lib/entity.d.ts +10 -0
  29. package/dist/react/lib/entity.d.ts.map +1 -0
  30. package/dist/react/lib/utils.d.ts +10 -0
  31. package/dist/react/lib/utils.d.ts.map +1 -0
  32. package/dist/react/services/auth.service.d.ts +21 -0
  33. package/dist/react/services/auth.service.d.ts.map +1 -0
  34. package/dist/react/services/core.service.d.ts +76 -0
  35. package/dist/react/services/core.service.d.ts.map +1 -0
  36. package/dist/react/services/filestore.service.d.ts +22 -0
  37. package/dist/react/services/filestore.service.d.ts.map +1 -0
  38. package/dist/react/store/monorise.store.d.ts +169 -0
  39. package/dist/react/store/monorise.store.d.ts.map +1 -0
  40. package/dist/react/tsup.config.d.ts +3 -0
  41. package/dist/react/tsup.config.d.ts.map +1 -0
  42. package/dist/react/types/api.type.d.ts +30 -0
  43. package/dist/react/types/api.type.d.ts.map +1 -0
  44. package/dist/react/types/axios.type.d.ts +13 -0
  45. package/dist/react/types/axios.type.d.ts.map +1 -0
  46. package/dist/react/types/monorise.type.d.ts +8 -0
  47. package/dist/react/types/monorise.type.d.ts.map +1 -0
  48. package/dist/react/types/mutual.type.d.ts +21 -0
  49. package/dist/react/types/mutual.type.d.ts.map +1 -0
  50. package/dist/sst/.sst/platform/src/components/aws/analog.d.ts +423 -0
  51. package/dist/sst/.sst/platform/src/components/aws/analog.d.ts.map +1 -0
  52. package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts +74 -0
  53. package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts.map +1 -0
  54. package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts +542 -0
  55. package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts.map +1 -0
  56. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts +48 -0
  57. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts.map +1 -0
  58. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts +55 -0
  59. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts.map +1 -0
  60. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts +36 -0
  61. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts.map +1 -0
  62. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts +39 -0
  63. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts.map +1 -0
  64. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts +53 -0
  65. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -0
  66. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts +53 -0
  67. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts.map +1 -0
  68. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts +1002 -0
  69. package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts.map +1 -0
  70. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts +54 -0
  71. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts.map +1 -0
  72. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts +28 -0
  73. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts.map +1 -0
  74. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts +59 -0
  75. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -0
  76. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts +54 -0
  77. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts.map +1 -0
  78. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts +44 -0
  79. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts.map +1 -0
  80. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts +931 -0
  81. package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts.map +1 -0
  82. package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts +52 -0
  83. package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts.map +1 -0
  84. package/dist/sst/.sst/platform/src/components/aws/app-sync-function.d.ts +33 -0
  85. package/dist/sst/.sst/platform/src/components/aws/app-sync-function.d.ts.map +1 -0
  86. package/dist/sst/.sst/platform/src/components/aws/app-sync-resolver.d.ts +41 -0
  87. package/dist/sst/.sst/platform/src/components/aws/app-sync-resolver.d.ts.map +1 -0
  88. package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts +638 -0
  89. package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts.map +1 -0
  90. package/dist/sst/.sst/platform/src/components/aws/astro.d.ts +421 -0
  91. package/dist/sst/.sst/platform/src/components/aws/astro.d.ts.map +1 -0
  92. package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts +702 -0
  93. package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts.map +1 -0
  94. package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts +26 -0
  95. package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts.map +1 -0
  96. package/dist/sst/.sst/platform/src/components/aws/auth.d.ts +295 -0
  97. package/dist/sst/.sst/platform/src/components/aws/auth.d.ts.map +1 -0
  98. package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts +61 -0
  99. package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts.map +1 -0
  100. package/dist/sst/.sst/platform/src/components/aws/bucket-notification.d.ts +47 -0
  101. package/dist/sst/.sst/platform/src/components/aws/bucket-notification.d.ts.map +1 -0
  102. package/dist/sst/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts +55 -0
  103. package/dist/sst/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts.map +1 -0
  104. package/dist/sst/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts +55 -0
  105. package/dist/sst/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts.map +1 -0
  106. package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts +1216 -0
  107. package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts.map +1 -0
  108. package/dist/sst/.sst/platform/src/components/aws/bus-base-subscriber.d.ts +20 -0
  109. package/dist/sst/.sst/platform/src/components/aws/bus-base-subscriber.d.ts.map +1 -0
  110. package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts +49 -0
  111. package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts.map +1 -0
  112. package/dist/sst/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts +44 -0
  113. package/dist/sst/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts.map +1 -0
  114. package/dist/sst/.sst/platform/src/components/aws/bus.d.ts +403 -0
  115. package/dist/sst/.sst/platform/src/components/aws/bus.d.ts.map +1 -0
  116. package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts +299 -0
  117. package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts.map +1 -0
  118. package/dist/sst/.sst/platform/src/components/aws/cluster-v1.d.ts +882 -0
  119. package/dist/sst/.sst/platform/src/components/aws/cluster-v1.d.ts.map +1 -0
  120. package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts +306 -0
  121. package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts.map +1 -0
  122. package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts +194 -0
  123. package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts.map +1 -0
  124. package/dist/sst/.sst/platform/src/components/aws/cognito-identity-provider.d.ts +38 -0
  125. package/dist/sst/.sst/platform/src/components/aws/cognito-identity-provider.d.ts.map +1 -0
  126. package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts +50 -0
  127. package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts.map +1 -0
  128. package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts +603 -0
  129. package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts.map +1 -0
  130. package/dist/sst/.sst/platform/src/components/aws/cron.d.ts +250 -0
  131. package/dist/sst/.sst/platform/src/components/aws/cron.d.ts.map +1 -0
  132. package/dist/sst/.sst/platform/src/components/aws/dns-validated-certificate.d.ts +27 -0
  133. package/dist/sst/.sst/platform/src/components/aws/dns-validated-certificate.d.ts.map +1 -0
  134. package/dist/sst/.sst/platform/src/components/aws/dns.d.ts +94 -0
  135. package/dist/sst/.sst/platform/src/components/aws/dns.d.ts.map +1 -0
  136. package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts +55 -0
  137. package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -0
  138. package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts +568 -0
  139. package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts.map +1 -0
  140. package/dist/sst/.sst/platform/src/components/aws/efs.d.ts +217 -0
  141. package/dist/sst/.sst/platform/src/components/aws/efs.d.ts.map +1 -0
  142. package/dist/sst/.sst/platform/src/components/aws/email.d.ts +291 -0
  143. package/dist/sst/.sst/platform/src/components/aws/email.d.ts.map +1 -0
  144. package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts +803 -0
  145. package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts.map +1 -0
  146. package/dist/sst/.sst/platform/src/components/aws/function.d.ts +1629 -0
  147. package/dist/sst/.sst/platform/src/components/aws/function.d.ts.map +1 -0
  148. package/dist/sst/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts +3 -0
  149. package/dist/sst/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts.map +1 -0
  150. package/dist/sst/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts +144 -0
  151. package/dist/sst/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts.map +1 -0
  152. package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts +40 -0
  153. package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts.map +1 -0
  154. package/dist/sst/.sst/platform/src/components/aws/helpers/bootstrap.d.ts +13 -0
  155. package/dist/sst/.sst/platform/src/components/aws/helpers/bootstrap.d.ts.map +1 -0
  156. package/dist/sst/.sst/platform/src/components/aws/helpers/container-builder.d.ts +4 -0
  157. package/dist/sst/.sst/platform/src/components/aws/helpers/container-builder.d.ts.map +1 -0
  158. package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts +10 -0
  159. package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts.map +1 -0
  160. package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts +3 -0
  161. package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts.map +1 -0
  162. package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts +7 -0
  163. package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts.map +1 -0
  164. package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts +4 -0
  165. package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts.map +1 -0
  166. package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts +6 -0
  167. package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts.map +1 -0
  168. package/dist/sst/.sst/platform/src/components/aws/https-redirect.d.ts +38 -0
  169. package/dist/sst/.sst/platform/src/components/aws/https-redirect.d.ts.map +1 -0
  170. package/dist/sst/.sst/platform/src/components/aws/iam-edit.d.ts +39 -0
  171. package/dist/sst/.sst/platform/src/components/aws/iam-edit.d.ts.map +1 -0
  172. package/dist/sst/.sst/platform/src/components/aws/index.d.ts +48 -0
  173. package/dist/sst/.sst/platform/src/components/aws/index.d.ts.map +1 -0
  174. package/dist/sst/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts +48 -0
  175. package/dist/sst/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -0
  176. package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts +249 -0
  177. package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts.map +1 -0
  178. package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts +17 -0
  179. package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts.map +1 -0
  180. package/dist/sst/.sst/platform/src/components/aws/logging.d.ts +26 -0
  181. package/dist/sst/.sst/platform/src/components/aws/logging.d.ts.map +1 -0
  182. package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts +496 -0
  183. package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts.map +1 -0
  184. package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts +517 -0
  185. package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts.map +1 -0
  186. package/dist/sst/.sst/platform/src/components/aws/nuxt.d.ts +495 -0
  187. package/dist/sst/.sst/platform/src/components/aws/nuxt.d.ts.map +1 -0
  188. package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts +295 -0
  189. package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts.map +1 -0
  190. package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts +165 -0
  191. package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts.map +1 -0
  192. package/dist/sst/.sst/platform/src/components/aws/permission.d.ts +40 -0
  193. package/dist/sst/.sst/platform/src/components/aws/permission.d.ts.map +1 -0
  194. package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts +317 -0
  195. package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts.map +1 -0
  196. package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts +500 -0
  197. package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts.map +1 -0
  198. package/dist/sst/.sst/platform/src/components/aws/providers/bucket-files.d.ts +18 -0
  199. package/dist/sst/.sst/platform/src/components/aws/providers/bucket-files.d.ts.map +1 -0
  200. package/dist/sst/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts +13 -0
  201. package/dist/sst/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts.map +1 -0
  202. package/dist/sst/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts +11 -0
  203. package/dist/sst/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts.map +1 -0
  204. package/dist/sst/.sst/platform/src/components/aws/providers/function-environment-update.d.ts +29 -0
  205. package/dist/sst/.sst/platform/src/components/aws/providers/function-environment-update.d.ts.map +1 -0
  206. package/dist/sst/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts +11 -0
  207. package/dist/sst/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts.map +1 -0
  208. package/dist/sst/.sst/platform/src/components/aws/providers/kv-keys.d.ts +11 -0
  209. package/dist/sst/.sst/platform/src/components/aws/providers/kv-keys.d.ts.map +1 -0
  210. package/dist/sst/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts +11 -0
  211. package/dist/sst/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts.map +1 -0
  212. package/dist/sst/.sst/platform/src/components/aws/providers/origin-access-control.d.ts +8 -0
  213. package/dist/sst/.sst/platform/src/components/aws/providers/origin-access-control.d.ts.map +1 -0
  214. package/dist/sst/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts +8 -0
  215. package/dist/sst/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts.map +1 -0
  216. package/dist/sst/.sst/platform/src/components/aws/providers/vector-table.d.ts +12 -0
  217. package/dist/sst/.sst/platform/src/components/aws/providers/vector-table.d.ts.map +1 -0
  218. package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts +48 -0
  219. package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts.map +1 -0
  220. package/dist/sst/.sst/platform/src/components/aws/queue.d.ts +485 -0
  221. package/dist/sst/.sst/platform/src/components/aws/queue.d.ts.map +1 -0
  222. package/dist/sst/.sst/platform/src/components/aws/react.d.ts +416 -0
  223. package/dist/sst/.sst/platform/src/components/aws/react.d.ts.map +1 -0
  224. package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts +53 -0
  225. package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts.map +1 -0
  226. package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts +232 -0
  227. package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts.map +1 -0
  228. package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts +338 -0
  229. package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts.map +1 -0
  230. package/dist/sst/.sst/platform/src/components/aws/redis.d.ts +364 -0
  231. package/dist/sst/.sst/platform/src/components/aws/redis.d.ts.map +1 -0
  232. package/dist/sst/.sst/platform/src/components/aws/remix.d.ts +423 -0
  233. package/dist/sst/.sst/platform/src/components/aws/remix.d.ts.map +1 -0
  234. package/dist/sst/.sst/platform/src/components/aws/router-base-route.d.ts +28 -0
  235. package/dist/sst/.sst/platform/src/components/aws/router-base-route.d.ts.map +1 -0
  236. package/dist/sst/.sst/platform/src/components/aws/router-bucket-route.d.ts +29 -0
  237. package/dist/sst/.sst/platform/src/components/aws/router-bucket-route.d.ts.map +1 -0
  238. package/dist/sst/.sst/platform/src/components/aws/router-url-route.d.ts +28 -0
  239. package/dist/sst/.sst/platform/src/components/aws/router-url-route.d.ts.map +1 -0
  240. package/dist/sst/.sst/platform/src/components/aws/router.d.ts +1272 -0
  241. package/dist/sst/.sst/platform/src/components/aws/router.d.ts.map +1 -0
  242. package/dist/sst/.sst/platform/src/components/aws/service-v1.d.ts +78 -0
  243. package/dist/sst/.sst/platform/src/components/aws/service-v1.d.ts.map +1 -0
  244. package/dist/sst/.sst/platform/src/components/aws/service.d.ts +1625 -0
  245. package/dist/sst/.sst/platform/src/components/aws/service.d.ts.map +1 -0
  246. package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts +53 -0
  247. package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -0
  248. package/dist/sst/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts +55 -0
  249. package/dist/sst/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts.map +1 -0
  250. package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts +389 -0
  251. package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts.map +1 -0
  252. package/dist/sst/.sst/platform/src/components/aws/solid-start.d.ts +414 -0
  253. package/dist/sst/.sst/platform/src/components/aws/solid-start.d.ts.map +1 -0
  254. package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts +685 -0
  255. package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts.map +1 -0
  256. package/dist/sst/.sst/platform/src/components/aws/static-site.d.ts +736 -0
  257. package/dist/sst/.sst/platform/src/components/aws/static-site.d.ts.map +1 -0
  258. package/dist/sst/.sst/platform/src/components/aws/step-functions/choice.d.ts +73 -0
  259. package/dist/sst/.sst/platform/src/components/aws/step-functions/choice.d.ts.map +1 -0
  260. package/dist/sst/.sst/platform/src/components/aws/step-functions/fail.d.ts +63 -0
  261. package/dist/sst/.sst/platform/src/components/aws/step-functions/fail.d.ts.map +1 -0
  262. package/dist/sst/.sst/platform/src/components/aws/step-functions/map.d.ts +236 -0
  263. package/dist/sst/.sst/platform/src/components/aws/step-functions/map.d.ts.map +1 -0
  264. package/dist/sst/.sst/platform/src/components/aws/step-functions/parallel.d.ts +127 -0
  265. package/dist/sst/.sst/platform/src/components/aws/step-functions/parallel.d.ts.map +1 -0
  266. package/dist/sst/.sst/platform/src/components/aws/step-functions/pass.d.ts +39 -0
  267. package/dist/sst/.sst/platform/src/components/aws/step-functions/pass.d.ts.map +1 -0
  268. package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts +231 -0
  269. package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts.map +1 -0
  270. package/dist/sst/.sst/platform/src/components/aws/step-functions/succeed.d.ts +26 -0
  271. package/dist/sst/.sst/platform/src/components/aws/step-functions/succeed.d.ts.map +1 -0
  272. package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts +477 -0
  273. package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts.map +1 -0
  274. package/dist/sst/.sst/platform/src/components/aws/step-functions/wait.d.ts +91 -0
  275. package/dist/sst/.sst/platform/src/components/aws/step-functions/wait.d.ts.map +1 -0
  276. package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts +473 -0
  277. package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts.map +1 -0
  278. package/dist/sst/.sst/platform/src/components/aws/svelte-kit.d.ts +417 -0
  279. package/dist/sst/.sst/platform/src/components/aws/svelte-kit.d.ts.map +1 -0
  280. package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts +354 -0
  281. package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts.map +1 -0
  282. package/dist/sst/.sst/platform/src/components/aws/task.d.ts +322 -0
  283. package/dist/sst/.sst/platform/src/components/aws/task.d.ts.map +1 -0
  284. package/dist/sst/.sst/platform/src/components/aws/vector.d.ts +150 -0
  285. package/dist/sst/.sst/platform/src/components/aws/vector.d.ts.map +1 -0
  286. package/dist/sst/.sst/platform/src/components/aws/vpc-v1.d.ts +208 -0
  287. package/dist/sst/.sst/platform/src/components/aws/vpc-v1.d.ts.map +1 -0
  288. package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts +444 -0
  289. package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts.map +1 -0
  290. package/dist/sst/.sst/platform/src/components/base/base-site.d.ts +53 -0
  291. package/dist/sst/.sst/platform/src/components/base/base-site.d.ts.map +1 -0
  292. package/dist/sst/.sst/platform/src/components/base/base-ssr-site.d.ts +13 -0
  293. package/dist/sst/.sst/platform/src/components/base/base-ssr-site.d.ts.map +1 -0
  294. package/dist/sst/.sst/platform/src/components/base/base-static-site.d.ts +199 -0
  295. package/dist/sst/.sst/platform/src/components/base/base-static-site.d.ts.map +1 -0
  296. package/dist/sst/.sst/platform/src/components/cloudflare/account-id.d.ts +2 -0
  297. package/dist/sst/.sst/platform/src/components/cloudflare/account-id.d.ts.map +1 -0
  298. package/dist/sst/.sst/platform/src/components/cloudflare/auth.d.ts +22 -0
  299. package/dist/sst/.sst/platform/src/components/cloudflare/auth.d.ts.map +1 -0
  300. package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts +69 -0
  301. package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts.map +1 -0
  302. package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts +103 -0
  303. package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts.map +1 -0
  304. package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts +121 -0
  305. package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts.map +1 -0
  306. package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts +107 -0
  307. package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts.map +1 -0
  308. package/dist/sst/.sst/platform/src/components/cloudflare/dns.d.ts +94 -0
  309. package/dist/sst/.sst/platform/src/components/cloudflare/dns.d.ts.map +1 -0
  310. package/dist/sst/.sst/platform/src/components/cloudflare/experimental/astro.d.ts +186 -0
  311. package/dist/sst/.sst/platform/src/components/cloudflare/experimental/astro.d.ts.map +1 -0
  312. package/dist/sst/.sst/platform/src/components/cloudflare/experimental/index.d.ts +4 -0
  313. package/dist/sst/.sst/platform/src/components/cloudflare/experimental/index.d.ts.map +1 -0
  314. package/dist/sst/.sst/platform/src/components/cloudflare/experimental/solid-start.d.ts +171 -0
  315. package/dist/sst/.sst/platform/src/components/cloudflare/experimental/solid-start.d.ts.map +1 -0
  316. package/dist/sst/.sst/platform/src/components/cloudflare/experimental/static-site.d.ts +222 -0
  317. package/dist/sst/.sst/platform/src/components/cloudflare/experimental/static-site.d.ts.map +1 -0
  318. package/dist/sst/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts +19 -0
  319. package/dist/sst/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts.map +1 -0
  320. package/dist/sst/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts +10 -0
  321. package/dist/sst/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts.map +1 -0
  322. package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts +16 -0
  323. package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts.map +1 -0
  324. package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts +107 -0
  325. package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts.map +1 -0
  326. package/dist/sst/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts +20 -0
  327. package/dist/sst/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts.map +1 -0
  328. package/dist/sst/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts +23 -0
  329. package/dist/sst/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts.map +1 -0
  330. package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-assets.d.ts +18 -0
  331. package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-assets.d.ts.map +1 -0
  332. package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts +22 -0
  333. package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts.map +1 -0
  334. package/dist/sst/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts +22 -0
  335. package/dist/sst/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts.map +1 -0
  336. package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts +60 -0
  337. package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts.map +1 -0
  338. package/dist/sst/.sst/platform/src/components/cloudflare/ssr-site.d.ts +51 -0
  339. package/dist/sst/.sst/platform/src/components/cloudflare/ssr-site.d.ts.map +1 -0
  340. package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts +262 -0
  341. package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts.map +1 -0
  342. package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts +295 -0
  343. package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts.map +1 -0
  344. package/dist/sst/.sst/platform/src/components/component.d.ts +37 -0
  345. package/dist/sst/.sst/platform/src/components/component.d.ts.map +1 -0
  346. package/dist/sst/.sst/platform/src/components/cpu.d.ts +3 -0
  347. package/dist/sst/.sst/platform/src/components/cpu.d.ts.map +1 -0
  348. package/dist/sst/.sst/platform/src/components/dns.d.ts +59 -0
  349. package/dist/sst/.sst/platform/src/components/dns.d.ts.map +1 -0
  350. package/dist/sst/.sst/platform/src/components/duration.d.ts +7 -0
  351. package/dist/sst/.sst/platform/src/components/duration.d.ts.map +1 -0
  352. package/dist/sst/.sst/platform/src/components/error.d.ts +4 -0
  353. package/dist/sst/.sst/platform/src/components/error.d.ts.map +1 -0
  354. package/dist/sst/.sst/platform/src/components/experimental/dev-command.d.ts +99 -0
  355. package/dist/sst/.sst/platform/src/components/experimental/dev-command.d.ts.map +1 -0
  356. package/dist/sst/.sst/platform/src/components/experimental/index.d.ts +2 -0
  357. package/dist/sst/.sst/platform/src/components/experimental/index.d.ts.map +1 -0
  358. package/dist/sst/.sst/platform/src/components/index.d.ts +16 -0
  359. package/dist/sst/.sst/platform/src/components/index.d.ts.map +1 -0
  360. package/dist/sst/.sst/platform/src/components/input.d.ts +3 -0
  361. package/dist/sst/.sst/platform/src/components/input.d.ts.map +1 -0
  362. package/dist/sst/.sst/platform/src/components/link.d.ts +41 -0
  363. package/dist/sst/.sst/platform/src/components/link.d.ts.map +1 -0
  364. package/dist/sst/.sst/platform/src/components/linkable.d.ts +271 -0
  365. package/dist/sst/.sst/platform/src/components/linkable.d.ts.map +1 -0
  366. package/dist/sst/.sst/platform/src/components/naming.d.ts +7 -0
  367. package/dist/sst/.sst/platform/src/components/naming.d.ts.map +1 -0
  368. package/dist/sst/.sst/platform/src/components/path.d.ts +2 -0
  369. package/dist/sst/.sst/platform/src/components/path.d.ts.map +1 -0
  370. package/dist/sst/.sst/platform/src/components/rpc/rpc.d.ts +19 -0
  371. package/dist/sst/.sst/platform/src/components/rpc/rpc.d.ts.map +1 -0
  372. package/dist/sst/.sst/platform/src/components/secret.d.ts +125 -0
  373. package/dist/sst/.sst/platform/src/components/secret.d.ts.map +1 -0
  374. package/dist/sst/.sst/platform/src/components/size.d.ts +5 -0
  375. package/dist/sst/.sst/platform/src/components/size.d.ts.map +1 -0
  376. package/dist/sst/.sst/platform/src/components/vercel/account-id.d.ts +2 -0
  377. package/dist/sst/.sst/platform/src/components/vercel/account-id.d.ts.map +1 -0
  378. package/dist/sst/.sst/platform/src/components/vercel/dns.d.ts +73 -0
  379. package/dist/sst/.sst/platform/src/components/vercel/dns.d.ts.map +1 -0
  380. package/dist/sst/.sst/platform/src/components/vercel/index.d.ts +3 -0
  381. package/dist/sst/.sst/platform/src/components/vercel/index.d.ts.map +1 -0
  382. package/dist/sst/.sst/platform/src/components/vercel/providers/dns-record.d.ts +14 -0
  383. package/dist/sst/.sst/platform/src/components/vercel/providers/dns-record.d.ts.map +1 -0
  384. package/dist/sst/.sst/platform/src/config.d.ts +1258 -0
  385. package/dist/sst/.sst/platform/src/config.d.ts.map +1 -0
  386. package/dist/sst/.sst/platform/src/util/compare-semver.d.ts +4 -0
  387. package/dist/sst/.sst/platform/src/util/compare-semver.d.ts.map +1 -0
  388. package/dist/sst/.sst/platform/src/util/fs.d.ts +5 -0
  389. package/dist/sst/.sst/platform/src/util/fs.d.ts.map +1 -0
  390. package/dist/sst/.sst/platform/src/util/lazy.d.ts +2 -0
  391. package/dist/sst/.sst/platform/src/util/lazy.d.ts.map +1 -0
  392. package/dist/sst/.sst/platform/src/util/semaphore.d.ts +9 -0
  393. package/dist/sst/.sst/platform/src/util/semaphore.d.ts.map +1 -0
  394. package/dist/sst/.sst/platform/src/util/warn.d.ts +2 -0
  395. package/dist/sst/.sst/platform/src/util/warn.d.ts.map +1 -0
  396. package/dist/sst/components/dashboard.d.ts +2 -0
  397. package/dist/sst/components/dashboard.d.ts.map +1 -0
  398. package/dist/sst/components/monorise-core.d.ts +18 -0
  399. package/dist/sst/components/monorise-core.d.ts.map +1 -0
  400. package/dist/sst/components/q-function.d.ts +17 -0
  401. package/dist/sst/components/q-function.d.ts.map +1 -0
  402. package/dist/sst/components/single-table.d.ts +14 -0
  403. package/dist/sst/components/single-table.d.ts.map +1 -0
  404. package/dist/sst/constants/event.d.ts +73 -0
  405. package/dist/sst/constants/event.d.ts.map +1 -0
  406. package/dist/sst/constants/table.d.ts +3 -0
  407. package/dist/sst/constants/table.d.ts.map +1 -0
  408. package/dist/sst/index.d.ts +11 -0
  409. package/dist/sst/index.d.ts.map +1 -0
  410. package/dist/sst/index.js +609 -0
  411. package/dist/sst/index.js.map +1 -0
  412. package/dist/sst/sst.config.d.ts +3 -0
  413. package/dist/sst/sst.config.d.ts.map +1 -0
  414. package/dist/sst/tsup.config.d.ts +3 -0
  415. package/dist/sst/tsup.config.d.ts.map +1 -0
  416. package/package.json +83 -0
@@ -0,0 +1,1625 @@
1
+ import { ComponentResourceOptions, Output } from "@pulumi/pulumi";
2
+ import { Component, Prettify, Transform } from "../component.js";
3
+ import { Link } from "../link.js";
4
+ import { appautoscaling, ec2, ecs, lb } from "@pulumi/aws";
5
+ import { DurationMinutes } from "../duration.js";
6
+ import { Input } from "../input.js";
7
+ import { FargateBaseArgs, FargateContainerArgs } from "./fargate.js";
8
+ import { Dns } from "../dns.js";
9
+ type Port = `${number}/${"http" | "https" | "tcp" | "udp" | "tcp_udp" | "tls"}`;
10
+ interface ServiceRules {
11
+ /**
12
+ * The port and protocol the service listens on. Uses the format `{port}/{protocol}`.
13
+ *
14
+ * @example
15
+ * ```js
16
+ * {
17
+ * listen: "80/http"
18
+ * }
19
+ * ```
20
+ */
21
+ listen: Input<Port>;
22
+ /**
23
+ * The port and protocol of the container the service forwards the traffic to. Uses the
24
+ * format `{port}/{protocol}`.
25
+ *
26
+ * @example
27
+ * ```js
28
+ * {
29
+ * forward: "80/http"
30
+ * }
31
+ * ```
32
+ * @default The same port and protocol as `listen`.
33
+ */
34
+ forward?: Input<Port>;
35
+ /**
36
+ * The name of the container to forward the traffic to. This maps to the `name` defined in the
37
+ * `container` prop.
38
+ *
39
+ * You only need this if there's more than one container. If there's only one container, the
40
+ * traffic is automatically forwarded there.
41
+ */
42
+ container?: Input<string>;
43
+ /**
44
+ * The port and protocol to redirect the traffic to. Uses the format `{port}/{protocol}`.
45
+ *
46
+ * @example
47
+ * ```js
48
+ * {
49
+ * redirect: "80/http"
50
+ * }
51
+ * ```
52
+ */
53
+ redirect?: Input<Port>;
54
+ /**
55
+ * @deprecated Use `conditions.path` instead.
56
+ */
57
+ path?: Input<string>;
58
+ /**
59
+ * The conditions for the redirect. Only applicable to `http` and `https` protocols.
60
+ */
61
+ conditions?: Input<{
62
+ /**
63
+ * Configure path-based routing. Only requests matching the path are forwarded to
64
+ * the container.
65
+ *
66
+ * ```js
67
+ * {
68
+ * path: "/api/*"
69
+ * }
70
+ * ```
71
+ *
72
+ * The path pattern is case-sensitive, supports wildcards, and can be up to 128
73
+ * characters.
74
+ * - `*` matches 0 or more characters. For example, `/api/*` matches `/api/` or
75
+ * `/api/orders`.
76
+ * - `?` matches exactly 1 character. For example, `/api/?.png` matches `/api/a.png`.
77
+ *
78
+ * @default Requests to all paths are forwarded.
79
+ */
80
+ path?: Input<string>;
81
+ /**
82
+ * Configure query string based routing. Only requests matching one of the query
83
+ * string conditions are forwarded to the container.
84
+ *
85
+ * Takes a list of `key`, the name of the query string parameter, and `value` pairs.
86
+ * Where `value` is the value of the query string parameter. But it can be a pattern as well.
87
+ *
88
+ * If multiple `key` and `value` pairs are provided, it'll match requests with **any** of the
89
+ * query string parameters.
90
+ *
91
+ * @default Query string is not checked when forwarding requests.
92
+ *
93
+ * @example
94
+ *
95
+ * For example, to match requests with query string `version=v1`.
96
+ *
97
+ * ```js
98
+ * {
99
+ * query: [
100
+ * { key: "version", value: "v1" }
101
+ * ]
102
+ * }
103
+ * ```
104
+ *
105
+ * Or match requests with query string matching `env=test*`.
106
+ *
107
+ * ```js
108
+ * {
109
+ * query: [
110
+ * { key: "env", value: "test*" }
111
+ * ]
112
+ * }
113
+ * ```
114
+ *
115
+ * Match requests with query string `version=v1` **or** `env=test*`.
116
+ *
117
+ * ```js
118
+ * {
119
+ * query: [
120
+ * { key: "version", value: "v1" },
121
+ * { key: "env", value: "test*" }
122
+ * ]
123
+ * }
124
+ * ```
125
+ *
126
+ * Match requests with any query string key with value `example`.
127
+ *
128
+ * ```js
129
+ * {
130
+ * query: [
131
+ * { value: "example" }
132
+ * ]
133
+ * }
134
+ * ```
135
+ */
136
+ query?: Input<Input<{
137
+ /**
138
+ * The name of the query string parameter.
139
+ */
140
+ key?: Input<string>;
141
+ /**
142
+ * The value of the query string parameter.
143
+ *
144
+ * If no `key` is provided, it'll match any request where a query string parameter with
145
+ * the given value exists.
146
+ */
147
+ value: Input<string>;
148
+ }>[]>;
149
+ /**
150
+ * Configure header based routing. Only requests matching the header
151
+ * name and values are forwarded to the container.
152
+ *
153
+ * Both the header name and values are case insensitive.
154
+ *
155
+ * @default Header is not checked when forwarding requests.
156
+ *
157
+ * @example
158
+ *
159
+ * For example, if you specify `X-Custom-Header` as the name and `Value1`
160
+ * as a value, it will match requests with the header
161
+ * `x-custom-header: value1` as well.
162
+ *
163
+ * ```js
164
+ * {
165
+ * header: {
166
+ * name: "X-Custom-Header",
167
+ * values: ["Value1", "Value2", "Prefix*"]
168
+ * }
169
+ * }
170
+ * ```
171
+ */
172
+ header?: Input<{
173
+ /**
174
+ * The name of the HTTP header field to check. This is case-insensitive.
175
+ */
176
+ name: Input<string>;
177
+ /**
178
+ * The values to match against the header value. The rule matches if the
179
+ * request header matches any of these values. Values are case-insensitive
180
+ * and support wildcards (`*` and `?`) for pattern matching.
181
+ */
182
+ values: Input<Input<string>>[];
183
+ }>;
184
+ }>;
185
+ }
186
+ interface ServiceContainerArgs extends FargateContainerArgs {
187
+ /**
188
+ * Configure the health check for the container. Same as the top-level
189
+ * [`health`](#health).
190
+ */
191
+ health?: ServiceArgs["health"];
192
+ /**
193
+ * Configure how this container works in `sst dev`. Same as the top-level
194
+ * [`dev`](#dev).
195
+ */
196
+ dev?: {
197
+ /**
198
+ * The command that `sst dev` runs to start this in dev mode. Same as the top-level
199
+ * [`dev.command`](#dev-command).
200
+ */
201
+ command: Input<string>;
202
+ /**
203
+ * Configure if you want to automatically start this when `sst dev` starts. Same as the
204
+ * top-level [`dev.autostart`](#dev-autostart).
205
+ */
206
+ autostart?: Input<boolean>;
207
+ /**
208
+ * Change the directory from where the `command` is run. Same as the top-level
209
+ * [`dev.directory`](#dev-directory).
210
+ */
211
+ directory?: Input<string>;
212
+ };
213
+ }
214
+ export interface ServiceArgs extends FargateBaseArgs {
215
+ /**
216
+ * Configure how this component works in `sst dev`.
217
+ *
218
+ * :::note
219
+ * In `sst dev` your service is not deployed.
220
+ * :::
221
+ *
222
+ * By default, your service in not deployed in `sst dev`. Instead, you can set the
223
+ * `dev.command` and it'll be started locally in a separate tab in the
224
+ * `sst dev` multiplexer. Read more about [`sst dev`](/docs/reference/cli/#dev).
225
+ *
226
+ * This makes it so that the container doesn't have to be redeployed on every change. To
227
+ * disable this and deploy your service in `sst dev`, pass in `false`.
228
+ */
229
+ dev?: false | {
230
+ /**
231
+ * The `url` when this is running in dev mode.
232
+ *
233
+ * Since this component is not deployed in `sst dev`, there is no real URL. But if you are
234
+ * using this component's `url` or linking to this component's `url`, it can be useful to
235
+ * have a placeholder URL. It avoids having to handle it being `undefined`.
236
+ * @default `"http://url-unavailable-in-dev.mode"`
237
+ */
238
+ url?: Input<string>;
239
+ /**
240
+ * The command that `sst dev` runs to start this in dev mode. This is the command you run
241
+ * when you want to run your service locally.
242
+ */
243
+ command?: Input<string>;
244
+ /**
245
+ * Configure if you want to automatically start this when `sst dev` starts. You can still
246
+ * start it manually later.
247
+ * @default `true`
248
+ */
249
+ autostart?: Input<boolean>;
250
+ /**
251
+ * Change the directory from where the `command` is run.
252
+ * @default Uses the `image.dockerfile` path
253
+ */
254
+ directory?: Input<string>;
255
+ };
256
+ /**
257
+ * Configure a public endpoint for the service. When configured, a load balancer
258
+ * will be created to route traffic to the containers. By default, the endpoint is an
259
+ * auto-generated load balancer URL.
260
+ *
261
+ * You can also add a custom domain for the public endpoint.
262
+ * @deprecated Use `loadBalancer` instead.
263
+ * @example
264
+ *
265
+ * ```js
266
+ * {
267
+ * public: {
268
+ * domain: "example.com",
269
+ * rules: [
270
+ * { listen: "80/http" },
271
+ * { listen: "443/https", forward: "80/http" }
272
+ * ]
273
+ * }
274
+ * }
275
+ * ```
276
+ */
277
+ public?: Input<{
278
+ /**
279
+ * Set a custom domain for your public endpoint.
280
+ *
281
+ * Automatically manages domains hosted on AWS Route 53, Cloudflare, and Vercel. For other
282
+ * providers, you'll need to pass in a `cert` that validates domain ownership and add the
283
+ * DNS records.
284
+ *
285
+ * :::tip
286
+ * Built-in support for AWS Route 53, Cloudflare, and Vercel. And manual setup for other
287
+ * providers.
288
+ * :::
289
+ *
290
+ * @example
291
+ *
292
+ * By default this assumes the domain is hosted on Route 53.
293
+ *
294
+ * ```js
295
+ * {
296
+ * domain: "example.com"
297
+ * }
298
+ * ```
299
+ *
300
+ * For domains hosted on Cloudflare.
301
+ *
302
+ * ```js
303
+ * {
304
+ * domain: {
305
+ * name: "example.com",
306
+ * dns: sst.cloudflare.dns()
307
+ * }
308
+ * }
309
+ * ```
310
+ */
311
+ domain?: Input<string | {
312
+ /**
313
+ * The custom domain you want to use.
314
+ *
315
+ * @example
316
+ * ```js
317
+ * {
318
+ * domain: {
319
+ * name: "example.com"
320
+ * }
321
+ * }
322
+ * ```
323
+ *
324
+ * Can also include subdomains based on the current stage.
325
+ *
326
+ * ```js
327
+ * {
328
+ * domain: {
329
+ * name: `${$app.stage}.example.com`
330
+ * }
331
+ * }
332
+ * ```
333
+ */
334
+ name: Input<string>;
335
+ /**
336
+ * Alias domains that should be used.
337
+ *
338
+ * @example
339
+ * ```js {4}
340
+ * {
341
+ * domain: {
342
+ * name: "app1.example.com",
343
+ * aliases: ["app2.example.com"]
344
+ * }
345
+ * }
346
+ * ```
347
+ */
348
+ aliases?: Input<string[]>;
349
+ /**
350
+ * The ARN of an ACM (AWS Certificate Manager) certificate that proves ownership of the
351
+ * domain. By default, a certificate is created and validated automatically.
352
+ *
353
+ * :::tip
354
+ * You need to pass in a `cert` for domains that are not hosted on supported `dns` providers.
355
+ * :::
356
+ *
357
+ * To manually set up a domain on an unsupported provider, you'll need to:
358
+ *
359
+ * 1. [Validate that you own the domain](https://docs.aws.amazon.com/acm/latest/userguide/domain-ownership-validation.html) by creating an ACM certificate. You can either validate it by setting a DNS record or by verifying an email sent to the domain owner.
360
+ * 2. Once validated, set the certificate ARN as the `cert` and set `dns` to `false`.
361
+ * 3. Add the DNS records in your provider to point to the load balancer endpoint.
362
+ *
363
+ * @example
364
+ * ```js
365
+ * {
366
+ * domain: {
367
+ * name: "example.com",
368
+ * dns: false,
369
+ * cert: "arn:aws:acm:us-east-1:112233445566:certificate/3a958790-8878-4cdc-a396-06d95064cf63"
370
+ * }
371
+ * }
372
+ * ```
373
+ */
374
+ cert?: Input<string>;
375
+ /**
376
+ * The DNS provider to use for the domain. Defaults to the AWS.
377
+ *
378
+ * Takes an adapter that can create the DNS records on the provider. This can automate
379
+ * validating the domain and setting up the DNS routing.
380
+ *
381
+ * Supports Route 53, Cloudflare, and Vercel adapters. For other providers, you'll need
382
+ * to set `dns` to `false` and pass in a certificate validating ownership via `cert`.
383
+ *
384
+ * @default `sst.aws.dns`
385
+ *
386
+ * @example
387
+ *
388
+ * Specify the hosted zone ID for the Route 53 domain.
389
+ *
390
+ * ```js
391
+ * {
392
+ * domain: {
393
+ * name: "example.com",
394
+ * dns: sst.aws.dns({
395
+ * zone: "Z2FDTNDATAQYW2"
396
+ * })
397
+ * }
398
+ * }
399
+ * ```
400
+ *
401
+ * Use a domain hosted on Cloudflare, needs the Cloudflare provider.
402
+ *
403
+ * ```js
404
+ * {
405
+ * domain: {
406
+ * name: "example.com",
407
+ * dns: sst.cloudflare.dns()
408
+ * }
409
+ * }
410
+ * ```
411
+ *
412
+ * Use a domain hosted on Vercel, needs the Vercel provider.
413
+ *
414
+ * ```js
415
+ * {
416
+ * domain: {
417
+ * name: "example.com",
418
+ * dns: sst.vercel.dns()
419
+ * }
420
+ * }
421
+ * ```
422
+ */
423
+ dns?: Input<false | (Dns & {})>;
424
+ }>;
425
+ /** @deprecated Use `rules` instead. */
426
+ ports?: Input<Prettify<ServiceRules>[]>;
427
+ /**
428
+ * Configure the mapping for the ports the public endpoint listens to and forwards to
429
+ * the service.
430
+ * This supports two types of protocols:
431
+ *
432
+ * 1. Application Layer Protocols: `http` and `https`. This'll create an [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html).
433
+ * 2. Network Layer Protocols: `tcp`, `udp`, `tcp_udp`, and `tls`. This'll create a [Network Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html).
434
+ *
435
+ * :::note
436
+ * If you are listening on `https` or `tls`, you need to specify a custom `public.domain`.
437
+ * :::
438
+ *
439
+ * You can **not** configure both application and network layer protocols for the same
440
+ * service.
441
+ *
442
+ * @example
443
+ * Here we are listening on port `80` and forwarding it to the service on port `8080`.
444
+ * ```js
445
+ * {
446
+ * public: {
447
+ * rules: [
448
+ * { listen: "80/http", forward: "8080/http" }
449
+ * ]
450
+ * }
451
+ * }
452
+ * ```
453
+ *
454
+ * The `forward` port and protocol defaults to the `listen` port and protocol. So in this
455
+ * case both are `80/http`.
456
+ *
457
+ * ```js
458
+ * {
459
+ * public: {
460
+ * rules: [
461
+ * { listen: "80/http" }
462
+ * ]
463
+ * }
464
+ * }
465
+ * ```
466
+ *
467
+ * If multiple containers are configured via the `containers` argument, you need to
468
+ * specify which container the traffic should be forwarded to.
469
+ *
470
+ * ```js
471
+ * {
472
+ * public: {
473
+ * rules: [
474
+ * { listen: "80/http", container: "app" },
475
+ * { listen: "8000/http", container: "admin" },
476
+ * ]
477
+ * }
478
+ * }
479
+ * ```
480
+ */
481
+ rules?: Input<Prettify<ServiceRules>[]>;
482
+ }>;
483
+ /**
484
+ * Configure a load balancer to route traffic to the containers.
485
+ *
486
+ * While you can expose a service through API Gateway, it's better to use a load balancer
487
+ * for most traditional web applications. It is more expensive to start but at higher
488
+ * levels of traffic it ends up being more cost effective.
489
+ *
490
+ * Also, if you need to listen on network layer protocols like `tcp` or `udp`, you have to
491
+ * expose it through a load balancer.
492
+ *
493
+ * By default, the endpoint is an auto-generated load balancer URL. You can also add a
494
+ * custom domain for the endpoint.
495
+ *
496
+ * @default Load balancer is not created
497
+ * @example
498
+ *
499
+ * ```js
500
+ * {
501
+ * loadBalancer: {
502
+ * domain: "example.com",
503
+ * rules: [
504
+ * { listen: "80/http", redirect: "443/https" },
505
+ * { listen: "443/https", forward: "80/http" }
506
+ * ]
507
+ * }
508
+ * }
509
+ * ```
510
+ */
511
+ loadBalancer?: Input<{
512
+ /**
513
+ * Configure if the load balancer should be public or private.
514
+ *
515
+ * When set to `false`, the load balancer endpoint will only be accessible within the
516
+ * VPC.
517
+ *
518
+ * @default `true`
519
+ */
520
+ public?: Input<boolean>;
521
+ /**
522
+ * Set a custom domain for your load balancer endpoint.
523
+ *
524
+ * Automatically manages domains hosted on AWS Route 53, Cloudflare, and Vercel. For other
525
+ * providers, you'll need to pass in a `cert` that validates domain ownership and add the
526
+ * DNS records.
527
+ *
528
+ * :::tip
529
+ * Built-in support for AWS Route 53, Cloudflare, and Vercel. And manual setup for other
530
+ * providers.
531
+ * :::
532
+ *
533
+ * @example
534
+ *
535
+ * By default this assumes the domain is hosted on Route 53.
536
+ *
537
+ * ```js
538
+ * {
539
+ * domain: "example.com"
540
+ * }
541
+ * ```
542
+ *
543
+ * For domains hosted on Cloudflare.
544
+ *
545
+ * ```js
546
+ * {
547
+ * domain: {
548
+ * name: "example.com",
549
+ * dns: sst.cloudflare.dns()
550
+ * }
551
+ * }
552
+ * ```
553
+ */
554
+ domain?: Input<string | {
555
+ /**
556
+ * The custom domain you want to use.
557
+ *
558
+ * @example
559
+ * ```js
560
+ * {
561
+ * domain: {
562
+ * name: "example.com"
563
+ * }
564
+ * }
565
+ * ```
566
+ *
567
+ * Can also include subdomains based on the current stage.
568
+ *
569
+ * ```js
570
+ * {
571
+ * domain: {
572
+ * name: `${$app.stage}.example.com`
573
+ * }
574
+ * }
575
+ * ```
576
+ *
577
+ * Wildcard domains are supported.
578
+ *
579
+ * ```js
580
+ * {
581
+ * domain: {
582
+ * name: "*.example.com"
583
+ * }
584
+ * }
585
+ * ```
586
+ */
587
+ name: Input<string>;
588
+ /**
589
+ * Alias domains that should be used.
590
+ *
591
+ * @example
592
+ * ```js {4}
593
+ * {
594
+ * domain: {
595
+ * name: "app1.example.com",
596
+ * aliases: ["app2.example.com"]
597
+ * }
598
+ * }
599
+ * ```
600
+ */
601
+ aliases?: Input<string[]>;
602
+ /**
603
+ * The ARN of an ACM (AWS Certificate Manager) certificate that proves ownership of the
604
+ * domain. By default, a certificate is created and validated automatically.
605
+ *
606
+ * :::tip
607
+ * You need to pass in a `cert` for domains that are not hosted on supported `dns` providers.
608
+ * :::
609
+ *
610
+ * To manually set up a domain on an unsupported provider, you'll need to:
611
+ *
612
+ * 1. [Validate that you own the domain](https://docs.aws.amazon.com/acm/latest/userguide/domain-ownership-validation.html) by creating an ACM certificate. You can either validate it by setting a DNS record or by verifying an email sent to the domain owner.
613
+ * 2. Once validated, set the certificate ARN as the `cert` and set `dns` to `false`.
614
+ * 3. Add the DNS records in your provider to point to the load balancer endpoint.
615
+ *
616
+ * @example
617
+ * ```js
618
+ * {
619
+ * domain: {
620
+ * name: "example.com",
621
+ * dns: false,
622
+ * cert: "arn:aws:acm:us-east-1:112233445566:certificate/3a958790-8878-4cdc-a396-06d95064cf63"
623
+ * }
624
+ * }
625
+ * ```
626
+ */
627
+ cert?: Input<string>;
628
+ /**
629
+ * The DNS provider to use for the domain. Defaults to the AWS.
630
+ *
631
+ * Takes an adapter that can create the DNS records on the provider. This can automate
632
+ * validating the domain and setting up the DNS routing.
633
+ *
634
+ * Supports Route 53, Cloudflare, and Vercel adapters. For other providers, you'll need
635
+ * to set `dns` to `false` and pass in a certificate validating ownership via `cert`.
636
+ *
637
+ * @default `sst.aws.dns`
638
+ *
639
+ * @example
640
+ *
641
+ * Specify the hosted zone ID for the Route 53 domain.
642
+ *
643
+ * ```js
644
+ * {
645
+ * domain: {
646
+ * name: "example.com",
647
+ * dns: sst.aws.dns({
648
+ * zone: "Z2FDTNDATAQYW2"
649
+ * })
650
+ * }
651
+ * }
652
+ * ```
653
+ *
654
+ * Use a domain hosted on Cloudflare, needs the Cloudflare provider.
655
+ *
656
+ * ```js
657
+ * {
658
+ * domain: {
659
+ * name: "example.com",
660
+ * dns: sst.cloudflare.dns()
661
+ * }
662
+ * }
663
+ * ```
664
+ *
665
+ * Use a domain hosted on Vercel, needs the Vercel provider.
666
+ *
667
+ * ```js
668
+ * {
669
+ * domain: {
670
+ * name: "example.com",
671
+ * dns: sst.vercel.dns()
672
+ * }
673
+ * }
674
+ * ```
675
+ */
676
+ dns?: Input<false | (Dns & {})>;
677
+ }>;
678
+ /** @deprecated Use `rules` instead. */
679
+ ports?: Input<Prettify<ServiceRules>[]>;
680
+ /**
681
+ * Configure the mapping for the ports the load balancer listens to, forwards, or redirects to
682
+ * the service.
683
+ * This supports two types of protocols:
684
+ *
685
+ * 1. Application Layer Protocols: `http` and `https`. This'll create an [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html).
686
+ * 2. Network Layer Protocols: `tcp`, `udp`, `tcp_udp`, and `tls`. This'll create a [Network Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html).
687
+ *
688
+ * :::note
689
+ * If you want to listen on `https` or `tls`, you need to specify a custom
690
+ * `loadBalancer.domain`.
691
+ * :::
692
+ *
693
+ * You **can not configure** both application and network layer protocols for the same
694
+ * service.
695
+ *
696
+ * @example
697
+ * Here we are listening on port `80` and forwarding it to the service on port `8080`.
698
+ * ```js
699
+ * {
700
+ * rules: [
701
+ * { listen: "80/http", forward: "8080/http" }
702
+ * ]
703
+ * }
704
+ * ```
705
+ *
706
+ * The `forward` port and protocol defaults to the `listen` port and protocol. So in this
707
+ * case both are `80/http`.
708
+ *
709
+ * ```js
710
+ * {
711
+ * rules: [
712
+ * { listen: "80/http" }
713
+ * ]
714
+ * }
715
+ * ```
716
+ *
717
+ * If multiple containers are configured via the `containers` argument, you need to
718
+ * specify which container the traffic should be forwarded to.
719
+ *
720
+ * ```js
721
+ * {
722
+ * rules: [
723
+ * { listen: "80/http", container: "app" },
724
+ * { listen: "8000/http", container: "admin" }
725
+ * ]
726
+ * }
727
+ * ```
728
+ *
729
+ * You can also route the same port to multiple containers via path-based routing.
730
+ *
731
+ * ```js
732
+ * {
733
+ * rules: [
734
+ * {
735
+ * listen: "80/http",
736
+ * container: "app",
737
+ * conditions: { path: "/api/*" }
738
+ * },
739
+ * {
740
+ * listen: "80/http",
741
+ * container: "admin",
742
+ * conditions: { path: "/admin/*" }
743
+ * }
744
+ * ]
745
+ * }
746
+ * ```
747
+ *
748
+ * Additionally, you can redirect traffic from one port to another. This is
749
+ * commonly used to redirect http to https.
750
+ *
751
+ * ```js
752
+ * {
753
+ * rules: [
754
+ * { listen: "80/http", redirect: "443/https" },
755
+ * { listen: "443/https", forward: "80/http" }
756
+ * ]
757
+ * }
758
+ * ```
759
+ */
760
+ rules?: Input<Prettify<ServiceRules>[]>;
761
+ /**
762
+ * Configure the health check that the load balancer runs on your containers.
763
+ *
764
+ * :::tip
765
+ * This health check is different from the [`health`](#health) check.
766
+ * :::
767
+ *
768
+ * This health check is run by the load balancer. While, `health` is run by ECS. This
769
+ * cannot be disabled if you are using a load balancer. While the other is off by default.
770
+ *
771
+ * Since this cannot be disabled, here are some tips on how to debug an unhealthy
772
+ * health check.
773
+ *
774
+ * <details>
775
+ * <summary>How to debug a load balancer health check</summary>
776
+ *
777
+ * If you notice a `Unhealthy: Health checks failed` error, it's because the health
778
+ * check has failed. When it fails, the load balancer will terminate the containers,
779
+ * causing any requests to fail.
780
+ *
781
+ * Here's how to debug it:
782
+ *
783
+ * 1. Verify the health check path.
784
+ *
785
+ * By default, the load balancer checks the `/` path. Ensure it's accessible in your
786
+ * containers. If your application runs on a different path, then update the path in
787
+ * the health check config accordingly.
788
+ *
789
+ * 2. Confirm the containers are operational.
790
+ *
791
+ * Navigate to **ECS console** > select the **cluster** > go to the **Tasks tab** >
792
+ * choose **Any desired status** under the **Filter desired status** dropdown > select
793
+ * a task and check for errors under the **Logs tab**. If it has error that means that
794
+ * the container failed to start.
795
+ *
796
+ * 3. If the container was terminated by the load balancer while still starting up, try
797
+ * increasing the health check interval and timeout.
798
+ * </details>
799
+ *
800
+ * For `http` and `https` the default is:
801
+ *
802
+ * ```js
803
+ * {
804
+ * path: "/",
805
+ * healthyThreshold: 5,
806
+ * successCodes: "200",
807
+ * timeout: "5 seconds",
808
+ * unhealthyThreshold: 2,
809
+ * interval: "30 seconds"
810
+ * }
811
+ * ```
812
+ *
813
+ * For `tcp` and `udp` the default is:
814
+ *
815
+ * ```js
816
+ * {
817
+ * healthyThreshold: 5,
818
+ * timeout: "6 seconds",
819
+ * unhealthyThreshold: 2,
820
+ * interval: "30 seconds"
821
+ * }
822
+ * ```
823
+ *
824
+ * @example
825
+ *
826
+ * To configure the health check, we use the _port/protocol_ format. Here we are
827
+ * configuring a health check that pings the `/health` path on port `8080`
828
+ * every 10 seconds.
829
+ *
830
+ * ```js
831
+ * {
832
+ * rules: [
833
+ * { listen: "80/http", forward: "8080/http" }
834
+ * ],
835
+ * health: {
836
+ * "8080/http": {
837
+ * path: "/health",
838
+ * interval: "10 seconds"
839
+ * }
840
+ * }
841
+ * }
842
+ * ```
843
+ *
844
+ */
845
+ health?: Input<Record<Port, Input<{
846
+ /**
847
+ * The URL path to ping on the service for health checks. Only applicable to
848
+ * `http` and `https` protocols.
849
+ * @default `"/"`
850
+ */
851
+ path?: Input<string>;
852
+ /**
853
+ * The time period between each health check request. Must be between `5 seconds`
854
+ * and `300 seconds`.
855
+ * @default `"30 seconds"`
856
+ */
857
+ interval?: Input<DurationMinutes>;
858
+ /**
859
+ * The timeout for each health check request. If no response is received within this
860
+ * time, it is considered failed. Must be between `2 seconds` and `120 seconds`.
861
+ * @default `"5 seconds"`
862
+ */
863
+ timeout?: Input<DurationMinutes>;
864
+ /**
865
+ * The number of consecutive successful health check requests required to consider the
866
+ * target healthy. Must be between 2 and 10.
867
+ * @default `5`
868
+ */
869
+ healthyThreshold?: Input<number>;
870
+ /**
871
+ * The number of consecutive failed health check requests required to consider the
872
+ * target unhealthy. Must be between 2 and 10.
873
+ * @default `2`
874
+ */
875
+ unhealthyThreshold?: Input<number>;
876
+ /**
877
+ * One or more HTTP response codes the health check treats as successful. Only
878
+ * applicable to `http` and `https` protocols.
879
+ *
880
+ * @default `"200"`
881
+ * @example
882
+ * ```js
883
+ * {
884
+ * successCodes: "200-299"
885
+ * }
886
+ * ```
887
+ */
888
+ successCodes?: Input<string>;
889
+ }>>>;
890
+ }>;
891
+ /**
892
+ * Configure the CloudMap service registry for the service.
893
+ *
894
+ * This creates an `srv` record in the CloudMap service. This is needed if you want to connect
895
+ * an `ApiGatewayV2` VPC link to the service.
896
+ *
897
+ * API Gateway will forward requests to the given port on the service.
898
+ *
899
+ * @example
900
+ * ```js
901
+ * {
902
+ * serviceRegistry: {
903
+ * port: 80
904
+ * }
905
+ * }
906
+ * ```
907
+ */
908
+ serviceRegistry?: Input<{
909
+ /**
910
+ * The port in the service to forward requests to.
911
+ */
912
+ port: number;
913
+ }>;
914
+ /**
915
+ * Configure the service to automatically scale up or down based on the CPU or memory
916
+ * utilization of a container. By default, scaling is disabled and the service will run
917
+ * in a single container.
918
+ *
919
+ * @default `{ min: 1, max: 1 }`
920
+ *
921
+ * @example
922
+ * ```js
923
+ * {
924
+ * scaling: {
925
+ * min: 4,
926
+ * max: 16,
927
+ * cpuUtilization: 50,
928
+ * memoryUtilization: 50
929
+ * }
930
+ * }
931
+ * ```
932
+ */
933
+ scaling?: Input<{
934
+ /**
935
+ * The minimum number of containers to scale down to.
936
+ * @default `1`
937
+ * @example
938
+ * ```js
939
+ * {
940
+ * scaling: {
941
+ * min: 4
942
+ * }
943
+ * }
944
+ * ```
945
+ */
946
+ min?: Input<number>;
947
+ /**
948
+ * The maximum number of containers to scale up to.
949
+ * @default `1`
950
+ * @example
951
+ * ```js
952
+ * {
953
+ * scaling: {
954
+ * max: 16
955
+ * }
956
+ * }
957
+ * ```
958
+ */
959
+ max?: Input<number>;
960
+ /**
961
+ * The target CPU utilization percentage to scale up or down. It'll scale up
962
+ * when the CPU utilization is above the target and scale down when it's below the target.
963
+ * @default `70`
964
+ * @example
965
+ * ```js
966
+ * {
967
+ * scaling: {
968
+ * cpuUtilization: 50
969
+ * }
970
+ * }
971
+ * ```
972
+ */
973
+ cpuUtilization?: Input<false | number>;
974
+ /**
975
+ * The target memory utilization percentage to scale up or down. It'll scale up
976
+ * when the memory utilization is above the target and scale down when it's below the target.
977
+ * @default `70`
978
+ * @example
979
+ * ```js
980
+ * {
981
+ * scaling: {
982
+ * memoryUtilization: 50
983
+ * }
984
+ * }
985
+ * ```
986
+ */
987
+ memoryUtilization?: Input<false | number>;
988
+ /**
989
+ * The target request count to scale up or down. It'll scale up when the request count is
990
+ * above the target and scale down when it's below the target.
991
+ * @default `false`
992
+ * @example
993
+ * ```js
994
+ * {
995
+ * scaling: {
996
+ * requestCount: 1500
997
+ * }
998
+ * }
999
+ * ```
1000
+ */
1001
+ requestCount?: Input<false | number>;
1002
+ /**
1003
+ * The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start.
1004
+ * This prevents the auto scaler from removing too many tasks too quickly.
1005
+ * @example
1006
+ * ```js
1007
+ * {
1008
+ * scaling: {
1009
+ * scaleInCooldown: "60 seconds"
1010
+ * }
1011
+ * }
1012
+ * ```
1013
+ */
1014
+ scaleInCooldown?: Input<DurationMinutes>;
1015
+ /**
1016
+ * The amount of time, in seconds, after a scale-out activity completes before another scale-out activity can start.
1017
+ * This prevents the auto scaler from adding too many tasks too quickly.
1018
+ * @example
1019
+ * ```js
1020
+ * {
1021
+ * scaling: {
1022
+ * scaleOutCooldown: "60 seconds"
1023
+ * }
1024
+ * }
1025
+ * ```
1026
+ */
1027
+ scaleOutCooldown?: Input<DurationMinutes>;
1028
+ }>;
1029
+ /**
1030
+ * Configure the capacity provider; regular Fargate or Fargate Spot, for this service.
1031
+ *
1032
+ * :::tip
1033
+ * Fargate Spot is a good option for dev or PR environments.
1034
+ * :::
1035
+ *
1036
+ * Fargate Spot allows you to run containers on spare AWS capacity at around 50% discount
1037
+ * compared to regular Fargate. [Learn more about Fargate
1038
+ * pricing](https://aws.amazon.com/fargate/pricing/).
1039
+ *
1040
+ * :::note
1041
+ * AWS might shut down Fargate Spot instances to reclaim capacity.
1042
+ * :::
1043
+ *
1044
+ * There are a couple of caveats:
1045
+ *
1046
+ * 1. AWS may reclaim this capacity and **turn off your service** after a two-minute warning.
1047
+ * This is rare, but it can happen.
1048
+ * 2. If there's no spare capacity, you'll **get an error**.
1049
+ *
1050
+ * This makes Fargate Spot a good option for dev or PR environments. You can set this using.
1051
+ *
1052
+ * ```js
1053
+ * {
1054
+ * capacity: "spot"
1055
+ * }
1056
+ * ```
1057
+ *
1058
+ * You can also configure the % of regular vs spot capacity you want through the `weight` prop.
1059
+ * And optionally set the `base` or first X number of tasks that'll be started using a given
1060
+ * capacity.
1061
+ *
1062
+ * For example, the `base: 1` says that the first task uses regular Fargate, and from that
1063
+ * point on there will be an even split between the capacity providers.
1064
+ *
1065
+ * ```js
1066
+ * {
1067
+ * capacity: {
1068
+ * fargate: { weight: 1, base: 1 },
1069
+ * spot: { weight: 1 }
1070
+ * }
1071
+ * }
1072
+ * ```
1073
+ *
1074
+ * The `base` works in tandem with the `scaling` prop. So setting `base` to X doesn't mean
1075
+ * it'll start those tasks right away. It means that as your service scales up, according to
1076
+ * the `scaling` prop, it'll ensure that the first X tasks will be with the given capacity.
1077
+ *
1078
+ * :::caution
1079
+ * Changing `capacity` requires taking down and recreating the ECS service.
1080
+ * :::
1081
+ *
1082
+ * And this is why you can only set the `base` for only one capacity provider. So you
1083
+ * are not allowed to do the following.
1084
+ *
1085
+ * ```js
1086
+ * {
1087
+ * capacity: {
1088
+ * fargate: { weight: 1, base: 1 },
1089
+ * // This will give you an error
1090
+ * spot: { weight: 1, base: 1 }
1091
+ * }
1092
+ * }
1093
+ * ```
1094
+ *
1095
+ * When you change the `capacity`, the ECS service is terminated and recreated. This will
1096
+ * cause some temporary downtime.
1097
+ *
1098
+ * @default Regular Fargate
1099
+ *
1100
+ * @example
1101
+ *
1102
+ * Here are some examples settings.
1103
+ *
1104
+ * - Use only Fargate Spot.
1105
+ *
1106
+ * ```js
1107
+ * {
1108
+ * capacity: "spot"
1109
+ * }
1110
+ * ```
1111
+ * - Use 50% regular Fargate and 50% Fargate Spot.
1112
+ *
1113
+ * ```js
1114
+ * {
1115
+ * capacity: {
1116
+ * fargate: { weight: 1 },
1117
+ * spot: { weight: 1 }
1118
+ * }
1119
+ * }
1120
+ * ```
1121
+ * - Use 50% regular Fargate and 50% Fargate Spot. And ensure that the first 2 tasks use
1122
+ * regular Fargate.
1123
+ *
1124
+ * ```js
1125
+ * {
1126
+ * capacity: {
1127
+ * fargate: { weight: 1, base: 2 },
1128
+ * spot: { weight: 1 }
1129
+ * }
1130
+ * }
1131
+ * ```
1132
+ */
1133
+ capacity?: Input<"spot" | {
1134
+ /**
1135
+ * Configure how the regular Fargate capacity is allocated.
1136
+ */
1137
+ fargate?: Input<{
1138
+ /**
1139
+ * Start the first `base` number of tasks with the given capacity.
1140
+ *
1141
+ * :::caution
1142
+ * You can only specify `base` for one capacity provider.
1143
+ * :::
1144
+ */
1145
+ base?: Input<number>;
1146
+ /**
1147
+ * Ensure the given ratio of tasks are started for this capacity.
1148
+ */
1149
+ weight: Input<number>;
1150
+ }>;
1151
+ /**
1152
+ * Configure how the Fargate spot capacity is allocated.
1153
+ */
1154
+ spot?: Input<{
1155
+ /**
1156
+ * Start the first `base` number of tasks with the given capacity.
1157
+ *
1158
+ * :::caution
1159
+ * You can only specify `base` for one capacity provider.
1160
+ * :::
1161
+ */
1162
+ base?: Input<number>;
1163
+ /**
1164
+ * Ensure the given ratio of tasks are started for this capacity.
1165
+ */
1166
+ weight: Input<number>;
1167
+ }>;
1168
+ }>;
1169
+ /**
1170
+ * Configure the health check that ECS runs on your containers.
1171
+ *
1172
+ * :::tip
1173
+ * This health check is different from the [`loadBalancer.health`](#loadbalancer-health) check.
1174
+ * :::
1175
+ *
1176
+ * This health check is run by ECS. While, `loadBalancer.health` is run by the load balancer,
1177
+ * if you are using one. This is off by default. While the load balancer one
1178
+ * cannot be disabled.
1179
+ *
1180
+ * This config maps to the `HEALTHCHECK` parameter of the `docker run` command. Learn
1181
+ * more about [container health checks](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_HealthCheck.html).
1182
+ *
1183
+ * @default Health check is disabled
1184
+ * @example
1185
+ * ```js
1186
+ * {
1187
+ * health: {
1188
+ * command: ["CMD-SHELL", "curl -f http://localhost:3000/ || exit 1"],
1189
+ * startPeriod: "60 seconds",
1190
+ * timeout: "5 seconds",
1191
+ * interval: "30 seconds",
1192
+ * retries: 3
1193
+ * }
1194
+ * }
1195
+ * ```
1196
+ */
1197
+ health?: Input<{
1198
+ /**
1199
+ * A string array representing the command that the container runs to determine if it is
1200
+ * healthy.
1201
+ *
1202
+ * It must start with `CMD` to run the command arguments directly. Or `CMD-SHELL` to run
1203
+ * the command with the container's default shell.
1204
+ *
1205
+ * @example
1206
+ * ```js
1207
+ * {
1208
+ * command: ["CMD-SHELL", "curl -f http://localhost:3000/ || exit 1"]
1209
+ * }
1210
+ * ```
1211
+ */
1212
+ command: Input<string[]>;
1213
+ /**
1214
+ * The grace period to provide containers time to bootstrap before failed health checks
1215
+ * count towards the maximum number of retries. Must be between `0 seconds` and
1216
+ * `300 seconds`.
1217
+ * @default `"0 seconds"`
1218
+ */
1219
+ startPeriod?: Input<DurationMinutes>;
1220
+ /**
1221
+ * The maximum time to allow one command to run. Must be between `2 seconds` and
1222
+ * `60 seconds`.
1223
+ * @default `"5 seconds"`
1224
+ */
1225
+ timeout?: Input<DurationMinutes>;
1226
+ /**
1227
+ * The time between running the command for the health check. Must be between `5 seconds`
1228
+ * and `300 seconds`.
1229
+ * @default `"30 seconds"`
1230
+ */
1231
+ interval?: Input<DurationMinutes>;
1232
+ /**
1233
+ * The number of consecutive failures required to consider the check to have failed. Must
1234
+ * be between `1` and `10`.
1235
+ * @default `3`
1236
+ */
1237
+ retries?: Input<number>;
1238
+ }>;
1239
+ /**
1240
+ * The containers to run in the service.
1241
+ *
1242
+ * :::tip
1243
+ * You can optionally run multiple containers in a service.
1244
+ * :::
1245
+ *
1246
+ * By default this starts a single container. To add multiple containers in the service, pass
1247
+ * in an array of containers args.
1248
+ *
1249
+ * ```ts
1250
+ * {
1251
+ * containers: [
1252
+ * {
1253
+ * name: "app",
1254
+ * image: "nginxdemos/hello:plain-text"
1255
+ * },
1256
+ * {
1257
+ * name: "admin",
1258
+ * image: {
1259
+ * context: "./admin",
1260
+ * dockerfile: "Dockerfile"
1261
+ * }
1262
+ * }
1263
+ * ]
1264
+ * }
1265
+ * ```
1266
+ *
1267
+ * If you specify `containers`, you cannot list the above args at the top-level. For example,
1268
+ * you **cannot** pass in `image` at the top level.
1269
+ *
1270
+ * ```diff lang="ts"
1271
+ * {
1272
+ * - image: "nginxdemos/hello:plain-text",
1273
+ * containers: [
1274
+ * {
1275
+ * name: "app",
1276
+ * image: "nginxdemos/hello:plain-text"
1277
+ * },
1278
+ * {
1279
+ * name: "admin",
1280
+ * image: "nginxdemos/hello:plain-text"
1281
+ * }
1282
+ * ]
1283
+ * }
1284
+ * ```
1285
+ *
1286
+ * You will need to pass in `image` as a part of the `containers`.
1287
+ */
1288
+ containers?: Input<Prettify<ServiceContainerArgs>>[];
1289
+ /**
1290
+ * Configure if `sst deploy` should wait for the service to be stable.
1291
+ *
1292
+ * :::tip
1293
+ * For non-prod environments it might make sense to pass in `false`.
1294
+ * :::
1295
+ *
1296
+ * Waiting for this process to finish ensures that new content will be available after
1297
+ * the deploy finishes. However, this process can sometimes take more than 5 mins.
1298
+ * @default `false`
1299
+ * @example
1300
+ * ```js
1301
+ * {
1302
+ * wait: true
1303
+ * }
1304
+ * ```
1305
+ */
1306
+ wait?: Input<boolean>;
1307
+ /**
1308
+ * [Transform](/docs/components#transform) how this component creates its underlying
1309
+ * resources.
1310
+ */
1311
+ transform?: Prettify<FargateBaseArgs["transform"] & {
1312
+ /**
1313
+ * Transform the ECS Service resource.
1314
+ */
1315
+ service?: Transform<ecs.ServiceArgs>;
1316
+ /**
1317
+ * Transform the AWS Load Balancer resource.
1318
+ */
1319
+ loadBalancer?: Transform<lb.LoadBalancerArgs>;
1320
+ /**
1321
+ * Transform the AWS Security Group resource for the Load Balancer.
1322
+ */
1323
+ loadBalancerSecurityGroup?: Transform<ec2.SecurityGroupArgs>;
1324
+ /**
1325
+ * Transform the AWS Load Balancer listener resource.
1326
+ */
1327
+ listener?: Transform<lb.ListenerArgs>;
1328
+ /**
1329
+ * Transform the AWS Load Balancer target group resource.
1330
+ */
1331
+ target?: Transform<lb.TargetGroupArgs>;
1332
+ /**
1333
+ * Transform the AWS Application Auto Scaling target resource.
1334
+ */
1335
+ autoScalingTarget?: Transform<appautoscaling.TargetArgs>;
1336
+ }>;
1337
+ }
1338
+ /**
1339
+ * The `Service` component lets you create containers that are always running, like web or
1340
+ * application servers. It uses [Amazon ECS](https://aws.amazon.com/ecs/) on [AWS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html).
1341
+ *
1342
+ * @example
1343
+ *
1344
+ * #### Create a Service
1345
+ *
1346
+ * Services are run inside an ECS Cluster. If you haven't already, create one.
1347
+ *
1348
+ * ```ts title="sst.config.ts"
1349
+ * const vpc = new sst.aws.Vpc("MyVpc");
1350
+ * const cluster = new sst.aws.Cluster("MyCluster", { vpc });
1351
+ * ```
1352
+ *
1353
+ * Add the service to it.
1354
+ *
1355
+ * ```ts title="sst.config.ts"
1356
+ * const service = new sst.aws.Service("MyService", { cluster });
1357
+ * ```
1358
+ *
1359
+ * #### Configure the container image
1360
+ *
1361
+ * By default, the service will look for a Dockerfile in the root directory. Optionally
1362
+ * configure the image context and dockerfile.
1363
+ *
1364
+ * ```ts title="sst.config.ts"
1365
+ * new sst.aws.Service("MyService", {
1366
+ * cluster,
1367
+ * image: {
1368
+ * context: "./app",
1369
+ * dockerfile: "Dockerfile"
1370
+ * }
1371
+ * });
1372
+ * ```
1373
+ *
1374
+ * To add multiple containers in the service, pass in an array of containers args.
1375
+ *
1376
+ * ```ts title="sst.config.ts"
1377
+ * new sst.aws.Service("MyService", {
1378
+ * cluster,
1379
+ * containers: [
1380
+ * {
1381
+ * name: "app",
1382
+ * image: "nginxdemos/hello:plain-text"
1383
+ * },
1384
+ * {
1385
+ * name: "admin",
1386
+ * image: {
1387
+ * context: "./admin",
1388
+ * dockerfile: "Dockerfile"
1389
+ * }
1390
+ * }
1391
+ * ]
1392
+ * });
1393
+ * ```
1394
+ *
1395
+ * This is useful for running sidecar containers.
1396
+ *
1397
+ * #### Enable auto-scaling
1398
+ *
1399
+ * ```ts title="sst.config.ts"
1400
+ * new sst.aws.Service("MyService", {
1401
+ * cluster,
1402
+ * scaling: {
1403
+ * min: 4,
1404
+ * max: 16,
1405
+ * cpuUtilization: 50,
1406
+ * memoryUtilization: 50
1407
+ * }
1408
+ * });
1409
+ * ```
1410
+ *
1411
+ * #### Expose through API Gateway
1412
+ *
1413
+ * You can give your service a public URL by exposing it through API Gateway HTTP API. You can
1414
+ * also optionally give it a custom domain.
1415
+ *
1416
+ * ```ts title="sst.config.ts"
1417
+ * const service = new sst.aws.Service("MyService", {
1418
+ * cluster,
1419
+ * serviceRegistry: {
1420
+ * port: 80
1421
+ * }
1422
+ * });
1423
+ *
1424
+ * const api = new sst.aws.ApiGatewayV2("MyApi", {
1425
+ * vpc,
1426
+ * domain: "example.com"
1427
+ * });
1428
+ * api.routePrivate("$default", service.nodes.cloudmapService.arn);
1429
+ * ```
1430
+ *
1431
+ * #### Add a load balancer
1432
+ *
1433
+ * You can also expose your service by adding a load balancer to it and optionally
1434
+ * adding a custom domain.
1435
+ *
1436
+ * ```ts title="sst.config.ts"
1437
+ * new sst.aws.Service("MyService", {
1438
+ * cluster,
1439
+ * loadBalancer: {
1440
+ * domain: "example.com",
1441
+ * rules: [
1442
+ * { listen: "80/http" },
1443
+ * { listen: "443/https", forward: "80/http" }
1444
+ * ]
1445
+ * }
1446
+ * });
1447
+ * ```
1448
+ *
1449
+ * #### Link resources
1450
+ *
1451
+ * [Link resources](/docs/linking/) to your service. This will grant permissions
1452
+ * to the resources and allow you to access it in your app.
1453
+ *
1454
+ * ```ts {5} title="sst.config.ts"
1455
+ * const bucket = new sst.aws.Bucket("MyBucket");
1456
+ *
1457
+ * new sst.aws.Service("MyService", {
1458
+ * cluster,
1459
+ * link: [bucket]
1460
+ * });
1461
+ * ```
1462
+ *
1463
+ * You can use the [SDK](/docs/reference/sdk/) to access the linked resources in your service.
1464
+ *
1465
+ * ```ts title="app.ts"
1466
+ * import { Resource } from "sst";
1467
+ *
1468
+ * console.log(Resource.MyBucket.name);
1469
+ * ```
1470
+ *
1471
+ * #### Service discovery
1472
+ *
1473
+ * This component automatically creates a Cloud Map service host name for the
1474
+ * service. So anything in the same VPC can access it using the service's host name.
1475
+ *
1476
+ * For example, if you link the service to a Lambda function that's in the same VPC.
1477
+ *
1478
+ * ```ts title="sst.config.ts" {2,4}
1479
+ * new sst.aws.Function("MyFunction", {
1480
+ * vpc,
1481
+ * url: true,
1482
+ * link: [service],
1483
+ * handler: "lambda.handler"
1484
+ * });
1485
+ * ```
1486
+ *
1487
+ * You can access the service by its host name using the [SDK](/docs/reference/sdk/).
1488
+ *
1489
+ * ```ts title="lambda.ts"
1490
+ * import { Resource } from "sst";
1491
+ *
1492
+ * await fetch(`http://${Resource.MyService.service}`);
1493
+ * ```
1494
+ *
1495
+ * [Check out an example](/docs/examples/#aws-cluster-service-discovery).
1496
+ *
1497
+ * ---
1498
+ *
1499
+ * ### Cost
1500
+ *
1501
+ * By default, this uses a _Linux/X86_ _Fargate_ container with 0.25 vCPUs at $0.04048 per
1502
+ * vCPU per hour and 0.5 GB of memory at $0.004445 per GB per hour. It includes 20GB of
1503
+ * _Ephemeral Storage_ for free with additional storage at $0.000111 per GB per hour. Each
1504
+ * container also gets a public IPv4 address at $0.005 per hour.
1505
+ *
1506
+ * It works out to $0.04048 x 0.25 x 24 x 30 + $0.004445 x 0.5 x 24 x 30 + $0.005
1507
+ * x 24 x 30 or **$12 per month**.
1508
+ *
1509
+ * If you are using all Fargate Spot instances with `capacity: "spot"`, it's $0.01218784 x 0.25
1510
+ * x 24 x 30 + $0.00133831 x 0.5 x 24 x 30 + $0.005 x 24 x 30 or **$6 per month**
1511
+ *
1512
+ * Adjust this for the `cpu`, `memory` and `storage` you are using. And
1513
+ * check the prices for _Linux/ARM_ if you are using `arm64` as your `architecture`.
1514
+ *
1515
+ * The above are rough estimates for _us-east-1_, check out the
1516
+ * [Fargate pricing](https://aws.amazon.com/fargate/pricing/) and the
1517
+ * [Public IPv4 Address pricing](https://aws.amazon.com/vpc/pricing/) for more details.
1518
+ *
1519
+ * #### Scaling
1520
+ *
1521
+ * By default, `scaling` is disabled. If enabled, adjust the above for the number of containers.
1522
+ *
1523
+ * #### API Gateway
1524
+ *
1525
+ * If you expose your service through API Gateway, you'll need to add the cost of
1526
+ * [API Gateway HTTP API](https://aws.amazon.com/api-gateway/pricing/#HTTP_APIs) as well.
1527
+ * For services that don't get a lot of traffic, this ends up being a lot cheaper since API
1528
+ * Gateway is pay per request.
1529
+ *
1530
+ * Learn more about using
1531
+ * [Cluster with API Gateway](/docs/examples/#aws-cluster-with-api-gateway).
1532
+ *
1533
+ * #### Application Load Balancer
1534
+ *
1535
+ * If you add `loadBalancer` _HTTP_ or _HTTPS_ `rules`, an ALB is created at $0.0225 per hour,
1536
+ * $0.008 per LCU-hour, and $0.005 per hour if HTTPS with a custom domain is used. Where LCU
1537
+ * is a measure of how much traffic is processed.
1538
+ *
1539
+ * That works out to $0.0225 x 24 x 30 or **$16 per month**. Add $0.005 x 24 x 30 or **$4 per
1540
+ * month** for HTTPS. Also add the LCU-hour used.
1541
+ *
1542
+ * The above are rough estimates for _us-east-1_, check out the
1543
+ * [Application Load Balancer pricing](https://aws.amazon.com/elasticloadbalancing/pricing/)
1544
+ * for more details.
1545
+ *
1546
+ * #### Network Load Balancer
1547
+ *
1548
+ * If you add `loadBalancer` _TCP_, _UDP_, or _TLS_ `rules`, an NLB is created at $0.0225 per hour and
1549
+ * $0.006 per NLCU-hour. Where NCLU is a measure of how much traffic is processed.
1550
+ *
1551
+ * That works out to $0.0225 x 24 x 30 or **$16 per month**. Also add the NLCU-hour used.
1552
+ *
1553
+ * The above are rough estimates for _us-east-1_, check out the
1554
+ * [Network Load Balancer pricing](https://aws.amazon.com/elasticloadbalancing/pricing/)
1555
+ * for more details.
1556
+ */
1557
+ export declare class Service extends Component implements Link.Linkable {
1558
+ private readonly _name;
1559
+ private readonly _service?;
1560
+ private readonly cloudmapNamespace?;
1561
+ private readonly cloudmapService?;
1562
+ private readonly executionRole?;
1563
+ private readonly taskRole;
1564
+ private readonly taskDefinition?;
1565
+ private readonly loadBalancer?;
1566
+ private readonly autoScalingTarget?;
1567
+ private readonly domain?;
1568
+ private readonly _url?;
1569
+ private readonly devUrl?;
1570
+ private readonly dev;
1571
+ constructor(name: string, args: ServiceArgs, opts?: ComponentResourceOptions);
1572
+ /**
1573
+ * The URL of the service.
1574
+ *
1575
+ * If `public.domain` is set, this is the URL with the custom domain.
1576
+ * Otherwise, it's the auto-generated load balancer URL.
1577
+ */
1578
+ get url(): Output<string>;
1579
+ /**
1580
+ * The name of the Cloud Map service. This is useful for service discovery.
1581
+ */
1582
+ get service(): Output<string>;
1583
+ /**
1584
+ * The underlying [resources](/docs/components/#nodes) this component creates.
1585
+ */
1586
+ get nodes(): {
1587
+ /**
1588
+ * The Amazon ECS Service.
1589
+ */
1590
+ readonly service: Output<import("@pulumi/aws/ecs/service.js").Service>;
1591
+ /**
1592
+ * The Amazon ECS Execution Role.
1593
+ */
1594
+ executionRole: import("@pulumi/aws/iam/role.js").Role | undefined;
1595
+ /**
1596
+ * The Amazon ECS Task Role.
1597
+ */
1598
+ taskRole: import("@pulumi/aws/iam/role.js").Role;
1599
+ /**
1600
+ * The Amazon ECS Task Definition.
1601
+ */
1602
+ readonly taskDefinition: Output<import("@pulumi/aws/ecs/taskDefinition.js").TaskDefinition>;
1603
+ /**
1604
+ * The Amazon Elastic Load Balancer.
1605
+ */
1606
+ readonly loadBalancer: import("@pulumi/aws/lb/loadBalancer.js").LoadBalancer;
1607
+ /**
1608
+ * The Amazon Application Auto Scaling target.
1609
+ */
1610
+ readonly autoScalingTarget: import("@pulumi/aws/appautoscaling/target.js").Target;
1611
+ /**
1612
+ * The Amazon Cloud Map service.
1613
+ */
1614
+ readonly cloudmapService: Output<import("@pulumi/aws/servicediscovery/service.js").Service>;
1615
+ };
1616
+ /** @internal */
1617
+ getSSTLink(): {
1618
+ properties: {
1619
+ url: Output<string> | undefined;
1620
+ service: Output<Output<string> | undefined>;
1621
+ };
1622
+ };
1623
+ }
1624
+ export {};
1625
+ //# sourceMappingURL=service.d.ts.map