@sst-community/sst 4.21.1 → 5.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -52
- package/package.json +35 -11
- package/platform/js/chunks/chunk-HIZZCEDS.js +328 -0
- package/platform/js/chunks/chunk-HIZZCEDS.js.map +6 -0
- package/platform/js/chunks/chunk-KOKHGKJ2.js +639 -0
- package/platform/js/chunks/chunk-KOKHGKJ2.js.map +6 -0
- package/platform/js/chunks/chunk-MR4XM5XA.js +473 -0
- package/platform/js/chunks/chunk-MR4XM5XA.js.map +6 -0
- package/platform/js/chunks/chunk-ONNI4XNK.js +367 -0
- package/platform/js/chunks/chunk-ONNI4XNK.js.map +6 -0
- package/platform/js/chunks/chunk-VIFHC73J.js +108 -0
- package/platform/js/chunks/chunk-VIFHC73J.js.map +6 -0
- package/platform/js/chunks/chunk-WJ6BVA46.js +10 -0
- package/platform/js/chunks/chunk-WJ6BVA46.js.map +6 -0
- package/platform/js/chunks/component-32FCLIRK.js +26 -0
- package/platform/js/chunks/component-32FCLIRK.js.map +6 -0
- package/platform/js/chunks/config-CRGKEDQW.js +10 -0
- package/platform/js/chunks/config-CRGKEDQW.js.map +6 -0
- package/platform/js/chunks/link-OJ3RNGQ3.js +9 -0
- package/platform/js/chunks/link-OJ3RNGQ3.js.map +6 -0
- package/platform/js/components/aws/index.js +35399 -0
- package/platform/js/components/aws/index.js.map +6 -0
- package/platform/js/components/cloudflare/index.js +3246 -0
- package/platform/js/components/cloudflare/index.js.map +6 -0
- package/platform/js/components/core.js +114 -0
- package/platform/js/components/core.js.map +6 -0
- package/platform/js/components/vercel/index.js +120 -0
- package/platform/js/components/vercel/index.js.map +6 -0
- package/platform/js/testing/index.js +569 -0
- package/platform/js/testing/index.js.map +6 -0
- package/platform/package.json +25 -0
- package/platform/src/ast/add.mjs +190 -0
- package/platform/src/auto/run.ts +109 -0
- package/platform/src/components/README.md +652 -0
- package/platform/src/components/args.ts +133 -0
- package/platform/src/components/aws/alb.ts +577 -0
- package/platform/src/components/aws/analog.ts +462 -0
- package/platform/src/components/aws/apigateway-websocket-route.ts +206 -0
- package/platform/src/components/aws/apigateway-websocket.ts +894 -0
- package/platform/src/components/aws/apigatewayv1-api-key.ts +90 -0
- package/platform/src/components/aws/apigatewayv1-authorizer.ts +178 -0
- package/platform/src/components/aws/apigatewayv1-base-route.ts +78 -0
- package/platform/src/components/aws/apigatewayv1-integration-route.ts +92 -0
- package/platform/src/components/aws/apigatewayv1-lambda-route.ts +152 -0
- package/platform/src/components/aws/apigatewayv1-usage-plan.ts +109 -0
- package/platform/src/components/aws/apigatewayv1.ts +1691 -0
- package/platform/src/components/aws/apigatewayv2-authorizer.ts +199 -0
- package/platform/src/components/aws/apigatewayv2-base-route.ts +69 -0
- package/platform/src/components/aws/apigatewayv2-lambda-route.ts +141 -0
- package/platform/src/components/aws/apigatewayv2-private-route.ts +101 -0
- package/platform/src/components/aws/apigatewayv2-url-route.ts +90 -0
- package/platform/src/components/aws/apigatewayv2.ts +1439 -0
- package/platform/src/components/aws/app-sync-data-source.ts +264 -0
- package/platform/src/components/aws/app-sync-function.ts +79 -0
- package/platform/src/components/aws/app-sync-resolver.ts +110 -0
- package/platform/src/components/aws/app-sync.ts +849 -0
- package/platform/src/components/aws/astro.ts +580 -0
- package/platform/src/components/aws/aurora.ts +1356 -0
- package/platform/src/components/aws/auth-v1.ts +69 -0
- package/platform/src/components/aws/auth.ts +417 -0
- package/platform/src/components/aws/bucket-lambda-subscriber.ts +162 -0
- package/platform/src/components/aws/bucket-notification.ts +254 -0
- package/platform/src/components/aws/bucket-queue-subscriber.ts +122 -0
- package/platform/src/components/aws/bucket-topic-subscriber.ts +144 -0
- package/platform/src/components/aws/bucket.ts +2046 -0
- package/platform/src/components/aws/bus-base-subscriber.ts +52 -0
- package/platform/src/components/aws/bus-lambda-subscriber.ts +125 -0
- package/platform/src/components/aws/bus-queue-subscriber.ts +88 -0
- package/platform/src/components/aws/bus.ts +630 -0
- package/platform/src/components/aws/cdn.ts +561 -0
- package/platform/src/components/aws/cluster-v1.ts +932 -0
- package/platform/src/components/aws/cluster.ts +584 -0
- package/platform/src/components/aws/cognito-identity-pool.ts +433 -0
- package/platform/src/components/aws/cognito-identity-provider.ts +96 -0
- package/platform/src/components/aws/cognito-user-pool-client.ts +114 -0
- package/platform/src/components/aws/cognito-user-pool.ts +1089 -0
- package/platform/src/components/aws/cron-v2.ts +555 -0
- package/platform/src/components/aws/cron.ts +435 -0
- package/platform/src/components/aws/dns-validated-certificate.ts +108 -0
- package/platform/src/components/aws/dns.ts +221 -0
- package/platform/src/components/aws/dsql.ts +741 -0
- package/platform/src/components/aws/dynamo-lambda-subscriber.ts +124 -0
- package/platform/src/components/aws/dynamo.ts +929 -0
- package/platform/src/components/aws/efs.ts +410 -0
- package/platform/src/components/aws/email.ts +673 -0
- package/platform/src/components/aws/fargate.ts +1279 -0
- package/platform/src/components/aws/function.ts +3280 -0
- package/platform/src/components/aws/helpers/apigateway-account.ts +78 -0
- package/platform/src/components/aws/helpers/apigatewayv2-domain.ts +144 -0
- package/platform/src/components/aws/helpers/arn.ts +182 -0
- package/platform/src/components/aws/helpers/bootstrap.ts +16 -0
- package/platform/src/components/aws/helpers/client.ts +76 -0
- package/platform/src/components/aws/helpers/container-builder.ts +33 -0
- package/platform/src/components/aws/helpers/custom-domain.ts +128 -0
- package/platform/src/components/aws/helpers/event-source.ts +41 -0
- package/platform/src/components/aws/helpers/fargate.ts +727 -0
- package/platform/src/components/aws/helpers/function-builder.ts +133 -0
- package/platform/src/components/aws/helpers/function-code.ts +224 -0
- package/platform/src/components/aws/helpers/function-part.ts +212 -0
- package/platform/src/components/aws/helpers/function-permission.ts +29 -0
- package/platform/src/components/aws/helpers/load-balancer-args.ts +88 -0
- package/platform/src/components/aws/helpers/load-balancer.ts +17 -0
- package/platform/src/components/aws/helpers/provider.ts +36 -0
- package/platform/src/components/aws/helpers/queue-policy.ts +33 -0
- package/platform/src/components/aws/helpers/rds.ts +212 -0
- package/platform/src/components/aws/helpers/site-builder.ts +41 -0
- package/platform/src/components/aws/helpers/subscriber.ts +23 -0
- package/platform/src/components/aws/helpers/vpc.ts +27 -0
- package/platform/src/components/aws/https-redirect.ts +216 -0
- package/platform/src/components/aws/iam-edit.ts +50 -0
- package/platform/src/components/aws/index.ts +61 -0
- package/platform/src/components/aws/kinesis-stream-lambda-subscriber.ts +122 -0
- package/platform/src/components/aws/kinesis-stream.ts +416 -0
- package/platform/src/components/aws/linkable.ts +32 -0
- package/platform/src/components/aws/logging.ts +25 -0
- package/platform/src/components/aws/microvm.ts +988 -0
- package/platform/src/components/aws/mysql.ts +1050 -0
- package/platform/src/components/aws/nextjs.ts +1052 -0
- package/platform/src/components/aws/nuxt.ts +527 -0
- package/platform/src/components/aws/open-search.ts +603 -0
- package/platform/src/components/aws/opencontrol.ts +235 -0
- package/platform/src/components/aws/permission.ts +80 -0
- package/platform/src/components/aws/postgres-v1.ts +537 -0
- package/platform/src/components/aws/postgres.ts +1074 -0
- package/platform/src/components/aws/providers/bucket-files.ts +32 -0
- package/platform/src/components/aws/providers/distribution-deployment-waiter.ts +27 -0
- package/platform/src/components/aws/providers/distribution-invalidation.ts +24 -0
- package/platform/src/components/aws/providers/function-environment-update.ts +46 -0
- package/platform/src/components/aws/providers/hosted-zone-lookup.ts +25 -0
- package/platform/src/components/aws/providers/kv-keys.ts +15 -0
- package/platform/src/components/aws/providers/kv-routes-update.ts +24 -0
- package/platform/src/components/aws/providers/microvm-image-prune.ts +48 -0
- package/platform/src/components/aws/providers/origin-access-control.ts +21 -0
- package/platform/src/components/aws/providers/rds-role-lookup.ts +21 -0
- package/platform/src/components/aws/providers/vector-table.ts +25 -0
- package/platform/src/components/aws/queue-lambda-subscriber.ts +135 -0
- package/platform/src/components/aws/queue.ts +712 -0
- package/platform/src/components/aws/react.ts +510 -0
- package/platform/src/components/aws/realtime-lambda-subscriber.ts +129 -0
- package/platform/src/components/aws/realtime.ts +345 -0
- package/platform/src/components/aws/redis-v1.ts +595 -0
- package/platform/src/components/aws/redis.ts +1078 -0
- package/platform/src/components/aws/remix.ts +576 -0
- package/platform/src/components/aws/router-base-route.ts +83 -0
- package/platform/src/components/aws/router-bucket-route.ts +63 -0
- package/platform/src/components/aws/router-url-route.ts +75 -0
- package/platform/src/components/aws/router.ts +3294 -0
- package/platform/src/components/aws/service-v1.ts +876 -0
- package/platform/src/components/aws/service.ts +2994 -0
- package/platform/src/components/aws/sns-topic-lambda-subscriber.ts +127 -0
- package/platform/src/components/aws/sns-topic-queue-subscriber.ts +105 -0
- package/platform/src/components/aws/sns-topic.ts +700 -0
- package/platform/src/components/aws/solid-start.ts +467 -0
- package/platform/src/components/aws/ssr-site.ts +2204 -0
- package/platform/src/components/aws/static-site.ts +1389 -0
- package/platform/src/components/aws/step-functions/choice.ts +123 -0
- package/platform/src/components/aws/step-functions/fail.ts +69 -0
- package/platform/src/components/aws/step-functions/map.ts +264 -0
- package/platform/src/components/aws/step-functions/parallel.ts +170 -0
- package/platform/src/components/aws/step-functions/pass.ts +48 -0
- package/platform/src/components/aws/step-functions/state.ts +376 -0
- package/platform/src/components/aws/step-functions/succeed.ts +31 -0
- package/platform/src/components/aws/step-functions/task.ts +538 -0
- package/platform/src/components/aws/step-functions/wait.ts +105 -0
- package/platform/src/components/aws/step-functions.ts +804 -0
- package/platform/src/components/aws/svelte-kit.ts +563 -0
- package/platform/src/components/aws/takeover/alb.ts +9 -0
- package/platform/src/components/aws/takeover/apigatewayv2.ts +43 -0
- package/platform/src/components/aws/takeover/app-sync.ts +45 -0
- package/platform/src/components/aws/takeover/aurora.ts +19 -0
- package/platform/src/components/aws/takeover/bucket.ts +94 -0
- package/platform/src/components/aws/takeover/bus.ts +43 -0
- package/platform/src/components/aws/takeover/cognito-user-pool.ts +21 -0
- package/platform/src/components/aws/takeover/cron-v2.ts +9 -0
- package/platform/src/components/aws/takeover/dsql.ts +12 -0
- package/platform/src/components/aws/takeover/dynamo.ts +31 -0
- package/platform/src/components/aws/takeover/efs.ts +9 -0
- package/platform/src/components/aws/takeover/function.ts +21 -0
- package/platform/src/components/aws/takeover/helpers.ts +26 -0
- package/platform/src/components/aws/takeover/index.ts +27 -0
- package/platform/src/components/aws/takeover/mysql.ts +17 -0
- package/platform/src/components/aws/takeover/postgres.ts +17 -0
- package/platform/src/components/aws/takeover/queue.ts +21 -0
- package/platform/src/components/aws/takeover/redis.ts +10 -0
- package/platform/src/components/aws/takeover/service.ts +22 -0
- package/platform/src/components/aws/takeover/sns-topic.ts +27 -0
- package/platform/src/components/aws/takeover/task.ts +13 -0
- package/platform/src/components/aws/tan-stack-start.ts +479 -0
- package/platform/src/components/aws/task.ts +571 -0
- package/platform/src/components/aws/v5/alb.ts +310 -0
- package/platform/src/components/aws/v5/apigatewayv2.ts +845 -0
- package/platform/src/components/aws/v5/app-sync.ts +673 -0
- package/platform/src/components/aws/v5/aurora.ts +855 -0
- package/platform/src/components/aws/v5/bucket.ts +1001 -0
- package/platform/src/components/aws/v5/bus.ts +321 -0
- package/platform/src/components/aws/v5/cluster.ts +230 -0
- package/platform/src/components/aws/v5/cognito-user-pool-client.ts +100 -0
- package/platform/src/components/aws/v5/cognito-user-pool.ts +693 -0
- package/platform/src/components/aws/v5/cron-v2.ts +316 -0
- package/platform/src/components/aws/v5/dsql.ts +665 -0
- package/platform/src/components/aws/v5/dynamo.ts +477 -0
- package/platform/src/components/aws/v5/efs.ts +311 -0
- package/platform/src/components/aws/v5/function.ts +1546 -0
- package/platform/src/components/aws/v5/index.ts +26 -0
- package/platform/src/components/aws/v5/mysql.ts +604 -0
- package/platform/src/components/aws/v5/postgres.ts +612 -0
- package/platform/src/components/aws/v5/queue.ts +271 -0
- package/platform/src/components/aws/v5/redis.ts +550 -0
- package/platform/src/components/aws/v5/service.ts +2209 -0
- package/platform/src/components/aws/v5/sns-topic.ts +284 -0
- package/platform/src/components/aws/v5/task.ts +549 -0
- package/platform/src/components/aws/vector.ts +316 -0
- package/platform/src/components/aws/vpc-v1.ts +580 -0
- package/platform/src/components/aws/vpc.ts +1641 -0
- package/platform/src/components/aws/workflow.ts +421 -0
- package/platform/src/components/base/base-site.ts +101 -0
- package/platform/src/components/base/base-ssr-site.ts +120 -0
- package/platform/src/components/base/base-static-site.ts +314 -0
- package/platform/src/components/cloudflare/account-id.ts +1 -0
- package/platform/src/components/cloudflare/ai.ts +77 -0
- package/platform/src/components/cloudflare/astro.ts +355 -0
- package/platform/src/components/cloudflare/auth.ts +69 -0
- package/platform/src/components/cloudflare/binding.ts +132 -0
- package/platform/src/components/cloudflare/bucket.ts +142 -0
- package/platform/src/components/cloudflare/cron.ts +207 -0
- package/platform/src/components/cloudflare/d1.ts +230 -0
- package/platform/src/components/cloudflare/dns.ts +253 -0
- package/platform/src/components/cloudflare/durable-object.ts +144 -0
- package/platform/src/components/cloudflare/experimental/index.ts +3 -0
- package/platform/src/components/cloudflare/experimental/solid-start.ts +288 -0
- package/platform/src/components/cloudflare/experimental/static-site.ts +4 -0
- package/platform/src/components/cloudflare/helpers/compatibility.ts +44 -0
- package/platform/src/components/cloudflare/helpers/fetch.ts +81 -0
- package/platform/src/components/cloudflare/helpers/validation.ts +74 -0
- package/platform/src/components/cloudflare/helpers/worker-builder.ts +57 -0
- package/platform/src/components/cloudflare/helpers/wrangler.ts +222 -0
- package/platform/src/components/cloudflare/hyperdrive.ts +402 -0
- package/platform/src/components/cloudflare/index.ts +25 -0
- package/platform/src/components/cloudflare/kv.ts +218 -0
- package/platform/src/components/cloudflare/providers/dns-record.ts +43 -0
- package/platform/src/components/cloudflare/providers/kv-data.ts +107 -0
- package/platform/src/components/cloudflare/providers/worker-assets.ts +41 -0
- package/platform/src/components/cloudflare/providers/worker-placement.ts +93 -0
- package/platform/src/components/cloudflare/providers/worker-script.ts +47 -0
- package/platform/src/components/cloudflare/providers/worker-url.ts +109 -0
- package/platform/src/components/cloudflare/providers/zone-lookup.ts +85 -0
- package/platform/src/components/cloudflare/queue-worker-subscriber.ts +192 -0
- package/platform/src/components/cloudflare/queue.ts +310 -0
- package/platform/src/components/cloudflare/rate-limit.ts +178 -0
- package/platform/src/components/cloudflare/react-router.ts +322 -0
- package/platform/src/components/cloudflare/ssr-site.ts +293 -0
- package/platform/src/components/cloudflare/static-site-v2.ts +428 -0
- package/platform/src/components/cloudflare/static-site.ts +470 -0
- package/platform/src/components/cloudflare/tan-stack-start.ts +408 -0
- package/platform/src/components/cloudflare/worker.ts +1080 -0
- package/platform/src/components/cloudflare/workflow.ts +319 -0
- package/platform/src/components/component.ts +242 -0
- package/platform/src/components/core.ts +43 -0
- package/platform/src/components/cpu.ts +10 -0
- package/platform/src/components/dns.ts +82 -0
- package/platform/src/components/duration.ts +67 -0
- package/platform/src/components/error.ts +5 -0
- package/platform/src/components/esbuild.ts +15 -0
- package/platform/src/components/experimental/dev-command.ts +127 -0
- package/platform/src/components/experimental/index.ts +1 -0
- package/platform/src/components/groups.ts +9 -0
- package/platform/src/components/index.ts +9 -0
- package/platform/src/components/input.ts +2 -0
- package/platform/src/components/link.ts +201 -0
- package/platform/src/components/linkable.ts +360 -0
- package/platform/src/components/naming-rules.ts +299 -0
- package/platform/src/components/naming.ts +189 -0
- package/platform/src/components/parts-component.ts +662 -0
- package/platform/src/components/parts.ts +299 -0
- package/platform/src/components/path.ts +5 -0
- package/platform/src/components/rpc/rpc.ts +110 -0
- package/platform/src/components/secret.ts +159 -0
- package/platform/src/components/size.ts +28 -0
- package/platform/src/components/takeover.ts +131 -0
- package/platform/src/components/transform.ts +107 -0
- package/platform/src/components/vercel/account-id.ts +1 -0
- package/platform/src/components/vercel/dns.ts +171 -0
- package/platform/src/components/vercel/index.ts +2 -0
- package/platform/src/components/vercel/providers/dns-record.ts +34 -0
- package/platform/src/config.ts +1463 -0
- package/platform/src/global-aliases.d.ts +37 -0
- package/platform/src/global.d.ts +374 -0
- package/platform/src/internal.d.ts +18 -0
- package/platform/src/runtime/worker/unenv.d.ts +14 -0
- package/platform/src/runtime/worker/unenv.mjs +26 -0
- package/platform/src/shim/run.js +25 -0
- package/platform/src/testing/global.ts +83 -0
- package/platform/src/testing/index.ts +103 -0
- package/platform/src/testing/mock.ts +646 -0
- package/platform/src/testing/vitest.ts +36 -0
- package/platform/src/util/compare-semver.ts +23 -0
- package/platform/src/util/fs.ts +49 -0
- package/platform/src/util/lazy.ts +12 -0
- package/platform/src/util/minify.ts +10 -0
- package/platform/src/util/package.ts +29 -0
- package/platform/src/util/semaphore.ts +29 -0
- package/platform/src/util/warn.ts +7 -0
- package/platform/types/auto/run.d.ts +9 -0
- package/platform/types/auto/run.d.ts.map +1 -0
- package/platform/types/components/args.d.ts +77 -0
- package/platform/types/components/args.d.ts.map +1 -0
- package/platform/types/components/aws/alb.d.ts +283 -0
- package/platform/types/components/aws/alb.d.ts.map +1 -0
- package/platform/types/components/aws/analog.d.ts +408 -0
- package/platform/types/components/aws/analog.d.ts.map +1 -0
- package/platform/types/components/aws/apigateway-websocket-route.d.ts +74 -0
- package/platform/types/components/aws/apigateway-websocket-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigateway-websocket.d.ts +560 -0
- package/platform/types/components/aws/apigateway-websocket.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-api-key.d.ts +48 -0
- package/platform/types/components/aws/apigatewayv1-api-key.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-authorizer.d.ts +55 -0
- package/platform/types/components/aws/apigatewayv1-authorizer.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-base-route.d.ts +36 -0
- package/platform/types/components/aws/apigatewayv1-base-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-integration-route.d.ts +39 -0
- package/platform/types/components/aws/apigatewayv1-integration-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-lambda-route.d.ts +53 -0
- package/platform/types/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-usage-plan.d.ts +53 -0
- package/platform/types/components/aws/apigatewayv1-usage-plan.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1.d.ts +1028 -0
- package/platform/types/components/aws/apigatewayv1.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-authorizer.d.ts +54 -0
- package/platform/types/components/aws/apigatewayv2-authorizer.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-base-route.d.ts +28 -0
- package/platform/types/components/aws/apigatewayv2-base-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-lambda-route.d.ts +59 -0
- package/platform/types/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-private-route.d.ts +54 -0
- package/platform/types/components/aws/apigatewayv2-private-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-url-route.d.ts +44 -0
- package/platform/types/components/aws/apigatewayv2-url-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2.d.ts +955 -0
- package/platform/types/components/aws/apigatewayv2.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync-data-source.d.ts +52 -0
- package/platform/types/components/aws/app-sync-data-source.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync-function.d.ts +33 -0
- package/platform/types/components/aws/app-sync-function.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync-resolver.d.ts +41 -0
- package/platform/types/components/aws/app-sync-resolver.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync.d.ts +638 -0
- package/platform/types/components/aws/app-sync.d.ts.map +1 -0
- package/platform/types/components/aws/astro.d.ts +409 -0
- package/platform/types/components/aws/astro.d.ts.map +1 -0
- package/platform/types/components/aws/aurora.d.ts +720 -0
- package/platform/types/components/aws/aurora.d.ts.map +1 -0
- package/platform/types/components/aws/auth-v1.d.ts +26 -0
- package/platform/types/components/aws/auth-v1.d.ts.map +1 -0
- package/platform/types/components/aws/auth.d.ts +295 -0
- package/platform/types/components/aws/auth.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-lambda-subscriber.d.ts +61 -0
- package/platform/types/components/aws/bucket-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-notification.d.ts +47 -0
- package/platform/types/components/aws/bucket-notification.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-queue-subscriber.d.ts +55 -0
- package/platform/types/components/aws/bucket-queue-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-topic-subscriber.d.ts +55 -0
- package/platform/types/components/aws/bucket-topic-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bucket.d.ts +1356 -0
- package/platform/types/components/aws/bucket.d.ts.map +1 -0
- package/platform/types/components/aws/bus-base-subscriber.d.ts +20 -0
- package/platform/types/components/aws/bus-base-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bus-lambda-subscriber.d.ts +50 -0
- package/platform/types/components/aws/bus-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bus-queue-subscriber.d.ts +44 -0
- package/platform/types/components/aws/bus-queue-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bus.d.ts +447 -0
- package/platform/types/components/aws/bus.d.ts.map +1 -0
- package/platform/types/components/aws/cdn.d.ts +310 -0
- package/platform/types/components/aws/cdn.d.ts.map +1 -0
- package/platform/types/components/aws/cluster-v1.d.ts +885 -0
- package/platform/types/components/aws/cluster-v1.d.ts.map +1 -0
- package/platform/types/components/aws/cluster.d.ts +364 -0
- package/platform/types/components/aws/cluster.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-identity-pool.d.ts +199 -0
- package/platform/types/components/aws/cognito-identity-pool.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-identity-provider.d.ts +38 -0
- package/platform/types/components/aws/cognito-identity-provider.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-user-pool-client.d.ts +50 -0
- package/platform/types/components/aws/cognito-user-pool-client.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-user-pool.d.ts +703 -0
- package/platform/types/components/aws/cognito-user-pool.d.ts.map +1 -0
- package/platform/types/components/aws/cron-v2.d.ts +325 -0
- package/platform/types/components/aws/cron-v2.d.ts.map +1 -0
- package/platform/types/components/aws/cron.d.ts +259 -0
- package/platform/types/components/aws/cron.d.ts.map +1 -0
- package/platform/types/components/aws/dns-validated-certificate.d.ts +27 -0
- package/platform/types/components/aws/dns-validated-certificate.d.ts.map +1 -0
- package/platform/types/components/aws/dns.d.ts +94 -0
- package/platform/types/components/aws/dns.d.ts.map +1 -0
- package/platform/types/components/aws/dsql.d.ts +369 -0
- package/platform/types/components/aws/dsql.d.ts.map +1 -0
- package/platform/types/components/aws/dynamo-lambda-subscriber.d.ts +55 -0
- package/platform/types/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/dynamo.d.ts +628 -0
- package/platform/types/components/aws/dynamo.d.ts.map +1 -0
- package/platform/types/components/aws/efs.d.ts +217 -0
- package/platform/types/components/aws/efs.d.ts.map +1 -0
- package/platform/types/components/aws/email.d.ts +370 -0
- package/platform/types/components/aws/email.d.ts.map +1 -0
- package/platform/types/components/aws/fargate.d.ts +894 -0
- package/platform/types/components/aws/fargate.d.ts.map +1 -0
- package/platform/types/components/aws/function.d.ts +1780 -0
- package/platform/types/components/aws/function.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/apigateway-account.d.ts +3 -0
- package/platform/types/components/aws/helpers/apigateway-account.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/apigatewayv2-domain.d.ts +144 -0
- package/platform/types/components/aws/helpers/apigatewayv2-domain.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/arn.d.ts +51 -0
- package/platform/types/components/aws/helpers/arn.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/bootstrap.d.ts +13 -0
- package/platform/types/components/aws/helpers/bootstrap.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/client.d.ts +7 -0
- package/platform/types/components/aws/helpers/client.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/container-builder.d.ts +4 -0
- package/platform/types/components/aws/helpers/container-builder.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/custom-domain.d.ts +111 -0
- package/platform/types/components/aws/helpers/custom-domain.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/event-source.d.ts +26 -0
- package/platform/types/components/aws/helpers/event-source.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/fargate.d.ts +225 -0
- package/platform/types/components/aws/helpers/fargate.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-builder.d.ts +14 -0
- package/platform/types/components/aws/helpers/function-builder.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-code.d.ts +80 -0
- package/platform/types/components/aws/helpers/function-code.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-part.d.ts +61 -0
- package/platform/types/components/aws/helpers/function-part.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-permission.d.ts +17 -0
- package/platform/types/components/aws/helpers/function-permission.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/load-balancer-args.d.ts +40 -0
- package/platform/types/components/aws/helpers/load-balancer-args.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/load-balancer.d.ts +9 -0
- package/platform/types/components/aws/helpers/load-balancer.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/provider.d.ts +3 -0
- package/platform/types/components/aws/helpers/provider.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/queue-policy.d.ts +11 -0
- package/platform/types/components/aws/helpers/queue-policy.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/rds.d.ts +98 -0
- package/platform/types/components/aws/helpers/rds.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/site-builder.d.ts +4 -0
- package/platform/types/components/aws/helpers/site-builder.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/subscriber.d.ts +6 -0
- package/platform/types/components/aws/helpers/subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/vpc.d.ts +14 -0
- package/platform/types/components/aws/helpers/vpc.d.ts.map +1 -0
- package/platform/types/components/aws/https-redirect.d.ts +38 -0
- package/platform/types/components/aws/https-redirect.d.ts.map +1 -0
- package/platform/types/components/aws/iam-edit.d.ts +39 -0
- package/platform/types/components/aws/iam-edit.d.ts.map +1 -0
- package/platform/types/components/aws/index.d.ts +56 -0
- package/platform/types/components/aws/index.d.ts.map +1 -0
- package/platform/types/components/aws/kinesis-stream-lambda-subscriber.d.ts +49 -0
- package/platform/types/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/kinesis-stream.d.ts +254 -0
- package/platform/types/components/aws/kinesis-stream.d.ts.map +1 -0
- package/platform/types/components/aws/linkable.d.ts +17 -0
- package/platform/types/components/aws/linkable.d.ts.map +1 -0
- package/platform/types/components/aws/logging.d.ts +26 -0
- package/platform/types/components/aws/logging.d.ts.map +1 -0
- package/platform/types/components/aws/microvm.d.ts +439 -0
- package/platform/types/components/aws/microvm.d.ts.map +1 -0
- package/platform/types/components/aws/mysql.d.ts +528 -0
- package/platform/types/components/aws/mysql.d.ts.map +1 -0
- package/platform/types/components/aws/nextjs.d.ts +534 -0
- package/platform/types/components/aws/nextjs.d.ts.map +1 -0
- package/platform/types/components/aws/nuxt.d.ts +480 -0
- package/platform/types/components/aws/nuxt.d.ts.map +1 -0
- package/platform/types/components/aws/open-search.d.ts +306 -0
- package/platform/types/components/aws/open-search.d.ts.map +1 -0
- package/platform/types/components/aws/opencontrol.d.ts +169 -0
- package/platform/types/components/aws/opencontrol.d.ts.map +1 -0
- package/platform/types/components/aws/permission.d.ts +80 -0
- package/platform/types/components/aws/permission.d.ts.map +1 -0
- package/platform/types/components/aws/postgres-v1.d.ts +328 -0
- package/platform/types/components/aws/postgres-v1.d.ts.map +1 -0
- package/platform/types/components/aws/postgres.d.ts +529 -0
- package/platform/types/components/aws/postgres.d.ts.map +1 -0
- package/platform/types/components/aws/providers/bucket-files.d.ts +18 -0
- package/platform/types/components/aws/providers/bucket-files.d.ts.map +1 -0
- package/platform/types/components/aws/providers/distribution-deployment-waiter.d.ts +13 -0
- package/platform/types/components/aws/providers/distribution-deployment-waiter.d.ts.map +1 -0
- package/platform/types/components/aws/providers/distribution-invalidation.d.ts +11 -0
- package/platform/types/components/aws/providers/distribution-invalidation.d.ts.map +1 -0
- package/platform/types/components/aws/providers/function-environment-update.d.ts +33 -0
- package/platform/types/components/aws/providers/function-environment-update.d.ts.map +1 -0
- package/platform/types/components/aws/providers/hosted-zone-lookup.d.ts +11 -0
- package/platform/types/components/aws/providers/hosted-zone-lookup.d.ts.map +1 -0
- package/platform/types/components/aws/providers/kv-keys.d.ts +11 -0
- package/platform/types/components/aws/providers/kv-keys.d.ts.map +1 -0
- package/platform/types/components/aws/providers/kv-routes-update.d.ts +11 -0
- package/platform/types/components/aws/providers/kv-routes-update.d.ts.map +1 -0
- package/platform/types/components/aws/providers/microvm-image-prune.d.ts +35 -0
- package/platform/types/components/aws/providers/microvm-image-prune.d.ts.map +1 -0
- package/platform/types/components/aws/providers/origin-access-control.d.ts +8 -0
- package/platform/types/components/aws/providers/origin-access-control.d.ts.map +1 -0
- package/platform/types/components/aws/providers/rds-role-lookup.d.ts +8 -0
- package/platform/types/components/aws/providers/rds-role-lookup.d.ts.map +1 -0
- package/platform/types/components/aws/providers/vector-table.d.ts +12 -0
- package/platform/types/components/aws/providers/vector-table.d.ts.map +1 -0
- package/platform/types/components/aws/queue-lambda-subscriber.d.ts +53 -0
- package/platform/types/components/aws/queue-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/queue.d.ts +494 -0
- package/platform/types/components/aws/queue.d.ts.map +1 -0
- package/platform/types/components/aws/react.d.ts +407 -0
- package/platform/types/components/aws/react.d.ts.map +1 -0
- package/platform/types/components/aws/realtime-lambda-subscriber.d.ts +53 -0
- package/platform/types/components/aws/realtime-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/realtime.d.ts +237 -0
- package/platform/types/components/aws/realtime.d.ts.map +1 -0
- package/platform/types/components/aws/redis-v1.d.ts +348 -0
- package/platform/types/components/aws/redis-v1.d.ts.map +1 -0
- package/platform/types/components/aws/redis.d.ts +545 -0
- package/platform/types/components/aws/redis.d.ts.map +1 -0
- package/platform/types/components/aws/remix.d.ts +408 -0
- package/platform/types/components/aws/remix.d.ts.map +1 -0
- package/platform/types/components/aws/router-base-route.d.ts +28 -0
- package/platform/types/components/aws/router-base-route.d.ts.map +1 -0
- package/platform/types/components/aws/router-bucket-route.d.ts +29 -0
- package/platform/types/components/aws/router-bucket-route.d.ts.map +1 -0
- package/platform/types/components/aws/router-url-route.d.ts +28 -0
- package/platform/types/components/aws/router-url-route.d.ts.map +1 -0
- package/platform/types/components/aws/router.d.ts +1767 -0
- package/platform/types/components/aws/router.d.ts.map +1 -0
- package/platform/types/components/aws/service-v1.d.ts +78 -0
- package/platform/types/components/aws/service-v1.d.ts.map +1 -0
- package/platform/types/components/aws/service.d.ts +1756 -0
- package/platform/types/components/aws/service.d.ts.map +1 -0
- package/platform/types/components/aws/sns-topic-lambda-subscriber.d.ts +53 -0
- package/platform/types/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/sns-topic-queue-subscriber.d.ts +55 -0
- package/platform/types/components/aws/sns-topic-queue-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/sns-topic.d.ts +394 -0
- package/platform/types/components/aws/sns-topic.d.ts.map +1 -0
- package/platform/types/components/aws/solid-start.d.ts +399 -0
- package/platform/types/components/aws/solid-start.d.ts.map +1 -0
- package/platform/types/components/aws/ssr-site.d.ts +895 -0
- package/platform/types/components/aws/ssr-site.d.ts.map +1 -0
- package/platform/types/components/aws/static-site.d.ts +744 -0
- package/platform/types/components/aws/static-site.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/choice.d.ts +73 -0
- package/platform/types/components/aws/step-functions/choice.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/fail.d.ts +63 -0
- package/platform/types/components/aws/step-functions/fail.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/map.d.ts +236 -0
- package/platform/types/components/aws/step-functions/map.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/parallel.d.ts +127 -0
- package/platform/types/components/aws/step-functions/parallel.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/pass.d.ts +39 -0
- package/platform/types/components/aws/step-functions/pass.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/state.d.ts +231 -0
- package/platform/types/components/aws/step-functions/state.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/succeed.d.ts +26 -0
- package/platform/types/components/aws/step-functions/succeed.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/task.d.ts +485 -0
- package/platform/types/components/aws/step-functions/task.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/wait.d.ts +91 -0
- package/platform/types/components/aws/step-functions/wait.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions.d.ts +478 -0
- package/platform/types/components/aws/step-functions.d.ts.map +1 -0
- package/platform/types/components/aws/svelte-kit.d.ts +456 -0
- package/platform/types/components/aws/svelte-kit.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/alb.d.ts +2 -0
- package/platform/types/components/aws/takeover/alb.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/apigatewayv2.d.ts +2 -0
- package/platform/types/components/aws/takeover/apigatewayv2.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/app-sync.d.ts +2 -0
- package/platform/types/components/aws/takeover/app-sync.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/aurora.d.ts +2 -0
- package/platform/types/components/aws/takeover/aurora.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/bucket.d.ts +2 -0
- package/platform/types/components/aws/takeover/bucket.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/bus.d.ts +2 -0
- package/platform/types/components/aws/takeover/bus.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/cognito-user-pool.d.ts +2 -0
- package/platform/types/components/aws/takeover/cognito-user-pool.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/cron-v2.d.ts +2 -0
- package/platform/types/components/aws/takeover/cron-v2.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/dsql.d.ts +2 -0
- package/platform/types/components/aws/takeover/dsql.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/dynamo.d.ts +2 -0
- package/platform/types/components/aws/takeover/dynamo.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/efs.d.ts +2 -0
- package/platform/types/components/aws/takeover/efs.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/function.d.ts +2 -0
- package/platform/types/components/aws/takeover/function.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/helpers.d.ts +16 -0
- package/platform/types/components/aws/takeover/helpers.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/index.d.ts +28 -0
- package/platform/types/components/aws/takeover/index.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/mysql.d.ts +2 -0
- package/platform/types/components/aws/takeover/mysql.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/postgres.d.ts +2 -0
- package/platform/types/components/aws/takeover/postgres.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/queue.d.ts +2 -0
- package/platform/types/components/aws/takeover/queue.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/redis.d.ts +2 -0
- package/platform/types/components/aws/takeover/redis.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/service.d.ts +2 -0
- package/platform/types/components/aws/takeover/service.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/sns-topic.d.ts +2 -0
- package/platform/types/components/aws/takeover/sns-topic.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/task.d.ts +2 -0
- package/platform/types/components/aws/takeover/task.d.ts.map +1 -0
- package/platform/types/components/aws/tan-stack-start.d.ts +359 -0
- package/platform/types/components/aws/tan-stack-start.d.ts.map +1 -0
- package/platform/types/components/aws/task.d.ts +342 -0
- package/platform/types/components/aws/task.d.ts.map +1 -0
- package/platform/types/components/aws/v5/alb.d.ts +177 -0
- package/platform/types/components/aws/v5/alb.d.ts.map +1 -0
- package/platform/types/components/aws/v5/apigatewayv2.d.ts +482 -0
- package/platform/types/components/aws/v5/apigatewayv2.d.ts.map +1 -0
- package/platform/types/components/aws/v5/app-sync.d.ts +424 -0
- package/platform/types/components/aws/v5/app-sync.d.ts.map +1 -0
- package/platform/types/components/aws/v5/aurora.d.ts +459 -0
- package/platform/types/components/aws/v5/aurora.d.ts.map +1 -0
- package/platform/types/components/aws/v5/bucket.d.ts +578 -0
- package/platform/types/components/aws/v5/bucket.d.ts.map +1 -0
- package/platform/types/components/aws/v5/bus.d.ts +255 -0
- package/platform/types/components/aws/v5/bus.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cluster.d.ts +167 -0
- package/platform/types/components/aws/v5/cluster.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cognito-user-pool-client.d.ts +69 -0
- package/platform/types/components/aws/v5/cognito-user-pool-client.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cognito-user-pool.d.ts +396 -0
- package/platform/types/components/aws/v5/cognito-user-pool.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cron-v2.d.ts +206 -0
- package/platform/types/components/aws/v5/cron-v2.d.ts.map +1 -0
- package/platform/types/components/aws/v5/dsql.d.ts +453 -0
- package/platform/types/components/aws/v5/dsql.d.ts.map +1 -0
- package/platform/types/components/aws/v5/dynamo.d.ts +328 -0
- package/platform/types/components/aws/v5/dynamo.d.ts.map +1 -0
- package/platform/types/components/aws/v5/efs.d.ts +178 -0
- package/platform/types/components/aws/v5/efs.d.ts.map +1 -0
- package/platform/types/components/aws/v5/function.d.ts +586 -0
- package/platform/types/components/aws/v5/function.d.ts.map +1 -0
- package/platform/types/components/aws/v5/index.d.ts +27 -0
- package/platform/types/components/aws/v5/index.d.ts.map +1 -0
- package/platform/types/components/aws/v5/mysql.d.ts +347 -0
- package/platform/types/components/aws/v5/mysql.d.ts.map +1 -0
- package/platform/types/components/aws/v5/postgres.d.ts +348 -0
- package/platform/types/components/aws/v5/postgres.d.ts.map +1 -0
- package/platform/types/components/aws/v5/queue.d.ts +190 -0
- package/platform/types/components/aws/v5/queue.d.ts.map +1 -0
- package/platform/types/components/aws/v5/redis.d.ts +214 -0
- package/platform/types/components/aws/v5/redis.d.ts.map +1 -0
- package/platform/types/components/aws/v5/service.d.ts +1347 -0
- package/platform/types/components/aws/v5/service.d.ts.map +1 -0
- package/platform/types/components/aws/v5/sns-topic.d.ts +226 -0
- package/platform/types/components/aws/v5/sns-topic.d.ts.map +1 -0
- package/platform/types/components/aws/v5/task.d.ts +346 -0
- package/platform/types/components/aws/v5/task.d.ts.map +1 -0
- package/platform/types/components/aws/vector.d.ts +163 -0
- package/platform/types/components/aws/vector.d.ts.map +1 -0
- package/platform/types/components/aws/vpc-v1.d.ts +208 -0
- package/platform/types/components/aws/vpc-v1.d.ts.map +1 -0
- package/platform/types/components/aws/vpc.d.ts +491 -0
- package/platform/types/components/aws/vpc.d.ts.map +1 -0
- package/platform/types/components/aws/workflow.d.ts +331 -0
- package/platform/types/components/aws/workflow.d.ts.map +1 -0
- package/platform/types/components/base/base-site.d.ts +53 -0
- package/platform/types/components/base/base-site.d.ts.map +1 -0
- package/platform/types/components/base/base-ssr-site.d.ts +13 -0
- package/platform/types/components/base/base-ssr-site.d.ts.map +1 -0
- package/platform/types/components/base/base-static-site.d.ts +199 -0
- package/platform/types/components/base/base-static-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/account-id.d.ts +2 -0
- package/platform/types/components/cloudflare/account-id.d.ts.map +1 -0
- package/platform/types/components/cloudflare/ai.d.ts +68 -0
- package/platform/types/components/cloudflare/ai.d.ts.map +1 -0
- package/platform/types/components/cloudflare/astro.d.ts +249 -0
- package/platform/types/components/cloudflare/astro.d.ts.map +1 -0
- package/platform/types/components/cloudflare/auth.d.ts +22 -0
- package/platform/types/components/cloudflare/auth.d.ts.map +1 -0
- package/platform/types/components/cloudflare/binding.d.ts +109 -0
- package/platform/types/components/cloudflare/binding.d.ts.map +1 -0
- package/platform/types/components/cloudflare/bucket.d.ts +98 -0
- package/platform/types/components/cloudflare/bucket.d.ts.map +1 -0
- package/platform/types/components/cloudflare/cron.d.ts +151 -0
- package/platform/types/components/cloudflare/cron.d.ts.map +1 -0
- package/platform/types/components/cloudflare/d1.d.ts +142 -0
- package/platform/types/components/cloudflare/d1.d.ts.map +1 -0
- package/platform/types/components/cloudflare/dns.d.ts +100 -0
- package/platform/types/components/cloudflare/dns.d.ts.map +1 -0
- package/platform/types/components/cloudflare/durable-object.d.ts +125 -0
- package/platform/types/components/cloudflare/durable-object.d.ts.map +1 -0
- package/platform/types/components/cloudflare/experimental/index.d.ts +4 -0
- package/platform/types/components/cloudflare/experimental/index.d.ts.map +1 -0
- package/platform/types/components/cloudflare/experimental/solid-start.d.ts +219 -0
- package/platform/types/components/cloudflare/experimental/solid-start.d.ts.map +1 -0
- package/platform/types/components/cloudflare/experimental/static-site.d.ts +3 -0
- package/platform/types/components/cloudflare/experimental/static-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/compatibility.d.ts +21 -0
- package/platform/types/components/cloudflare/helpers/compatibility.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/fetch.d.ts +19 -0
- package/platform/types/components/cloudflare/helpers/fetch.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/validation.d.ts +15 -0
- package/platform/types/components/cloudflare/helpers/validation.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/worker-builder.d.ts +10 -0
- package/platform/types/components/cloudflare/helpers/worker-builder.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/wrangler.d.ts +31 -0
- package/platform/types/components/cloudflare/helpers/wrangler.d.ts.map +1 -0
- package/platform/types/components/cloudflare/hyperdrive.d.ts +302 -0
- package/platform/types/components/cloudflare/hyperdrive.d.ts.map +1 -0
- package/platform/types/components/cloudflare/index.d.ts +25 -0
- package/platform/types/components/cloudflare/index.d.ts.map +1 -0
- package/platform/types/components/cloudflare/kv.d.ts +140 -0
- package/platform/types/components/cloudflare/kv.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/dns-record.d.ts +21 -0
- package/platform/types/components/cloudflare/providers/dns-record.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/kv-data.d.ts +23 -0
- package/platform/types/components/cloudflare/providers/kv-data.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-assets.d.ts +19 -0
- package/platform/types/components/cloudflare/providers/worker-assets.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-placement.d.ts +27 -0
- package/platform/types/components/cloudflare/providers/worker-placement.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-script.d.ts +23 -0
- package/platform/types/components/cloudflare/providers/worker-script.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-url.d.ts +24 -0
- package/platform/types/components/cloudflare/providers/worker-url.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/zone-lookup.d.ts +22 -0
- package/platform/types/components/cloudflare/providers/zone-lookup.d.ts.map +1 -0
- package/platform/types/components/cloudflare/queue-worker-subscriber.d.ts +122 -0
- package/platform/types/components/cloudflare/queue-worker-subscriber.d.ts.map +1 -0
- package/platform/types/components/cloudflare/queue.d.ts +235 -0
- package/platform/types/components/cloudflare/queue.d.ts.map +1 -0
- package/platform/types/components/cloudflare/rate-limit.d.ts +117 -0
- package/platform/types/components/cloudflare/rate-limit.d.ts.map +1 -0
- package/platform/types/components/cloudflare/react-router.d.ts +262 -0
- package/platform/types/components/cloudflare/react-router.d.ts.map +1 -0
- package/platform/types/components/cloudflare/ssr-site.d.ts +60 -0
- package/platform/types/components/cloudflare/ssr-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/static-site-v2.d.ts +302 -0
- package/platform/types/components/cloudflare/static-site-v2.d.ts.map +1 -0
- package/platform/types/components/cloudflare/static-site.d.ts +270 -0
- package/platform/types/components/cloudflare/static-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/tan-stack-start.d.ts +259 -0
- package/platform/types/components/cloudflare/tan-stack-start.d.ts.map +1 -0
- package/platform/types/components/cloudflare/worker.d.ts +483 -0
- package/platform/types/components/cloudflare/worker.d.ts.map +1 -0
- package/platform/types/components/cloudflare/workflow.d.ts +248 -0
- package/platform/types/components/cloudflare/workflow.d.ts.map +1 -0
- package/platform/types/components/component.d.ts +67 -0
- package/platform/types/components/component.d.ts.map +1 -0
- package/platform/types/components/core.d.ts +16 -0
- package/platform/types/components/core.d.ts.map +1 -0
- package/platform/types/components/cpu.d.ts +3 -0
- package/platform/types/components/cpu.d.ts.map +1 -0
- package/platform/types/components/dns.d.ts +63 -0
- package/platform/types/components/dns.d.ts.map +1 -0
- package/platform/types/components/duration.d.ts +9 -0
- package/platform/types/components/duration.d.ts.map +1 -0
- package/platform/types/components/error.d.ts +4 -0
- package/platform/types/components/error.d.ts.map +1 -0
- package/platform/types/components/esbuild.d.ts +3 -0
- package/platform/types/components/esbuild.d.ts.map +1 -0
- package/platform/types/components/experimental/dev-command.d.ts +99 -0
- package/platform/types/components/experimental/dev-command.d.ts.map +1 -0
- package/platform/types/components/experimental/index.d.ts +2 -0
- package/platform/types/components/experimental/index.d.ts.map +1 -0
- package/platform/types/components/groups.d.ts +6 -0
- package/platform/types/components/groups.d.ts.map +1 -0
- package/platform/types/components/index.d.ts +5 -0
- package/platform/types/components/index.d.ts.map +1 -0
- package/platform/types/components/input.d.ts +3 -0
- package/platform/types/components/input.d.ts.map +1 -0
- package/platform/types/components/link.d.ts +41 -0
- package/platform/types/components/link.d.ts.map +1 -0
- package/platform/types/components/linkable.d.ts +301 -0
- package/platform/types/components/linkable.d.ts.map +1 -0
- package/platform/types/components/naming-rules.d.ts +32 -0
- package/platform/types/components/naming-rules.d.ts.map +1 -0
- package/platform/types/components/naming.d.ts +21 -0
- package/platform/types/components/naming.d.ts.map +1 -0
- package/platform/types/components/parts-component.d.ts +242 -0
- package/platform/types/components/parts-component.d.ts.map +1 -0
- package/platform/types/components/parts.d.ts +194 -0
- package/platform/types/components/parts.d.ts.map +1 -0
- package/platform/types/components/path.d.ts +2 -0
- package/platform/types/components/path.d.ts.map +1 -0
- package/platform/types/components/rpc/rpc.d.ts +19 -0
- package/platform/types/components/rpc/rpc.d.ts.map +1 -0
- package/platform/types/components/secret.d.ts +123 -0
- package/platform/types/components/secret.d.ts.map +1 -0
- package/platform/types/components/size.d.ts +5 -0
- package/platform/types/components/size.d.ts.map +1 -0
- package/platform/types/components/takeover.d.ts +88 -0
- package/platform/types/components/takeover.d.ts.map +1 -0
- package/platform/types/components/transform.d.ts +34 -0
- package/platform/types/components/transform.d.ts.map +1 -0
- package/platform/types/components/vercel/account-id.d.ts +2 -0
- package/platform/types/components/vercel/account-id.d.ts.map +1 -0
- package/platform/types/components/vercel/dns.d.ts +73 -0
- package/platform/types/components/vercel/dns.d.ts.map +1 -0
- package/platform/types/components/vercel/index.d.ts +3 -0
- package/platform/types/components/vercel/index.d.ts.map +1 -0
- package/platform/types/components/vercel/providers/dns-record.d.ts +15 -0
- package/platform/types/components/vercel/providers/dns-record.d.ts.map +1 -0
- package/platform/types/config.d.ts +1440 -0
- package/platform/types/config.d.ts.map +1 -0
- package/platform/types/global-aliases.d.ts +37 -0
- package/platform/types/global.d.ts +374 -0
- package/platform/types/internal.d.ts +18 -0
- package/platform/types/runtime/worker/unenv.d.ts +14 -0
- package/platform/types/testing/global.d.ts +11 -0
- package/platform/types/testing/global.d.ts.map +1 -0
- package/platform/types/testing/index.d.ts +80 -0
- package/platform/types/testing/index.d.ts.map +1 -0
- package/platform/types/testing/mock.d.ts +136 -0
- package/platform/types/testing/mock.d.ts.map +1 -0
- package/platform/types/testing/vitest.d.ts +19 -0
- package/platform/types/testing/vitest.d.ts.map +1 -0
- package/platform/types/util/compare-semver.d.ts +4 -0
- package/platform/types/util/compare-semver.d.ts.map +1 -0
- package/platform/types/util/fs.d.ts +5 -0
- package/platform/types/util/fs.d.ts.map +1 -0
- package/platform/types/util/lazy.d.ts +2 -0
- package/platform/types/util/lazy.d.ts.map +1 -0
- package/platform/types/util/minify.d.ts +2 -0
- package/platform/types/util/minify.d.ts.map +1 -0
- package/platform/types/util/package.d.ts +10 -0
- package/platform/types/util/package.d.ts.map +1 -0
- package/platform/types/util/semaphore.d.ts +9 -0
- package/platform/types/util/semaphore.d.ts.map +1 -0
- package/platform/types/util/warn.d.ts +2 -0
- package/platform/types/util/warn.d.ts.map +1 -0
|
@@ -0,0 +1,1767 @@
|
|
|
1
|
+
import { ComponentResourceOptions, Output } from "@pulumi/pulumi";
|
|
2
|
+
import { Component, Transform } from "../component";
|
|
3
|
+
import { Link } from "../link";
|
|
4
|
+
import type { Input } from "../input";
|
|
5
|
+
import { Cdn, CdnArgs } from "./cdn";
|
|
6
|
+
import { cloudfront, cloudwatch, wafv2 } from "@pulumi/aws";
|
|
7
|
+
import { Bucket } from "./bucket";
|
|
8
|
+
import { DurationSeconds } from "../duration";
|
|
9
|
+
import { FunctionArn } from "./function.js";
|
|
10
|
+
import { Size } from "../size";
|
|
11
|
+
import { RETENTION } from "./logging";
|
|
12
|
+
interface InlineUrlRouteArgs extends InlineBaseRouteArgs {
|
|
13
|
+
/**
|
|
14
|
+
* The destination URL.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* ```js
|
|
19
|
+
* {
|
|
20
|
+
* routes: {
|
|
21
|
+
* "/api/*": {
|
|
22
|
+
* url: "https://example.com"
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
url: Input<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Rewrite the request path.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
*
|
|
34
|
+
* By default, if the route path is `/api/*` and a request comes in for `/api/users/profile`,
|
|
35
|
+
* the request path the destination sees is `/api/users/profile`.
|
|
36
|
+
*
|
|
37
|
+
* If you want to serve the route from the root, you can rewrite the request path to
|
|
38
|
+
* `/users/profile`.
|
|
39
|
+
*
|
|
40
|
+
* ```js
|
|
41
|
+
* {
|
|
42
|
+
* routes: {
|
|
43
|
+
* "/api/*": {
|
|
44
|
+
* url: "https://api.example.com",
|
|
45
|
+
* rewrite: {
|
|
46
|
+
* regex: "^/api/(.*)$",
|
|
47
|
+
* to: "/$1"
|
|
48
|
+
* }
|
|
49
|
+
* }
|
|
50
|
+
* }
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
rewrite?: Input<{
|
|
55
|
+
/**
|
|
56
|
+
* The regex to match the request path.
|
|
57
|
+
*/
|
|
58
|
+
regex: Input<string>;
|
|
59
|
+
/**
|
|
60
|
+
* The replacement for the matched path.
|
|
61
|
+
*/
|
|
62
|
+
to: Input<string>;
|
|
63
|
+
}>;
|
|
64
|
+
}
|
|
65
|
+
interface InlineRouterBucketRouteArgs extends InlineBaseRouteArgs {
|
|
66
|
+
/**
|
|
67
|
+
* A bucket to route to.
|
|
68
|
+
*
|
|
69
|
+
* :::note
|
|
70
|
+
* You need to let CloudFront `access` the bucket.
|
|
71
|
+
* :::
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
*
|
|
75
|
+
* For example, let's say you have a bucket that gives CloudFront `access`.
|
|
76
|
+
*
|
|
77
|
+
* ```ts title="sst.config.ts" {2}
|
|
78
|
+
* const myBucket = new sst.aws.Bucket("MyBucket", {
|
|
79
|
+
* access: "cloudfront"
|
|
80
|
+
* });
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* You can then this directly as the destination for the route.
|
|
84
|
+
*
|
|
85
|
+
* ```js
|
|
86
|
+
* {
|
|
87
|
+
* routes: {
|
|
88
|
+
* "/files/*": {
|
|
89
|
+
* bucket: myBucket
|
|
90
|
+
* }
|
|
91
|
+
* }
|
|
92
|
+
* }
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* Or if you have an existing bucket, you can pass in its regional domain.
|
|
96
|
+
*
|
|
97
|
+
* ```js
|
|
98
|
+
* {
|
|
99
|
+
* routes: {
|
|
100
|
+
* "/files/*": {
|
|
101
|
+
* bucket: "my-bucket.s3.us-east-1.amazonaws.com"
|
|
102
|
+
* }
|
|
103
|
+
* }
|
|
104
|
+
* }
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
bucket?: Input<Bucket | string>;
|
|
108
|
+
/**
|
|
109
|
+
* Rewrite the request path.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
*
|
|
113
|
+
* By default, if the route path is `/files/*` and a request comes in for `/files/logo.png`,
|
|
114
|
+
* the request path the destination sees is `/files/logo.png`. In the case of a bucket route,
|
|
115
|
+
* the file `logo.png` is served from the `files` directory in the bucket.
|
|
116
|
+
*
|
|
117
|
+
* If you want to serve the file from the root of the bucket, you can rewrite
|
|
118
|
+
* the request path to `/logo.png`.
|
|
119
|
+
*
|
|
120
|
+
* ```js
|
|
121
|
+
* {
|
|
122
|
+
* routes: {
|
|
123
|
+
* "/files/*": {
|
|
124
|
+
* bucket: myBucket,
|
|
125
|
+
* rewrite: {
|
|
126
|
+
* regex: "^/files/(.*)$",
|
|
127
|
+
* to: "/$1"
|
|
128
|
+
* }
|
|
129
|
+
* }
|
|
130
|
+
* }
|
|
131
|
+
* }
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
rewrite?: Input<{
|
|
135
|
+
/**
|
|
136
|
+
* The regex to match the request path.
|
|
137
|
+
*/
|
|
138
|
+
regex: Input<string>;
|
|
139
|
+
/**
|
|
140
|
+
* The replacement for the matched path.
|
|
141
|
+
*/
|
|
142
|
+
to: Input<string>;
|
|
143
|
+
}>;
|
|
144
|
+
}
|
|
145
|
+
interface InlineBaseRouteArgs {
|
|
146
|
+
/**
|
|
147
|
+
* The cache policy to use for the route.
|
|
148
|
+
*
|
|
149
|
+
* @default CloudFront's managed CachingOptimized policy
|
|
150
|
+
* @example
|
|
151
|
+
* ```js
|
|
152
|
+
* {
|
|
153
|
+
* routes: {
|
|
154
|
+
* "/files/*": {
|
|
155
|
+
* url: "https://example.com"
|
|
156
|
+
* cachePolicy: "658327ea-f89d-4fab-a63d-7e88639e58f6"
|
|
157
|
+
* }
|
|
158
|
+
* }
|
|
159
|
+
* }
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
cachePolicy?: Input<string>;
|
|
163
|
+
/**
|
|
164
|
+
* Configure CloudFront Functions to customize the behavior of HTTP requests and responses at the edge.
|
|
165
|
+
*/
|
|
166
|
+
edge?: {
|
|
167
|
+
/**
|
|
168
|
+
* Configure the viewer request function.
|
|
169
|
+
*
|
|
170
|
+
* The viewer request function can be used to modify incoming requests before they
|
|
171
|
+
* reach your origin server. For example, you can redirect users, rewrite URLs,
|
|
172
|
+
* or add headers.
|
|
173
|
+
*/
|
|
174
|
+
viewerRequest?: Input<{
|
|
175
|
+
/**
|
|
176
|
+
* The code to inject into the viewer request function.
|
|
177
|
+
*
|
|
178
|
+
* By default, a viewer request function is created to add the `x-forwarded-host`
|
|
179
|
+
* header. The given code will be injected at the end of this function.
|
|
180
|
+
*
|
|
181
|
+
* ```js
|
|
182
|
+
* async function handler(event) {
|
|
183
|
+
* // Default behavior code
|
|
184
|
+
*
|
|
185
|
+
* // User injected code
|
|
186
|
+
*
|
|
187
|
+
* return event.request;
|
|
188
|
+
* }
|
|
189
|
+
* ```
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* To add a custom header to all requests.
|
|
193
|
+
*
|
|
194
|
+
* ```js
|
|
195
|
+
* {
|
|
196
|
+
* routes: {
|
|
197
|
+
* "/api/*": {
|
|
198
|
+
* url: "https://example.com"
|
|
199
|
+
* edge: {
|
|
200
|
+
* viewerRequest: {
|
|
201
|
+
* injection: `event.request.headers["x-foo"] = { value: "bar" };`
|
|
202
|
+
* }
|
|
203
|
+
* }
|
|
204
|
+
* }
|
|
205
|
+
* }
|
|
206
|
+
* }
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
injection: Input<string>;
|
|
210
|
+
/**
|
|
211
|
+
* The KeyValueStore to associate with the viewer request function.
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```js
|
|
215
|
+
* {
|
|
216
|
+
* routes: {
|
|
217
|
+
* "/api/*": {
|
|
218
|
+
* url: "https://example.com"
|
|
219
|
+
* edge: {
|
|
220
|
+
* viewerRequest: {
|
|
221
|
+
* kvStore: "arn:aws:cloudfront::123456789012:key-value-store/my-store"
|
|
222
|
+
* }
|
|
223
|
+
* }
|
|
224
|
+
* }
|
|
225
|
+
* }
|
|
226
|
+
* }
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
kvStore?: Input<string>;
|
|
230
|
+
/**
|
|
231
|
+
* @deprecated Use `kvStore` instead because CloudFront Functions only support one KeyValueStore.
|
|
232
|
+
*/
|
|
233
|
+
kvStores?: Input<Input<string>[]>;
|
|
234
|
+
}>;
|
|
235
|
+
/**
|
|
236
|
+
* Configure the viewer response function.
|
|
237
|
+
*
|
|
238
|
+
* The viewer response function can be used to modify outgoing responses before
|
|
239
|
+
* they are sent to the client. For example, you can add security headers or change
|
|
240
|
+
* the response status code.
|
|
241
|
+
*
|
|
242
|
+
* By default, no viewer response function is set. A new function will be created
|
|
243
|
+
* with the provided code.
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* Add a custom header to all responses
|
|
247
|
+
* ```js
|
|
248
|
+
* {
|
|
249
|
+
* routes: {
|
|
250
|
+
* "/api/*": {
|
|
251
|
+
* url: "https://example.com"
|
|
252
|
+
* edge: {
|
|
253
|
+
* viewerResponse: {
|
|
254
|
+
* injection: `event.response.headers["x-foo"] = { value: "bar" };`
|
|
255
|
+
* }
|
|
256
|
+
* }
|
|
257
|
+
* }
|
|
258
|
+
* }
|
|
259
|
+
* }
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
viewerResponse?: Input<{
|
|
263
|
+
/**
|
|
264
|
+
* The code to inject into the viewer response function.
|
|
265
|
+
*
|
|
266
|
+
* By default, no viewer response function is set. A new function will be created with
|
|
267
|
+
* the provided code.
|
|
268
|
+
*
|
|
269
|
+
* ```js
|
|
270
|
+
* async function handler(event) {
|
|
271
|
+
* // User injected code
|
|
272
|
+
*
|
|
273
|
+
* return event.response;
|
|
274
|
+
* }
|
|
275
|
+
* ```
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* To add a custom header to all responses.
|
|
279
|
+
*
|
|
280
|
+
* ```js
|
|
281
|
+
* {
|
|
282
|
+
* routes: {
|
|
283
|
+
* "/api/*": {
|
|
284
|
+
* url: "https://example.com"
|
|
285
|
+
* edge: {
|
|
286
|
+
* viewerResponse: {
|
|
287
|
+
* injection: `event.response.headers["x-foo"] = { value: "bar" };`
|
|
288
|
+
* }
|
|
289
|
+
* }
|
|
290
|
+
* }
|
|
291
|
+
* }
|
|
292
|
+
* }
|
|
293
|
+
* ```
|
|
294
|
+
*/
|
|
295
|
+
injection: Input<string>;
|
|
296
|
+
/**
|
|
297
|
+
* The KeyValueStore to associate with the viewer response function.
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```js
|
|
301
|
+
* {
|
|
302
|
+
* routes: {
|
|
303
|
+
* "/api/*": {
|
|
304
|
+
* url: "https://example.com"
|
|
305
|
+
* edge: {
|
|
306
|
+
* viewerResponse: {
|
|
307
|
+
* kvStore: "arn:aws:cloudfront::123456789012:key-value-store/my-store"
|
|
308
|
+
* }
|
|
309
|
+
* }
|
|
310
|
+
* }
|
|
311
|
+
* }
|
|
312
|
+
* }
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
kvStore?: Input<string>;
|
|
316
|
+
/**
|
|
317
|
+
* @deprecated Use `kvStore` instead because CloudFront Functions only support one KeyValueStore.
|
|
318
|
+
*/
|
|
319
|
+
kvStores?: Input<Input<string>[]>;
|
|
320
|
+
}>;
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
interface RouteArgs {
|
|
324
|
+
/**
|
|
325
|
+
* The number of times that CloudFront attempts to connect to the origin. Must be
|
|
326
|
+
* between 1 and 3.
|
|
327
|
+
* @default 3
|
|
328
|
+
* @example
|
|
329
|
+
* ```js
|
|
330
|
+
* {
|
|
331
|
+
* connectionAttempts: 1
|
|
332
|
+
* }
|
|
333
|
+
* ```
|
|
334
|
+
*/
|
|
335
|
+
connectionAttempts?: Input<number>;
|
|
336
|
+
/**
|
|
337
|
+
* The number of seconds that CloudFront waits before timing out and closing the
|
|
338
|
+
* connection to the origin. Must be between 1 and 10 seconds.
|
|
339
|
+
* @default `"10 seconds"`
|
|
340
|
+
* @example
|
|
341
|
+
* ```js
|
|
342
|
+
* {
|
|
343
|
+
* connectionTimeout: "3 seconds"
|
|
344
|
+
* }
|
|
345
|
+
* ```
|
|
346
|
+
*/
|
|
347
|
+
connectionTimeout?: Input<DurationSeconds>;
|
|
348
|
+
}
|
|
349
|
+
export interface RouterUrlRouteArgs extends RouteArgs {
|
|
350
|
+
/**
|
|
351
|
+
* Rewrite the request path.
|
|
352
|
+
*
|
|
353
|
+
* @example
|
|
354
|
+
*
|
|
355
|
+
* If the route path is `/api/*` and a request comes in for `/api/users/profile`,
|
|
356
|
+
* the request path the destination sees is `/api/users/profile`.
|
|
357
|
+
*
|
|
358
|
+
* If you want to serve the route from the root, you can rewrite the request
|
|
359
|
+
* path to `/users/profile`.
|
|
360
|
+
*
|
|
361
|
+
* ```js
|
|
362
|
+
* {
|
|
363
|
+
* rewrite: {
|
|
364
|
+
* regex: "^/api/(.*)$",
|
|
365
|
+
* to: "/$1"
|
|
366
|
+
* }
|
|
367
|
+
* }
|
|
368
|
+
* ```
|
|
369
|
+
*/
|
|
370
|
+
rewrite?: Input<{
|
|
371
|
+
/**
|
|
372
|
+
* The regex to match the request path.
|
|
373
|
+
*/
|
|
374
|
+
regex: Input<string>;
|
|
375
|
+
/**
|
|
376
|
+
* The replacement for the matched path.
|
|
377
|
+
*/
|
|
378
|
+
to: Input<string>;
|
|
379
|
+
}>;
|
|
380
|
+
/**
|
|
381
|
+
* The number of seconds that CloudFront waits for a response after routing a
|
|
382
|
+
* request to the destination. Must be between 1 and 60 seconds.
|
|
383
|
+
*
|
|
384
|
+
* When compared to the `connectionTimeout`, this is the time CloudFront waits
|
|
385
|
+
* for each connection attempt. If the destination doesn't respond, CloudFront
|
|
386
|
+
* tries again, up to `connectionAttempts` times (3 by default), so the request
|
|
387
|
+
* can take that many times this value to fail.
|
|
388
|
+
*
|
|
389
|
+
* The Router applies this timeout dynamically to matching requests through
|
|
390
|
+
* its CloudFront Function. It does not change the distribution's static
|
|
391
|
+
* origin configuration. When you don't set it, the requests use the 20 seconds
|
|
392
|
+
* that the Router sets on the distribution's origin by default.
|
|
393
|
+
*
|
|
394
|
+
* @default `"20 seconds"`
|
|
395
|
+
* @example
|
|
396
|
+
* ```js
|
|
397
|
+
* {
|
|
398
|
+
* readTimeout: "60 seconds"
|
|
399
|
+
* }
|
|
400
|
+
* ```
|
|
401
|
+
*/
|
|
402
|
+
readTimeout?: Input<DurationSeconds>;
|
|
403
|
+
/**
|
|
404
|
+
* The number of seconds that CloudFront should try to maintain the connection
|
|
405
|
+
* to the destination after receiving the last packet of the response. Must be
|
|
406
|
+
* between 1 and 60 seconds
|
|
407
|
+
*
|
|
408
|
+
* The Router passes this value to CloudFront with each matching request, but
|
|
409
|
+
* CloudFront currently does not apply it. It keeps the connection for the
|
|
410
|
+
* keep-alive timeout of the distribution's origin, which is 5 seconds by
|
|
411
|
+
* default, whatever you set here.
|
|
412
|
+
*
|
|
413
|
+
* @default `"5 seconds"`
|
|
414
|
+
* @example
|
|
415
|
+
* ```js
|
|
416
|
+
* {
|
|
417
|
+
* keepAliveTimeout: "10 seconds"
|
|
418
|
+
* }
|
|
419
|
+
* ```
|
|
420
|
+
*/
|
|
421
|
+
keepAliveTimeout?: Input<DurationSeconds>;
|
|
422
|
+
}
|
|
423
|
+
export interface RouterBucketRouteArgs extends RouteArgs {
|
|
424
|
+
/**
|
|
425
|
+
* Rewrite the request path.
|
|
426
|
+
*
|
|
427
|
+
* @example
|
|
428
|
+
*
|
|
429
|
+
* If the route path is `/files/*` and a request comes in for `/files/logo.png`,
|
|
430
|
+
* the request path the destination sees is `/files/logo.png`.
|
|
431
|
+
*
|
|
432
|
+
* If you want to serve the file from the root of the bucket, you can rewrite
|
|
433
|
+
* the request path to `/logo.png`.
|
|
434
|
+
*
|
|
435
|
+
* ```js
|
|
436
|
+
* {
|
|
437
|
+
* rewrite: {
|
|
438
|
+
* regex: "^/files/(.*)$",
|
|
439
|
+
* to: "/$1"
|
|
440
|
+
* }
|
|
441
|
+
* }
|
|
442
|
+
* ```
|
|
443
|
+
*/
|
|
444
|
+
rewrite?: Input<{
|
|
445
|
+
/**
|
|
446
|
+
* The regex to match the request path.
|
|
447
|
+
*/
|
|
448
|
+
regex: Input<string>;
|
|
449
|
+
/**
|
|
450
|
+
* The replacement for the matched path.
|
|
451
|
+
*/
|
|
452
|
+
to: Input<string>;
|
|
453
|
+
}>;
|
|
454
|
+
}
|
|
455
|
+
export interface WafLoggingArgs {
|
|
456
|
+
/**
|
|
457
|
+
* Filter which requests are logged.
|
|
458
|
+
*
|
|
459
|
+
* - `"all"` logs every request evaluated by the WAF.
|
|
460
|
+
* - `"blocked"` only logs requests that were blocked.
|
|
461
|
+
*
|
|
462
|
+
* @default `"all"`
|
|
463
|
+
* @example
|
|
464
|
+
* ```js
|
|
465
|
+
* {
|
|
466
|
+
* waf: {
|
|
467
|
+
* logging: {
|
|
468
|
+
* include: "blocked"
|
|
469
|
+
* }
|
|
470
|
+
* }
|
|
471
|
+
* }
|
|
472
|
+
* ```
|
|
473
|
+
*/
|
|
474
|
+
include?: Input<"all" | "blocked">;
|
|
475
|
+
/**
|
|
476
|
+
* The duration the WAF logs are kept in CloudWatch.
|
|
477
|
+
*
|
|
478
|
+
* @default `"1 month"`
|
|
479
|
+
* @example
|
|
480
|
+
* ```js
|
|
481
|
+
* {
|
|
482
|
+
* waf: {
|
|
483
|
+
* logging: {
|
|
484
|
+
* retention: "3 months"
|
|
485
|
+
* }
|
|
486
|
+
* }
|
|
487
|
+
* }
|
|
488
|
+
* ```
|
|
489
|
+
*/
|
|
490
|
+
retention?: Input<keyof typeof RETENTION>;
|
|
491
|
+
/**
|
|
492
|
+
* Configure which parts of the request are redacted from the logs. Redacted
|
|
493
|
+
* fields are replaced with `REDACTED` in the log output.
|
|
494
|
+
*
|
|
495
|
+
* By default, the query string and the `cookie` and `authorization` headers
|
|
496
|
+
* are redacted since they commonly contain PII or credentials.
|
|
497
|
+
*
|
|
498
|
+
* Set to `false` to disable all redaction.
|
|
499
|
+
*
|
|
500
|
+
* @default `{ queryString: true, headers: ["cookie", "authorization"] }`
|
|
501
|
+
* @example
|
|
502
|
+
*
|
|
503
|
+
* Disable all redaction.
|
|
504
|
+
*
|
|
505
|
+
* ```js
|
|
506
|
+
* {
|
|
507
|
+
* waf: {
|
|
508
|
+
* logging: {
|
|
509
|
+
* redact: false
|
|
510
|
+
* }
|
|
511
|
+
* }
|
|
512
|
+
* }
|
|
513
|
+
* ```
|
|
514
|
+
*
|
|
515
|
+
* Redact everything.
|
|
516
|
+
*
|
|
517
|
+
* ```js
|
|
518
|
+
* {
|
|
519
|
+
* waf: {
|
|
520
|
+
* logging: {
|
|
521
|
+
* redact: {
|
|
522
|
+
* queryString: true,
|
|
523
|
+
* uriPath: true,
|
|
524
|
+
* method: true,
|
|
525
|
+
* headers: ["cookie", "authorization"]
|
|
526
|
+
* }
|
|
527
|
+
* }
|
|
528
|
+
* }
|
|
529
|
+
* }
|
|
530
|
+
* ```
|
|
531
|
+
*/
|
|
532
|
+
redact?: Input<false | {
|
|
533
|
+
/**
|
|
534
|
+
* Redact the query string from the logs. The query string is the
|
|
535
|
+
* part of a URL after the `?` and can contain tokens, user IDs,
|
|
536
|
+
* or other sensitive parameters.
|
|
537
|
+
* @default `true`
|
|
538
|
+
*/
|
|
539
|
+
queryString?: Input<boolean>;
|
|
540
|
+
/**
|
|
541
|
+
* Redact the URI path from the logs. The URI path identifies the
|
|
542
|
+
* resource being accessed, like `/users/123/profile`.
|
|
543
|
+
* @default `false`
|
|
544
|
+
*/
|
|
545
|
+
uriPath?: Input<boolean>;
|
|
546
|
+
/**
|
|
547
|
+
* Redact the HTTP method from the logs (GET, POST, etc.).
|
|
548
|
+
* @default `false`
|
|
549
|
+
*/
|
|
550
|
+
method?: Input<boolean>;
|
|
551
|
+
/**
|
|
552
|
+
* A list of header names to redact from the logs. Must be lowercase.
|
|
553
|
+
* @default `["cookie", "authorization"]`
|
|
554
|
+
* @example
|
|
555
|
+
* ```js
|
|
556
|
+
* {
|
|
557
|
+
* headers: ["cookie", "authorization", "x-api-key"]
|
|
558
|
+
* }
|
|
559
|
+
* ```
|
|
560
|
+
*/
|
|
561
|
+
headers?: Input<string[]>;
|
|
562
|
+
}>;
|
|
563
|
+
}
|
|
564
|
+
export interface WafArgs {
|
|
565
|
+
/**
|
|
566
|
+
* The rate limit per IP address. Requests from an IP that exceed this limit
|
|
567
|
+
* within a 5-minute window will be blocked.
|
|
568
|
+
*
|
|
569
|
+
* @default `2000`
|
|
570
|
+
* @example
|
|
571
|
+
* ```js
|
|
572
|
+
* {
|
|
573
|
+
* waf: {
|
|
574
|
+
* rateLimitPerIp: 1000
|
|
575
|
+
* }
|
|
576
|
+
* }
|
|
577
|
+
* ```
|
|
578
|
+
*/
|
|
579
|
+
rateLimitPerIp?: Input<number>;
|
|
580
|
+
/**
|
|
581
|
+
* Configure which AWS managed rule groups to enable.
|
|
582
|
+
*
|
|
583
|
+
* @default All managed rules enabled
|
|
584
|
+
* @example
|
|
585
|
+
* ```js
|
|
586
|
+
* {
|
|
587
|
+
* waf: {
|
|
588
|
+
* managedRules: {
|
|
589
|
+
* coreRuleSet: true,
|
|
590
|
+
* knownBadInputs: true,
|
|
591
|
+
* sqlInjection: false
|
|
592
|
+
* }
|
|
593
|
+
* }
|
|
594
|
+
* }
|
|
595
|
+
* ```
|
|
596
|
+
*/
|
|
597
|
+
managedRules?: Input<{
|
|
598
|
+
/**
|
|
599
|
+
* Enable the AWS Core Rule Set (CRS) which provides protection against common
|
|
600
|
+
* web vulnerabilities.
|
|
601
|
+
* @default `true`
|
|
602
|
+
*/
|
|
603
|
+
coreRuleSet?: Input<boolean>;
|
|
604
|
+
/**
|
|
605
|
+
* Enable protection against known bad inputs, including Log4j vulnerabilities.
|
|
606
|
+
* @default `true`
|
|
607
|
+
*/
|
|
608
|
+
knownBadInputs?: Input<boolean>;
|
|
609
|
+
/**
|
|
610
|
+
* Enable SQL injection protection.
|
|
611
|
+
* @default `true`
|
|
612
|
+
*/
|
|
613
|
+
sqlInjection?: Input<boolean>;
|
|
614
|
+
}>;
|
|
615
|
+
/**
|
|
616
|
+
* Configure WAF logging to CloudWatch. When set to `true`, all WAF-evaluated
|
|
617
|
+
* requests are logged with a 1-month retention. Or pass in an object to
|
|
618
|
+
* customize what is logged, how long logs are retained, and which fields
|
|
619
|
+
* are redacted.
|
|
620
|
+
*
|
|
621
|
+
* :::tip
|
|
622
|
+
* WAF logging is off by default. Enabling it will incur additional
|
|
623
|
+
* [CloudWatch costs](https://aws.amazon.com/cloudwatch/pricing/) depending
|
|
624
|
+
* on log volume.
|
|
625
|
+
* :::
|
|
626
|
+
*
|
|
627
|
+
* @default Logging is disabled
|
|
628
|
+
* @example
|
|
629
|
+
*
|
|
630
|
+
* Enable with defaults.
|
|
631
|
+
*
|
|
632
|
+
* ```js
|
|
633
|
+
* {
|
|
634
|
+
* waf: {
|
|
635
|
+
* logging: true
|
|
636
|
+
* }
|
|
637
|
+
* }
|
|
638
|
+
* ```
|
|
639
|
+
*
|
|
640
|
+
* Only log blocked requests.
|
|
641
|
+
*
|
|
642
|
+
* ```js
|
|
643
|
+
* {
|
|
644
|
+
* waf: {
|
|
645
|
+
* logging: {
|
|
646
|
+
* include: "blocked",
|
|
647
|
+
* retention: "3 months"
|
|
648
|
+
* }
|
|
649
|
+
* }
|
|
650
|
+
* }
|
|
651
|
+
* ```
|
|
652
|
+
*
|
|
653
|
+
* Redact sensitive fields.
|
|
654
|
+
*
|
|
655
|
+
* ```js
|
|
656
|
+
* {
|
|
657
|
+
* waf: {
|
|
658
|
+
* logging: {
|
|
659
|
+
* redact: {
|
|
660
|
+
* queryString: true,
|
|
661
|
+
* headers: ["cookie"]
|
|
662
|
+
* }
|
|
663
|
+
* }
|
|
664
|
+
* }
|
|
665
|
+
* }
|
|
666
|
+
* ```
|
|
667
|
+
*/
|
|
668
|
+
logging?: Input<boolean | WafLoggingArgs>;
|
|
669
|
+
}
|
|
670
|
+
export interface RouterArgs {
|
|
671
|
+
/**
|
|
672
|
+
* Set a custom domain for your Router.
|
|
673
|
+
*
|
|
674
|
+
* Automatically manages domains hosted on AWS Route 53, Cloudflare, and Vercel. For other
|
|
675
|
+
* providers, you'll need to pass in a `cert` that validates domain ownership and add the
|
|
676
|
+
* DNS records.
|
|
677
|
+
*
|
|
678
|
+
* :::tip
|
|
679
|
+
* Built-in support for AWS Route 53, Cloudflare, and Vercel. And manual setup for other
|
|
680
|
+
* providers.
|
|
681
|
+
* :::
|
|
682
|
+
*
|
|
683
|
+
* @example
|
|
684
|
+
*
|
|
685
|
+
* By default this assumes the domain is hosted on Route 53.
|
|
686
|
+
*
|
|
687
|
+
* ```js
|
|
688
|
+
* {
|
|
689
|
+
* domain: "example.com"
|
|
690
|
+
* }
|
|
691
|
+
* ```
|
|
692
|
+
*
|
|
693
|
+
* For domains hosted on Cloudflare.
|
|
694
|
+
*
|
|
695
|
+
* ```js
|
|
696
|
+
* {
|
|
697
|
+
* domain: {
|
|
698
|
+
* name: "example.com",
|
|
699
|
+
* dns: sst.cloudflare.dns()
|
|
700
|
+
* }
|
|
701
|
+
* }
|
|
702
|
+
* ```
|
|
703
|
+
*
|
|
704
|
+
* Specify a `www.` version of the custom domain.
|
|
705
|
+
*
|
|
706
|
+
* ```js
|
|
707
|
+
* {
|
|
708
|
+
* domain: {
|
|
709
|
+
* name: "domain.com",
|
|
710
|
+
* redirects: ["www.domain.com"]
|
|
711
|
+
* }
|
|
712
|
+
* }
|
|
713
|
+
* ```
|
|
714
|
+
*/
|
|
715
|
+
domain?: CdnArgs["domain"];
|
|
716
|
+
/**
|
|
717
|
+
* A map of routes to their destinations.
|
|
718
|
+
*
|
|
719
|
+
* @deprecated Use the `route` and `routeBucket` functions instead. These
|
|
720
|
+
* functions provide a more flexible API for routing to URLs and buckets. They
|
|
721
|
+
* also allow routing based on both domain and path patterns.
|
|
722
|
+
*
|
|
723
|
+
* The _key_ is the route path and the _value_ can be:
|
|
724
|
+
*
|
|
725
|
+
* - The destination URL as a string
|
|
726
|
+
* - Or, an object with
|
|
727
|
+
* - Args for a URL route
|
|
728
|
+
* - Args for a bucket route
|
|
729
|
+
*
|
|
730
|
+
* :::note
|
|
731
|
+
* All routes need to start with `/`.
|
|
732
|
+
* :::
|
|
733
|
+
*
|
|
734
|
+
* For example, you can set the destination as a URL.
|
|
735
|
+
*
|
|
736
|
+
* ```ts
|
|
737
|
+
* {
|
|
738
|
+
* routes: {
|
|
739
|
+
* "/*": "https://example.com"
|
|
740
|
+
* }
|
|
741
|
+
* }
|
|
742
|
+
* ```
|
|
743
|
+
*
|
|
744
|
+
* Or, you can route to a bucket.
|
|
745
|
+
*
|
|
746
|
+
* ```ts
|
|
747
|
+
* {
|
|
748
|
+
* routes: {
|
|
749
|
+
* "/files/*": {
|
|
750
|
+
* bucket: myBucket
|
|
751
|
+
* }
|
|
752
|
+
* }
|
|
753
|
+
* }
|
|
754
|
+
* ```
|
|
755
|
+
*
|
|
756
|
+
* When router receives a request, the requested path is compared with path patterns
|
|
757
|
+
* in the order they are listed. The first match determines which URL the
|
|
758
|
+
* request is routed to.
|
|
759
|
+
*
|
|
760
|
+
* :::tip[Default Route]
|
|
761
|
+
* The `/*` route is a default or catch-all route.
|
|
762
|
+
* :::
|
|
763
|
+
*
|
|
764
|
+
* The `/*` route is a _default_ route, meaning that if no routes match, the `/*` route will be used. It does not matter where the `/*` route is listed in the routes object.
|
|
765
|
+
*
|
|
766
|
+
* :::note
|
|
767
|
+
* If you don't have a `/*` route, you'll get a 404 error for any requests that don't match a route.
|
|
768
|
+
* :::
|
|
769
|
+
*
|
|
770
|
+
* Suppose you have the following three routes.
|
|
771
|
+
*
|
|
772
|
+
* ```js
|
|
773
|
+
* {
|
|
774
|
+
* routes: {
|
|
775
|
+
* "/api/*.json": "https://example1.com",
|
|
776
|
+
* "/api/*": "https://example2.com",
|
|
777
|
+
* "/*.xml": "https://example3.com",
|
|
778
|
+
* }
|
|
779
|
+
* }
|
|
780
|
+
* ```
|
|
781
|
+
*
|
|
782
|
+
* A request to `/api/sample.xml` will match `/api/*` first and route to it; even though it matches `/*.xml`.
|
|
783
|
+
*
|
|
784
|
+
* However for this case, a request to `/api/users` will route to `/api/*` even though it comes after `/*`. This is because the `/*` route is the default route.
|
|
785
|
+
*
|
|
786
|
+
* ```js
|
|
787
|
+
* {
|
|
788
|
+
* routes: {
|
|
789
|
+
* "/*": "myapp.com",
|
|
790
|
+
* "/api/*": myFunction.url
|
|
791
|
+
* }
|
|
792
|
+
* }
|
|
793
|
+
* ```
|
|
794
|
+
*
|
|
795
|
+
* You can also customize the route behavior with injecting some code into the CloudFront
|
|
796
|
+
* Functions. To do so, pass in an object, with the destination as the `url`.
|
|
797
|
+
*
|
|
798
|
+
* ```ts
|
|
799
|
+
* {
|
|
800
|
+
* routes: {
|
|
801
|
+
* "/*": {
|
|
802
|
+
* url: "https://example.com",
|
|
803
|
+
* edge: {
|
|
804
|
+
* viewerRequest: {
|
|
805
|
+
* injection: `event.request.headers["x-foo"] = { value: "bar" };`
|
|
806
|
+
* }
|
|
807
|
+
* }
|
|
808
|
+
* }
|
|
809
|
+
* }
|
|
810
|
+
* }
|
|
811
|
+
* ```
|
|
812
|
+
*
|
|
813
|
+
* You can also `rewrite` the request path.
|
|
814
|
+
*
|
|
815
|
+
* ```ts
|
|
816
|
+
* {
|
|
817
|
+
* routes: {
|
|
818
|
+
* "/files/*": {
|
|
819
|
+
* bucket: myBucket,
|
|
820
|
+
* rewrite: {
|
|
821
|
+
* regex: "^/files/(.*)$",
|
|
822
|
+
* to: "/$1"
|
|
823
|
+
* }
|
|
824
|
+
* }
|
|
825
|
+
* }
|
|
826
|
+
* }
|
|
827
|
+
* ```
|
|
828
|
+
*/
|
|
829
|
+
routes?: Input<Record<string, Input<string | InlineUrlRouteArgs | InlineRouterBucketRouteArgs>>>;
|
|
830
|
+
/**
|
|
831
|
+
* Configure CloudFront Functions to customize the behavior of HTTP requests and responses at the edge.
|
|
832
|
+
*/
|
|
833
|
+
edge?: {
|
|
834
|
+
/**
|
|
835
|
+
* Configure the viewer request function.
|
|
836
|
+
*
|
|
837
|
+
* The viewer request function can be used to modify incoming requests before they
|
|
838
|
+
* reach your origin server. For example, you can redirect users, rewrite URLs,
|
|
839
|
+
* or add headers.
|
|
840
|
+
*/
|
|
841
|
+
viewerRequest?: Input<{
|
|
842
|
+
/**
|
|
843
|
+
* The code to inject into the viewer request function.
|
|
844
|
+
*
|
|
845
|
+
* By default, a viewer request function is created to:
|
|
846
|
+
* - Disable CloudFront default URL if custom domain is set.
|
|
847
|
+
* - Add the `x-forwarded-host` header.
|
|
848
|
+
* - Route requests to the corresponding target based on the domain and request path.
|
|
849
|
+
*
|
|
850
|
+
* The given code will be injected at the beginning of this function.
|
|
851
|
+
*
|
|
852
|
+
* ```js
|
|
853
|
+
* async function handler(event) {
|
|
854
|
+
* // User injected code
|
|
855
|
+
*
|
|
856
|
+
* // Default behavior code
|
|
857
|
+
*
|
|
858
|
+
* return event.request;
|
|
859
|
+
* }
|
|
860
|
+
* ```
|
|
861
|
+
*
|
|
862
|
+
* @example
|
|
863
|
+
* To add a custom header to all requests.
|
|
864
|
+
*
|
|
865
|
+
* ```js
|
|
866
|
+
* {
|
|
867
|
+
* edge: {
|
|
868
|
+
* viewerRequest: {
|
|
869
|
+
* injection: `event.request.headers["x-foo"] = { value: "bar" };`
|
|
870
|
+
* }
|
|
871
|
+
* }
|
|
872
|
+
* }
|
|
873
|
+
* ```
|
|
874
|
+
*/
|
|
875
|
+
injection: Input<string>;
|
|
876
|
+
/**
|
|
877
|
+
* The KeyValueStore to associate with the viewer request function.
|
|
878
|
+
*
|
|
879
|
+
* @example
|
|
880
|
+
* ```js
|
|
881
|
+
* {
|
|
882
|
+
* edge: {
|
|
883
|
+
* viewerRequest: {
|
|
884
|
+
* kvStore: "arn:aws:cloudfront::123456789012:key-value-store/my-store"
|
|
885
|
+
* }
|
|
886
|
+
* }
|
|
887
|
+
* }
|
|
888
|
+
* ```
|
|
889
|
+
*/
|
|
890
|
+
kvStore?: Input<string>;
|
|
891
|
+
}>;
|
|
892
|
+
/**
|
|
893
|
+
* Configure the viewer response function.
|
|
894
|
+
*
|
|
895
|
+
* The viewer response function can be used to modify outgoing responses before
|
|
896
|
+
* they are sent to the client. For example, you can add security headers or change
|
|
897
|
+
* the response status code.
|
|
898
|
+
*
|
|
899
|
+
* By default, no viewer response function is set. A new function will be created
|
|
900
|
+
* with the provided code.
|
|
901
|
+
*/
|
|
902
|
+
viewerResponse?: Input<{
|
|
903
|
+
/**
|
|
904
|
+
* The code to inject into the viewer response function.
|
|
905
|
+
*
|
|
906
|
+
* ```js
|
|
907
|
+
* async function handler(event) {
|
|
908
|
+
* // User injected code
|
|
909
|
+
*
|
|
910
|
+
* return event.response;
|
|
911
|
+
* }
|
|
912
|
+
* ```
|
|
913
|
+
*
|
|
914
|
+
* @example
|
|
915
|
+
* To add a custom header to all responses.
|
|
916
|
+
*
|
|
917
|
+
* ```js
|
|
918
|
+
* {
|
|
919
|
+
* edge: {
|
|
920
|
+
* viewerResponse: {
|
|
921
|
+
* injection: `event.response.headers["x-foo"] = { value: "bar" };`
|
|
922
|
+
* }
|
|
923
|
+
* }
|
|
924
|
+
* }
|
|
925
|
+
* ```
|
|
926
|
+
*/
|
|
927
|
+
injection: Input<string>;
|
|
928
|
+
/**
|
|
929
|
+
* The KeyValueStore to associate with the viewer response function.
|
|
930
|
+
*
|
|
931
|
+
* @example
|
|
932
|
+
* ```js
|
|
933
|
+
* {
|
|
934
|
+
* edge: {
|
|
935
|
+
* viewerResponse: {
|
|
936
|
+
* kvStore: "arn:aws:cloudfront::123456789012:key-value-store/my-store"
|
|
937
|
+
* }
|
|
938
|
+
* }
|
|
939
|
+
* }
|
|
940
|
+
* ```
|
|
941
|
+
*/
|
|
942
|
+
kvStore?: Input<string>;
|
|
943
|
+
}>;
|
|
944
|
+
};
|
|
945
|
+
/**
|
|
946
|
+
* Configure how the CloudFront cache invalidations are handled.
|
|
947
|
+
* :::tip
|
|
948
|
+
* You get 1000 free invalidations per month. After that you pay $0.005 per invalidation path. [Read more here](https://aws.amazon.com/cloudfront/pricing/).
|
|
949
|
+
* :::
|
|
950
|
+
* @default Invalidation is turned off
|
|
951
|
+
* @example
|
|
952
|
+
* Setting this to `true` will invalidate all paths. It's equivalent
|
|
953
|
+
* to passing in `{ paths: ["/*"] }`.
|
|
954
|
+
*
|
|
955
|
+
* ```js
|
|
956
|
+
* {
|
|
957
|
+
* invalidation: true
|
|
958
|
+
* }
|
|
959
|
+
* ```
|
|
960
|
+
*/
|
|
961
|
+
invalidation?: Input<boolean | {
|
|
962
|
+
/**
|
|
963
|
+
* Configure if `sst deploy` should wait for the CloudFront cache invalidation to finish.
|
|
964
|
+
*
|
|
965
|
+
* :::tip
|
|
966
|
+
* For non-prod environments it might make sense to pass in `false`.
|
|
967
|
+
* :::
|
|
968
|
+
*
|
|
969
|
+
* Waiting for this process to finish ensures that new content will be available after the deploy finishes. However, this process can sometimes take more than 5 mins.
|
|
970
|
+
* @default `false`
|
|
971
|
+
* @example
|
|
972
|
+
* ```js
|
|
973
|
+
* {
|
|
974
|
+
* invalidation: {
|
|
975
|
+
* wait: true
|
|
976
|
+
* }
|
|
977
|
+
* }
|
|
978
|
+
* ```
|
|
979
|
+
*/
|
|
980
|
+
wait?: Input<boolean>;
|
|
981
|
+
/**
|
|
982
|
+
* A token used to determine if the cache should be invalidated. If the
|
|
983
|
+
* token is the same as the previous deployment, the cache will not be invalidated.
|
|
984
|
+
*
|
|
985
|
+
* You can set this to a hash that's computed on every deploy. So if the hash
|
|
986
|
+
* changes, the cache will be invalidated.
|
|
987
|
+
*
|
|
988
|
+
* @default A unique value is auto-generated on each deploy
|
|
989
|
+
* @example
|
|
990
|
+
* ```js
|
|
991
|
+
* {
|
|
992
|
+
* invalidation: {
|
|
993
|
+
* token: "foo123"
|
|
994
|
+
* }
|
|
995
|
+
* }
|
|
996
|
+
* ```
|
|
997
|
+
*/
|
|
998
|
+
token?: Input<string>;
|
|
999
|
+
/**
|
|
1000
|
+
* Specify an array of glob pattern of paths to invalidate.
|
|
1001
|
+
*
|
|
1002
|
+
* :::note
|
|
1003
|
+
* Each glob pattern counts as a single invalidation. Whereas, invalidating
|
|
1004
|
+
* `/*` counts as a single invalidation.
|
|
1005
|
+
* :::
|
|
1006
|
+
* @default `["/*"]`
|
|
1007
|
+
* @example
|
|
1008
|
+
* Invalidate the `index.html` and all files under the `products/` route.
|
|
1009
|
+
* ```js
|
|
1010
|
+
* {
|
|
1011
|
+
* invalidation: {
|
|
1012
|
+
* paths: ["/index.html", "/products/*"]
|
|
1013
|
+
* }
|
|
1014
|
+
* }
|
|
1015
|
+
* ```
|
|
1016
|
+
* This counts as two invalidations.
|
|
1017
|
+
*/
|
|
1018
|
+
paths?: Input<Input<string>[]>;
|
|
1019
|
+
}>;
|
|
1020
|
+
/**
|
|
1021
|
+
* Configure Lambda function URL protection through CloudFront Origin Access Control.
|
|
1022
|
+
*
|
|
1023
|
+
* When set, all Functions and SSR sites routing through this Router automatically
|
|
1024
|
+
* inherit the protection mode.
|
|
1025
|
+
*
|
|
1026
|
+
* @default `"none"`
|
|
1027
|
+
*
|
|
1028
|
+
* The available options are:
|
|
1029
|
+
* - `"none"`: Lambda URLs are publicly accessible.
|
|
1030
|
+
* - `"oac"`: Lambda URLs protected by CloudFront Origin Access Control. Requires
|
|
1031
|
+
* manual `x-amz-content-sha256` header for POST requests.
|
|
1032
|
+
* - `"oac-with-edge-signing"`: Full protection with automatic header signing via
|
|
1033
|
+
* Lambda@Edge. Works with external webhooks and callbacks. Higher cost and latency
|
|
1034
|
+
* but works out of the box.
|
|
1035
|
+
*
|
|
1036
|
+
* :::note
|
|
1037
|
+
* Switching from `"none"` to `"oac"` or `"oac-with-edge-signing"` may cause brief
|
|
1038
|
+
* 403 errors (~10-60s) during deployment while CloudFront edge nodes pick up the new
|
|
1039
|
+
* signing configuration. For zero-disruption upgrades, set `protection` when first
|
|
1040
|
+
* creating the Router.
|
|
1041
|
+
* :::
|
|
1042
|
+
*
|
|
1043
|
+
* :::note
|
|
1044
|
+
* When using `"oac-with-edge-signing"`, request bodies are limited to 1MB due to
|
|
1045
|
+
* Lambda@Edge payload limits. For file uploads larger than 1MB, consider using
|
|
1046
|
+
* presigned S3 URLs or the `"oac"` mode with manual header signing.
|
|
1047
|
+
* :::
|
|
1048
|
+
*
|
|
1049
|
+
* :::note
|
|
1050
|
+
* When removing a stage that uses `"oac-with-edge-signing"`, deletion may take
|
|
1051
|
+
* 5-10 minutes while AWS removes the Lambda@Edge replicated functions from all
|
|
1052
|
+
* edge locations.
|
|
1053
|
+
* :::
|
|
1054
|
+
*
|
|
1055
|
+
* @example
|
|
1056
|
+
* ```js
|
|
1057
|
+
* {
|
|
1058
|
+
* protection: "oac"
|
|
1059
|
+
* }
|
|
1060
|
+
* ```
|
|
1061
|
+
*
|
|
1062
|
+
* @example
|
|
1063
|
+
* ```js
|
|
1064
|
+
* {
|
|
1065
|
+
* protection: "oac-with-edge-signing"
|
|
1066
|
+
* }
|
|
1067
|
+
* ```
|
|
1068
|
+
*
|
|
1069
|
+
* @example
|
|
1070
|
+
* ```js
|
|
1071
|
+
* // Custom Lambda@Edge configuration
|
|
1072
|
+
* {
|
|
1073
|
+
* protection: {
|
|
1074
|
+
* mode: "oac-with-edge-signing",
|
|
1075
|
+
* edgeFunction: {
|
|
1076
|
+
* memory: "256 MB",
|
|
1077
|
+
* timeout: "10 seconds"
|
|
1078
|
+
* }
|
|
1079
|
+
* }
|
|
1080
|
+
* }
|
|
1081
|
+
* ```
|
|
1082
|
+
*/
|
|
1083
|
+
protection?: Input<"none" | "oac" | "oac-with-edge-signing" | {
|
|
1084
|
+
mode: "oac-with-edge-signing";
|
|
1085
|
+
edgeFunction?: {
|
|
1086
|
+
/**
|
|
1087
|
+
* Custom Lambda@Edge function ARN to use for request signing.
|
|
1088
|
+
* If provided, this function will be used instead of creating a new one.
|
|
1089
|
+
* Must be a qualified ARN (with version) and deployed in us-east-1.
|
|
1090
|
+
*/
|
|
1091
|
+
arn?: Input<FunctionArn>;
|
|
1092
|
+
/**
|
|
1093
|
+
* Memory size for the auto-created Lambda@Edge function.
|
|
1094
|
+
* Only used when arn is not provided.
|
|
1095
|
+
* @default `"128 MB"`
|
|
1096
|
+
*/
|
|
1097
|
+
memory?: Input<Size>;
|
|
1098
|
+
/**
|
|
1099
|
+
* Timeout for the auto-created Lambda@Edge function.
|
|
1100
|
+
* Only used when arn is not provided.
|
|
1101
|
+
* @default `"5 seconds"`
|
|
1102
|
+
*/
|
|
1103
|
+
timeout?: Input<DurationSeconds>;
|
|
1104
|
+
};
|
|
1105
|
+
}>;
|
|
1106
|
+
/**
|
|
1107
|
+
* Enable AWS WAF (Web Application Firewall) to protect your Router from common
|
|
1108
|
+
* web exploits and bots.
|
|
1109
|
+
*
|
|
1110
|
+
* :::tip
|
|
1111
|
+
* WAF provides protection against SQL injection, cross-site scripting (XSS),
|
|
1112
|
+
* and other common attacks.
|
|
1113
|
+
* :::
|
|
1114
|
+
*
|
|
1115
|
+
* @default WAF is disabled
|
|
1116
|
+
* @example
|
|
1117
|
+
*
|
|
1118
|
+
* Enable with sensible defaults.
|
|
1119
|
+
*
|
|
1120
|
+
* ```js
|
|
1121
|
+
* {
|
|
1122
|
+
* waf: true
|
|
1123
|
+
* }
|
|
1124
|
+
* ```
|
|
1125
|
+
*
|
|
1126
|
+
* Or customize the configuration.
|
|
1127
|
+
*
|
|
1128
|
+
* ```js
|
|
1129
|
+
* {
|
|
1130
|
+
* waf: {
|
|
1131
|
+
* rateLimitPerIp: 1000,
|
|
1132
|
+
* managedRules: {
|
|
1133
|
+
* coreRuleSet: true,
|
|
1134
|
+
* knownBadInputs: true,
|
|
1135
|
+
* sqlInjection: true
|
|
1136
|
+
* }
|
|
1137
|
+
* }
|
|
1138
|
+
* }
|
|
1139
|
+
* ```
|
|
1140
|
+
*/
|
|
1141
|
+
waf?: Input<boolean | WafArgs>;
|
|
1142
|
+
/**
|
|
1143
|
+
* [Transform](/docs/components#transform) how this component creates its underlying
|
|
1144
|
+
* resources.
|
|
1145
|
+
*/
|
|
1146
|
+
transform?: {
|
|
1147
|
+
/**
|
|
1148
|
+
* Transform the Cache Policy that's attached to each CloudFront behavior.
|
|
1149
|
+
*/
|
|
1150
|
+
cachePolicy?: Transform<cloudfront.CachePolicyArgs>;
|
|
1151
|
+
/**
|
|
1152
|
+
* Transform the CloudFront CDN resource.
|
|
1153
|
+
*/
|
|
1154
|
+
cdn?: Transform<CdnArgs>;
|
|
1155
|
+
/**
|
|
1156
|
+
* Transform the WAF WebACL resource.
|
|
1157
|
+
*/
|
|
1158
|
+
waf?: Transform<wafv2.WebAclArgs>;
|
|
1159
|
+
/**
|
|
1160
|
+
* Transform the CloudWatch LogGroup resource used for WAF logs.
|
|
1161
|
+
*/
|
|
1162
|
+
wafLogGroup?: Transform<cloudwatch.LogGroupArgs>;
|
|
1163
|
+
/**
|
|
1164
|
+
* Transform the WAF WebACL logging configuration resource.
|
|
1165
|
+
*/
|
|
1166
|
+
wafLogging?: Transform<wafv2.WebAclLoggingConfigurationArgs>;
|
|
1167
|
+
};
|
|
1168
|
+
/**
|
|
1169
|
+
* @internal
|
|
1170
|
+
*/
|
|
1171
|
+
_skipHint?: boolean;
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* The `Router` component lets you use a CloudFront distribution to direct
|
|
1175
|
+
* requests to various parts of your application like:
|
|
1176
|
+
*
|
|
1177
|
+
* - A URL
|
|
1178
|
+
* - A function
|
|
1179
|
+
* - A frontend
|
|
1180
|
+
* - An S3 bucket
|
|
1181
|
+
*
|
|
1182
|
+
* @example
|
|
1183
|
+
*
|
|
1184
|
+
* #### Minimal example
|
|
1185
|
+
*
|
|
1186
|
+
* ```ts title="sst.config.ts"
|
|
1187
|
+
* new sst.aws.Router("MyRouter");
|
|
1188
|
+
* ```
|
|
1189
|
+
*
|
|
1190
|
+
* #### Add a custom domain
|
|
1191
|
+
*
|
|
1192
|
+
* ```ts {2} title="sst.config.ts"
|
|
1193
|
+
* new sst.aws.Router("MyRouter", {
|
|
1194
|
+
* domain: "myapp.com"
|
|
1195
|
+
* });
|
|
1196
|
+
* ```
|
|
1197
|
+
*
|
|
1198
|
+
* #### Sharing the router across stages
|
|
1199
|
+
*
|
|
1200
|
+
* ```ts title="sst.config.ts"
|
|
1201
|
+
* const router = $app.stage === "production"
|
|
1202
|
+
* ? new sst.aws.Router("MyRouter", {
|
|
1203
|
+
* domain: {
|
|
1204
|
+
* name: "example.com",
|
|
1205
|
+
* aliases: ["*.example.com"]
|
|
1206
|
+
* }
|
|
1207
|
+
* })
|
|
1208
|
+
* : sst.aws.Router.get("MyRouter", "E1XWRGCYGTFB7Z");
|
|
1209
|
+
* ```
|
|
1210
|
+
*
|
|
1211
|
+
* #### Route to a URL
|
|
1212
|
+
*
|
|
1213
|
+
* ```ts title="sst.config.ts" {3}
|
|
1214
|
+
* const router = new sst.aws.Router("MyRouter");
|
|
1215
|
+
*
|
|
1216
|
+
* router.route("/", "https://some-external-service.com");
|
|
1217
|
+
* ```
|
|
1218
|
+
*
|
|
1219
|
+
* #### Route to an S3 bucket
|
|
1220
|
+
*
|
|
1221
|
+
* ```ts title="sst.config.ts" {2,6}
|
|
1222
|
+
* const myBucket = new sst.aws.Bucket("MyBucket", {
|
|
1223
|
+
* access: "cloudfront"
|
|
1224
|
+
* });
|
|
1225
|
+
*
|
|
1226
|
+
* const router = new sst.aws.Router("MyRouter");
|
|
1227
|
+
* router.routeBucket("/files", myBucket);
|
|
1228
|
+
* ```
|
|
1229
|
+
*
|
|
1230
|
+
* You need to allow CloudFront to access the bucket by setting the `access` prop
|
|
1231
|
+
* on the bucket.
|
|
1232
|
+
*
|
|
1233
|
+
* #### Route to a function
|
|
1234
|
+
*
|
|
1235
|
+
* ```ts title="sst.config.ts" {8-11}
|
|
1236
|
+
* const router = new sst.aws.Router("MyRouter", {
|
|
1237
|
+
* domain: "example.com"
|
|
1238
|
+
* });
|
|
1239
|
+
*
|
|
1240
|
+
* const myFunction = new sst.aws.Function("MyFunction", {
|
|
1241
|
+
* handler: "src/api.handler",
|
|
1242
|
+
* url: {
|
|
1243
|
+
* router: {
|
|
1244
|
+
* instance: router,
|
|
1245
|
+
* path: "/api"
|
|
1246
|
+
* }
|
|
1247
|
+
* }
|
|
1248
|
+
* });
|
|
1249
|
+
* ```
|
|
1250
|
+
*
|
|
1251
|
+
* Setting the route through the function, instead of `router.route()` makes
|
|
1252
|
+
* it so that `myFunction.url` gives you the URL based on the Router domain.
|
|
1253
|
+
*
|
|
1254
|
+
* #### Route to a frontend
|
|
1255
|
+
*
|
|
1256
|
+
* ```ts title="sst.config.ts" {4-6}
|
|
1257
|
+
* const router = new sst.aws.Router("MyRouter");
|
|
1258
|
+
*
|
|
1259
|
+
* const mySite = new sst.aws.Nextjs("MyWeb", {
|
|
1260
|
+
* router: {
|
|
1261
|
+
* instance: router
|
|
1262
|
+
* }
|
|
1263
|
+
* });
|
|
1264
|
+
* ```
|
|
1265
|
+
*
|
|
1266
|
+
* Setting the route through the site, instead of `router.route()` makes
|
|
1267
|
+
* it so that `mySite.url` gives you the URL based on the Router domain.
|
|
1268
|
+
*
|
|
1269
|
+
* #### Route to a frontend on a path
|
|
1270
|
+
*
|
|
1271
|
+
* ```ts title="sst.config.ts" {4-7}
|
|
1272
|
+
* const router = new sst.aws.Router("MyRouter");
|
|
1273
|
+
*
|
|
1274
|
+
* new sst.aws.Nextjs("MyWeb", {
|
|
1275
|
+
* router: {
|
|
1276
|
+
* instance: router,
|
|
1277
|
+
* path: "/docs"
|
|
1278
|
+
* }
|
|
1279
|
+
* });
|
|
1280
|
+
* ```
|
|
1281
|
+
*
|
|
1282
|
+
* If you are routing to a path, you'll need to configure the base path in your
|
|
1283
|
+
* frontend app as well. [Learn more](/docs/component/aws/nextjs/#router).
|
|
1284
|
+
*
|
|
1285
|
+
* #### Route to a frontend on a subdomain
|
|
1286
|
+
*
|
|
1287
|
+
* ```ts title="sst.config.ts" {4,9-12}
|
|
1288
|
+
* const router = new sst.aws.Router("MyRouter", {
|
|
1289
|
+
* domain: {
|
|
1290
|
+
* name: "example.com",
|
|
1291
|
+
* aliases: ["*.example.com"]
|
|
1292
|
+
* }
|
|
1293
|
+
* });
|
|
1294
|
+
*
|
|
1295
|
+
* new sst.aws.Nextjs("MyWeb", {
|
|
1296
|
+
* router: {
|
|
1297
|
+
* instance: router,
|
|
1298
|
+
* domain: "docs.example.com"
|
|
1299
|
+
* }
|
|
1300
|
+
* });
|
|
1301
|
+
* ```
|
|
1302
|
+
*
|
|
1303
|
+
* We configure `*.example.com` as an alias so that we can route to a subdomain.
|
|
1304
|
+
*
|
|
1305
|
+
* #### How it works
|
|
1306
|
+
*
|
|
1307
|
+
* This uses a CloudFront KeyValueStore to store the routing data and a CloudFront
|
|
1308
|
+
* function to route the request. As routes are added, the store is updated.
|
|
1309
|
+
*
|
|
1310
|
+
* So when a request comes in, it does a lookup in the store and dynamically sets
|
|
1311
|
+
* the origin based on the routing data. For frontends, that have their server
|
|
1312
|
+
* functions deployed to multiple `regions`, it routes to the closest region based
|
|
1313
|
+
* on the user's location.
|
|
1314
|
+
*
|
|
1315
|
+
* You might notice a _placeholder.sst.dev_ behavior in CloudFront. This is not
|
|
1316
|
+
* used and is only there because CloudFront requires a default behavior.
|
|
1317
|
+
*
|
|
1318
|
+
* #### Limits
|
|
1319
|
+
*
|
|
1320
|
+
* There are some limits on this setup but it's managed by SST.
|
|
1321
|
+
*
|
|
1322
|
+
* - The CloudFront function can be a maximum of 10KB in size. But because all
|
|
1323
|
+
* the route data is stored in the KeyValueStore, the function can be kept small.
|
|
1324
|
+
* - Each value in the KeyValueStore needs to be less than 1KB. This component
|
|
1325
|
+
* splits the routes into multiple values to keep it under the limit.
|
|
1326
|
+
* - The KeyValueStore can be a maximum of 5MB. This is fairly large. But to
|
|
1327
|
+
* handle sites that have a lot of files, only top-level assets get individual
|
|
1328
|
+
* entries. Folders with prerendered routes are the exception: their files get
|
|
1329
|
+
* entries too, up to 1MB per site, so they don't hide server routes.
|
|
1330
|
+
*/
|
|
1331
|
+
export declare class Router extends Component implements Link.Linkable {
|
|
1332
|
+
private constructorName;
|
|
1333
|
+
private constructorOpts;
|
|
1334
|
+
private cdn;
|
|
1335
|
+
private kvStoreArn?;
|
|
1336
|
+
private kvNamespace?;
|
|
1337
|
+
private hasInlineRoutes;
|
|
1338
|
+
private _protectionMode;
|
|
1339
|
+
constructor(name: string, args?: RouterArgs, opts?: ComponentResourceOptions);
|
|
1340
|
+
/**
|
|
1341
|
+
* The ID of the Router distribution.
|
|
1342
|
+
*/
|
|
1343
|
+
get distributionID(): Output<string>;
|
|
1344
|
+
/**
|
|
1345
|
+
* The URL of the Router.
|
|
1346
|
+
*
|
|
1347
|
+
* If the `domain` is set, this is the URL with the custom domain.
|
|
1348
|
+
* Otherwise, it's the auto-generated CloudFront URL.
|
|
1349
|
+
*/
|
|
1350
|
+
get url(): Output<string>;
|
|
1351
|
+
/** @internal */
|
|
1352
|
+
get _kvStoreArn(): Output<string> | undefined;
|
|
1353
|
+
/** @internal */
|
|
1354
|
+
get _kvNamespace(): Output<string> | undefined;
|
|
1355
|
+
/** @internal */
|
|
1356
|
+
get _hasInlineRoutes(): import("@pulumi/pulumi").OutputInstance<boolean>;
|
|
1357
|
+
/** @internal */
|
|
1358
|
+
get _protection(): Output<ProtectionConfig>;
|
|
1359
|
+
/** @internal */
|
|
1360
|
+
get _distributionArn(): Output<string>;
|
|
1361
|
+
/**
|
|
1362
|
+
* The underlying [resources](/docs/components/#nodes) this component creates.
|
|
1363
|
+
*/
|
|
1364
|
+
get nodes(): {
|
|
1365
|
+
/**
|
|
1366
|
+
* The Amazon CloudFront CDN resource.
|
|
1367
|
+
*/
|
|
1368
|
+
cdn: Output<Cdn>;
|
|
1369
|
+
};
|
|
1370
|
+
/**
|
|
1371
|
+
* Add a route to a destination URL.
|
|
1372
|
+
*
|
|
1373
|
+
* @param pattern The path prefix to match for this route.
|
|
1374
|
+
* @param url The destination URL to route matching requests to.
|
|
1375
|
+
* @param args Configure the route.
|
|
1376
|
+
*
|
|
1377
|
+
* @example
|
|
1378
|
+
*
|
|
1379
|
+
* You can match a route based on:
|
|
1380
|
+
*
|
|
1381
|
+
* - A path prefix like `/api`
|
|
1382
|
+
* - A domain pattern like `api.example.com`
|
|
1383
|
+
* - A combined pattern like `dev.example.com/api`
|
|
1384
|
+
*
|
|
1385
|
+
* For example, to match a path prefix.
|
|
1386
|
+
*
|
|
1387
|
+
* ```ts title="sst.config.ts"
|
|
1388
|
+
* router.route("/api", "https://api.example.com");
|
|
1389
|
+
* ```
|
|
1390
|
+
*
|
|
1391
|
+
* Or match a domain.
|
|
1392
|
+
*
|
|
1393
|
+
* ```ts title="sst.config.ts"
|
|
1394
|
+
* router.route("api.myapp.com/", "https://api.example.com");
|
|
1395
|
+
* ```
|
|
1396
|
+
*
|
|
1397
|
+
* Or a combined pattern.
|
|
1398
|
+
*
|
|
1399
|
+
* ```ts title="sst.config.ts"
|
|
1400
|
+
* router.route("dev.myapp.com/api", "https://api.example.com");
|
|
1401
|
+
* ```
|
|
1402
|
+
*
|
|
1403
|
+
* You can also rewrite the request path.
|
|
1404
|
+
*
|
|
1405
|
+
* ```ts title="sst.config.ts"
|
|
1406
|
+
* router.route("/api", "https://api.example.com", {
|
|
1407
|
+
* rewrite: {
|
|
1408
|
+
* regex: "^/api/(.*)$",
|
|
1409
|
+
* to: "/$1"
|
|
1410
|
+
* }
|
|
1411
|
+
* });
|
|
1412
|
+
* ```
|
|
1413
|
+
*
|
|
1414
|
+
* Here something like `/api/users/profile` will be routed to
|
|
1415
|
+
* `https://api.example.com/users/profile`.
|
|
1416
|
+
*/
|
|
1417
|
+
route(pattern: Input<string>, url: Input<string>, args?: Input<RouterUrlRouteArgs>): void;
|
|
1418
|
+
/**
|
|
1419
|
+
* Add a route to an S3 bucket.
|
|
1420
|
+
*
|
|
1421
|
+
* @param pattern The path prefix to match for this route.
|
|
1422
|
+
* @param bucket The S3 bucket to route matching requests to.
|
|
1423
|
+
* @param args Configure the route.
|
|
1424
|
+
*
|
|
1425
|
+
* @example
|
|
1426
|
+
*
|
|
1427
|
+
* Let's say you have an S3 bucket that gives CloudFront `access`.
|
|
1428
|
+
*
|
|
1429
|
+
* ```ts title="sst.config.ts" {2}
|
|
1430
|
+
* const bucket = new sst.aws.Bucket("MyBucket", {
|
|
1431
|
+
* access: "cloudfront"
|
|
1432
|
+
* });
|
|
1433
|
+
* ```
|
|
1434
|
+
*
|
|
1435
|
+
* You can match a pattern and route to it based on:
|
|
1436
|
+
*
|
|
1437
|
+
* - A path prefix like `/api`
|
|
1438
|
+
* - A domain pattern like `api.example.com`
|
|
1439
|
+
* - A combined pattern like `dev.example.com/api`
|
|
1440
|
+
*
|
|
1441
|
+
* For example, to match a path prefix.
|
|
1442
|
+
*
|
|
1443
|
+
* ```ts title="sst.config.ts"
|
|
1444
|
+
* router.routeBucket("/files", bucket);
|
|
1445
|
+
* ```
|
|
1446
|
+
*
|
|
1447
|
+
* Or match a domain.
|
|
1448
|
+
*
|
|
1449
|
+
* ```ts title="sst.config.ts"
|
|
1450
|
+
* router.routeBucket("files.example.com", bucket);
|
|
1451
|
+
* ```
|
|
1452
|
+
*
|
|
1453
|
+
* Or a combined pattern.
|
|
1454
|
+
*
|
|
1455
|
+
* ```ts title="sst.config.ts"
|
|
1456
|
+
* router.routeBucket("dev.example.com/files", bucket);
|
|
1457
|
+
* ```
|
|
1458
|
+
*
|
|
1459
|
+
* You can also rewrite the request path.
|
|
1460
|
+
*
|
|
1461
|
+
* ```ts title="sst.config.ts"
|
|
1462
|
+
* router.routeBucket("/files", bucket, {
|
|
1463
|
+
* rewrite: {
|
|
1464
|
+
* regex: "^/files/(.*)$",
|
|
1465
|
+
* to: "/$1"
|
|
1466
|
+
* }
|
|
1467
|
+
* });
|
|
1468
|
+
* ```
|
|
1469
|
+
*
|
|
1470
|
+
* Here something like `/files/logo.png` will be routed to
|
|
1471
|
+
* `/logo.png`.
|
|
1472
|
+
*/
|
|
1473
|
+
routeBucket(pattern: Input<string>, bucket: Input<Bucket>, args?: Input<RouterBucketRouteArgs>): void;
|
|
1474
|
+
/**
|
|
1475
|
+
* Add a route to a frontend or static site.
|
|
1476
|
+
*
|
|
1477
|
+
* @param pattern The path prefix to match for this route.
|
|
1478
|
+
* @param site The frontend or static site to route matching requests to.
|
|
1479
|
+
*
|
|
1480
|
+
* @deprecated The `routeSite` function has been deprecated. Set the `route` on the
|
|
1481
|
+
* site components to route the site through this Router.
|
|
1482
|
+
*/
|
|
1483
|
+
routeSite(pattern: Input<string>, site: any): void;
|
|
1484
|
+
/** @internal */
|
|
1485
|
+
getSSTLink(): {
|
|
1486
|
+
properties: {
|
|
1487
|
+
url: Output<string>;
|
|
1488
|
+
};
|
|
1489
|
+
};
|
|
1490
|
+
/**
|
|
1491
|
+
* Reference an existing Router with the given Router distribution ID.
|
|
1492
|
+
*
|
|
1493
|
+
* @param name The name of the component.
|
|
1494
|
+
* @param distributionID The ID of the existing Router distribution.
|
|
1495
|
+
* @param opts Resource options.
|
|
1496
|
+
*
|
|
1497
|
+
* This is useful when you create a Router in one stage and want to share it in
|
|
1498
|
+
* another. It avoids having to create a new Router in the other stage.
|
|
1499
|
+
*
|
|
1500
|
+
* :::tip
|
|
1501
|
+
* You can use the `static get` method to share a Router across stages.
|
|
1502
|
+
* :::
|
|
1503
|
+
*
|
|
1504
|
+
* @example
|
|
1505
|
+
* Let's say you create a Router in the `dev` stage. And in your personal stage
|
|
1506
|
+
* `frank`, you want to share the same Router.
|
|
1507
|
+
*
|
|
1508
|
+
* ```ts title="sst.config.ts"
|
|
1509
|
+
* const router = $app.stage === "frank"
|
|
1510
|
+
* ? sst.aws.Router.get("MyRouter", "E2IDLMESRN6V62")
|
|
1511
|
+
* : new sst.aws.Router("MyRouter");
|
|
1512
|
+
* ```
|
|
1513
|
+
*
|
|
1514
|
+
* Here `E2IDLMESRN6V62` is the ID of the Router distribution created in the
|
|
1515
|
+
* `dev` stage. You can find this by outputting the distribution ID in the `dev`
|
|
1516
|
+
* stage.
|
|
1517
|
+
*
|
|
1518
|
+
* ```ts title="sst.config.ts"
|
|
1519
|
+
* return {
|
|
1520
|
+
* router: router.distributionID
|
|
1521
|
+
* };
|
|
1522
|
+
* ```
|
|
1523
|
+
*
|
|
1524
|
+
* Learn more about [how to configure a router for your app](/docs/configure-a-router).
|
|
1525
|
+
*/
|
|
1526
|
+
static get(name: string, distributionID: Input<string>, opts?: ComponentResourceOptions): Router;
|
|
1527
|
+
}
|
|
1528
|
+
export declare const CF_BLOCK_CLOUDFRONT_URL_INJECTION = "\nif (event.request.headers.host.value.includes('cloudfront.net')) {\n return {\n statusCode: 403,\n statusDescription: 'Forbidden',\n body: {\n encoding: \"text\",\n data: '<html><head><title>403 Forbidden</title></head><body><center><h1>403 Forbidden</h1></center></body></html>'\n }\n };\n}";
|
|
1529
|
+
export declare const CF_ROUTER_INJECTION: string;
|
|
1530
|
+
export type KV_SITE_METADATA = {
|
|
1531
|
+
base?: string;
|
|
1532
|
+
custom404?: string;
|
|
1533
|
+
errorResponseCode?: number;
|
|
1534
|
+
s3: {
|
|
1535
|
+
domain: string;
|
|
1536
|
+
dir: string;
|
|
1537
|
+
prefix?: string;
|
|
1538
|
+
routes: string[];
|
|
1539
|
+
};
|
|
1540
|
+
image?: {
|
|
1541
|
+
host: string;
|
|
1542
|
+
route: string;
|
|
1543
|
+
originAccessControlConfig?: {
|
|
1544
|
+
enabled: boolean;
|
|
1545
|
+
signingBehavior: string;
|
|
1546
|
+
signingProtocol: string;
|
|
1547
|
+
originType: string;
|
|
1548
|
+
};
|
|
1549
|
+
};
|
|
1550
|
+
servers?: [string, number, number][];
|
|
1551
|
+
origin?: {
|
|
1552
|
+
timeouts: {
|
|
1553
|
+
readTimeout: number;
|
|
1554
|
+
};
|
|
1555
|
+
originAccessControlConfig?: {
|
|
1556
|
+
enabled: boolean;
|
|
1557
|
+
signingBehavior: string;
|
|
1558
|
+
signingProtocol: string;
|
|
1559
|
+
originType: string;
|
|
1560
|
+
};
|
|
1561
|
+
};
|
|
1562
|
+
};
|
|
1563
|
+
export type ProtectionConfig = {
|
|
1564
|
+
mode: "none" | "oac" | "oac-with-edge-signing";
|
|
1565
|
+
edgeFunction?: {
|
|
1566
|
+
arn?: string;
|
|
1567
|
+
memory?: Size;
|
|
1568
|
+
timeout?: DurationSeconds;
|
|
1569
|
+
};
|
|
1570
|
+
};
|
|
1571
|
+
export type RouterRouteArgs = {
|
|
1572
|
+
/**
|
|
1573
|
+
* The `Router` component to use for routing requests.
|
|
1574
|
+
*
|
|
1575
|
+
* @example
|
|
1576
|
+
*
|
|
1577
|
+
* Let's say you have a Router component.
|
|
1578
|
+
*
|
|
1579
|
+
* ```ts title="sst.config.ts"
|
|
1580
|
+
* const router = new sst.aws.Router("MyRouter", {
|
|
1581
|
+
* domain: "example.com"
|
|
1582
|
+
* });
|
|
1583
|
+
* ```
|
|
1584
|
+
*
|
|
1585
|
+
* You can attach it to the Router, instead of creating a standalone CloudFront
|
|
1586
|
+
* distribution.
|
|
1587
|
+
*
|
|
1588
|
+
* ```ts
|
|
1589
|
+
* router: {
|
|
1590
|
+
* instance: router
|
|
1591
|
+
* }
|
|
1592
|
+
* ```
|
|
1593
|
+
*/
|
|
1594
|
+
instance: Input<Router>;
|
|
1595
|
+
/**
|
|
1596
|
+
* Route requests matching a specific domain pattern.
|
|
1597
|
+
*
|
|
1598
|
+
* @example
|
|
1599
|
+
*
|
|
1600
|
+
* You can serve your resource from a subdomain. For example, if you want to make
|
|
1601
|
+
* it available at `https://dev.example.com`, set the `Router` to match the
|
|
1602
|
+
* domain or a wildcard.
|
|
1603
|
+
*
|
|
1604
|
+
* ```ts {2} title="sst.config.ts"
|
|
1605
|
+
* const router = new sst.aws.Router("MyRouter", {
|
|
1606
|
+
* domain: "*.example.com"
|
|
1607
|
+
* });
|
|
1608
|
+
* ```
|
|
1609
|
+
*
|
|
1610
|
+
* Then set the domain pattern.
|
|
1611
|
+
*
|
|
1612
|
+
* ```ts {3}
|
|
1613
|
+
* router: {
|
|
1614
|
+
* instance: router,
|
|
1615
|
+
* domain: "dev.example.com"
|
|
1616
|
+
* }
|
|
1617
|
+
* ```
|
|
1618
|
+
*
|
|
1619
|
+
* While `dev.example.com` matches `*.example.com`. Something like
|
|
1620
|
+
* `docs.dev.example.com` will not match `*.example.com`.
|
|
1621
|
+
*
|
|
1622
|
+
* :::tip
|
|
1623
|
+
* Nested wildcards domain patterns are not supported.
|
|
1624
|
+
* :::
|
|
1625
|
+
*
|
|
1626
|
+
* You'll need to add `*.dev.example.com` as an alias.
|
|
1627
|
+
*/
|
|
1628
|
+
domain?: Input<string>;
|
|
1629
|
+
/**
|
|
1630
|
+
* Route requests matching a specific path prefix.
|
|
1631
|
+
*
|
|
1632
|
+
* @default `"/"`
|
|
1633
|
+
*
|
|
1634
|
+
* @example
|
|
1635
|
+
*
|
|
1636
|
+
* ```ts {3}
|
|
1637
|
+
* router: {
|
|
1638
|
+
* instance: router,
|
|
1639
|
+
* path: "/docs"
|
|
1640
|
+
* }
|
|
1641
|
+
* ```
|
|
1642
|
+
*/
|
|
1643
|
+
path?: Input<string>;
|
|
1644
|
+
/**
|
|
1645
|
+
* Rewrite the request path.
|
|
1646
|
+
*
|
|
1647
|
+
* @example
|
|
1648
|
+
*
|
|
1649
|
+
* If the route path is `/api/*` and a request comes in for `/api/users/profile`,
|
|
1650
|
+
* the request path the destination sees is `/api/users/profile`.
|
|
1651
|
+
*
|
|
1652
|
+
* If you want to serve the route from the root, you can rewrite the request
|
|
1653
|
+
* path to `/users/profile`.
|
|
1654
|
+
*
|
|
1655
|
+
* ```js
|
|
1656
|
+
* router: {
|
|
1657
|
+
* instance: router,
|
|
1658
|
+
* path: "/api",
|
|
1659
|
+
* rewrite: {
|
|
1660
|
+
* regex: "^/api/(.*)$",
|
|
1661
|
+
* to: "/$1"
|
|
1662
|
+
* }
|
|
1663
|
+
* }
|
|
1664
|
+
* ```
|
|
1665
|
+
*/
|
|
1666
|
+
rewrite?: Input<{
|
|
1667
|
+
/**
|
|
1668
|
+
* The regex to match the request path.
|
|
1669
|
+
*/
|
|
1670
|
+
regex: Input<string>;
|
|
1671
|
+
/**
|
|
1672
|
+
* The replacement for the matched path.
|
|
1673
|
+
*/
|
|
1674
|
+
to: Input<string>;
|
|
1675
|
+
}>;
|
|
1676
|
+
/**
|
|
1677
|
+
* The number of seconds that CloudFront waits for a response after routing a
|
|
1678
|
+
* request to the destination. Must be between 1 and 60 seconds.
|
|
1679
|
+
*
|
|
1680
|
+
* When compared to the `connectionTimeout`, this is the total time for the
|
|
1681
|
+
* request.
|
|
1682
|
+
*
|
|
1683
|
+
* @default `"20 seconds"`
|
|
1684
|
+
* @example
|
|
1685
|
+
* ```js
|
|
1686
|
+
* router: {
|
|
1687
|
+
* instance: router,
|
|
1688
|
+
* readTimeout: "60 seconds"
|
|
1689
|
+
* }
|
|
1690
|
+
* ```
|
|
1691
|
+
*/
|
|
1692
|
+
readTimeout?: Input<DurationSeconds>;
|
|
1693
|
+
/**
|
|
1694
|
+
* The number of seconds that CloudFront should try to maintain the connection
|
|
1695
|
+
* to the destination after receiving the last packet of the response. Must be
|
|
1696
|
+
* between 1 and 60 seconds.
|
|
1697
|
+
*
|
|
1698
|
+
* @default `"5 seconds"`
|
|
1699
|
+
* @example
|
|
1700
|
+
* ```js
|
|
1701
|
+
* router: {
|
|
1702
|
+
* instance: router,
|
|
1703
|
+
* keepAliveTimeout: "10 seconds"
|
|
1704
|
+
* }
|
|
1705
|
+
* ```
|
|
1706
|
+
*/
|
|
1707
|
+
keepAliveTimeout?: Input<DurationSeconds>;
|
|
1708
|
+
/**
|
|
1709
|
+
* The number of seconds that CloudFront waits before timing out and closing the
|
|
1710
|
+
* connection to the origin. Must be between 1 and 10 seconds.
|
|
1711
|
+
*
|
|
1712
|
+
* @default `"10 seconds"`
|
|
1713
|
+
* @example
|
|
1714
|
+
* ```js
|
|
1715
|
+
* router: {
|
|
1716
|
+
* instance: router,
|
|
1717
|
+
* connectionTimeout: "3 seconds"
|
|
1718
|
+
* }
|
|
1719
|
+
* ```
|
|
1720
|
+
*/
|
|
1721
|
+
connectionTimeout?: Input<DurationSeconds>;
|
|
1722
|
+
/**
|
|
1723
|
+
* The number of times that CloudFront attempts to connect to the origin. Must be
|
|
1724
|
+
* between 1 and 3.
|
|
1725
|
+
*
|
|
1726
|
+
* @default `3`
|
|
1727
|
+
* @example
|
|
1728
|
+
* ```js
|
|
1729
|
+
* router: {
|
|
1730
|
+
* instance: router,
|
|
1731
|
+
* connectionAttempts: 1
|
|
1732
|
+
* }
|
|
1733
|
+
* ```
|
|
1734
|
+
*/
|
|
1735
|
+
connectionAttempts?: Input<number>;
|
|
1736
|
+
};
|
|
1737
|
+
export type RouterRouteArgsDeprecated = {
|
|
1738
|
+
router: Input<Router>;
|
|
1739
|
+
domain?: Input<string>;
|
|
1740
|
+
path?: Input<string>;
|
|
1741
|
+
};
|
|
1742
|
+
export declare function normalizeRouteArgs(route?: Input<RouterRouteArgs>, routeDeprecated?: Input<RouterRouteArgsDeprecated>): Output<{
|
|
1743
|
+
hostPattern: string | undefined;
|
|
1744
|
+
pathPrefix: string | undefined;
|
|
1745
|
+
routerDistributionId: Output<string>;
|
|
1746
|
+
routerUrl: Output<string>;
|
|
1747
|
+
routerKvNamespace: Output<string>;
|
|
1748
|
+
routerKvStoreArn: Output<string>;
|
|
1749
|
+
routerProtection: Output<ProtectionConfig>;
|
|
1750
|
+
routerDistributionArn: Output<string>;
|
|
1751
|
+
rewrite: import("@pulumi/pulumi").UnwrappedObject<{
|
|
1752
|
+
/**
|
|
1753
|
+
* The regex to match the request path.
|
|
1754
|
+
*/
|
|
1755
|
+
regex: Input<string>;
|
|
1756
|
+
/**
|
|
1757
|
+
* The replacement for the matched path.
|
|
1758
|
+
*/
|
|
1759
|
+
to: Input<string>;
|
|
1760
|
+
}> | undefined;
|
|
1761
|
+
readTimeout: `${number} second` | `${number} seconds` | undefined;
|
|
1762
|
+
keepAliveTimeout: `${number} second` | `${number} seconds` | undefined;
|
|
1763
|
+
connectionTimeout: `${number} second` | `${number} seconds` | undefined;
|
|
1764
|
+
connectionAttempts: number | undefined;
|
|
1765
|
+
}> | undefined;
|
|
1766
|
+
export {};
|
|
1767
|
+
//# sourceMappingURL=router.d.ts.map
|