@monorise/sst 1.0.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.sst/platform/src/components/aws/analog.d.ts +423 -0
- package/dist/.sst/platform/src/components/aws/analog.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/analog.js +118 -0
- package/dist/.sst/platform/src/components/aws/analog.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts +74 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket-route.js +110 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket.d.ts +542 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket.js +409 -0
- package/dist/.sst/platform/src/components/aws/apigateway-websocket.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts +48 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-api-key.js +55 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-api-key.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts +55 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-authorizer.js +110 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-authorizer.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts +36 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-base-route.js +34 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-base-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts +39 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-integration-route.js +49 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-integration-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts +53 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-lambda-route.js +85 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-lambda-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts +53 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-usage-plan.js +66 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1-usage-plan.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1.d.ts +1002 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1.js +749 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts +54 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-authorizer.js +98 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-authorizer.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts +28 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-base-route.js +28 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-base-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts +59 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-lambda-route.js +84 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-lambda-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts +54 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-private-route.js +55 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-private-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts +44 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-url-route.js +53 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2-url-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2.d.ts +933 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2.js +648 -0
- package/dist/.sst/platform/src/components/aws/apigatewayv2.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-data-source.d.ts +52 -0
- package/dist/.sst/platform/src/components/aws/app-sync-data-source.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-data-source.js +208 -0
- package/dist/.sst/platform/src/components/aws/app-sync-data-source.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-function.d.ts +33 -0
- package/dist/.sst/platform/src/components/aws/app-sync-function.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-function.js +52 -0
- package/dist/.sst/platform/src/components/aws/app-sync-function.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-resolver.d.ts +41 -0
- package/dist/.sst/platform/src/components/aws/app-sync-resolver.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync-resolver.js +70 -0
- package/dist/.sst/platform/src/components/aws/app-sync-resolver.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync.d.ts +638 -0
- package/dist/.sst/platform/src/components/aws/app-sync.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/app-sync.js +330 -0
- package/dist/.sst/platform/src/components/aws/app-sync.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/astro.d.ts +421 -0
- package/dist/.sst/platform/src/components/aws/astro.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/astro.js +156 -0
- package/dist/.sst/platform/src/components/aws/astro.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/aurora.d.ts +702 -0
- package/dist/.sst/platform/src/components/aws/aurora.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/aurora.js +678 -0
- package/dist/.sst/platform/src/components/aws/aurora.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/auth-v1.d.ts +26 -0
- package/dist/.sst/platform/src/components/aws/auth-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/auth-v1.js +36 -0
- package/dist/.sst/platform/src/components/aws/auth-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/auth.d.ts +260 -0
- package/dist/.sst/platform/src/components/aws/auth.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/auth.js +209 -0
- package/dist/.sst/platform/src/components/aws/auth.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts +61 -0
- package/dist/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-lambda-subscriber.js +99 -0
- package/dist/.sst/platform/src/components/aws/bucket-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-notification.d.ts +47 -0
- package/dist/.sst/platform/src/components/aws/bucket-notification.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-notification.js +170 -0
- package/dist/.sst/platform/src/components/aws/bucket-notification.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts +55 -0
- package/dist/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-queue-subscriber.js +77 -0
- package/dist/.sst/platform/src/components/aws/bucket-queue-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts +55 -0
- package/dist/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket-topic-subscriber.js +99 -0
- package/dist/.sst/platform/src/components/aws/bucket-topic-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket.d.ts +1115 -0
- package/dist/.sst/platform/src/components/aws/bucket.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bucket.js +754 -0
- package/dist/.sst/platform/src/components/aws/bucket.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-base-subscriber.d.ts +20 -0
- package/dist/.sst/platform/src/components/aws/bus-base-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-base-subscriber.js +19 -0
- package/dist/.sst/platform/src/components/aws/bus-base-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts +49 -0
- package/dist/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-lambda-subscriber.js +81 -0
- package/dist/.sst/platform/src/components/aws/bus-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts +44 -0
- package/dist/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus-queue-subscriber.js +63 -0
- package/dist/.sst/platform/src/components/aws/bus-queue-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus.d.ts +403 -0
- package/dist/.sst/platform/src/components/aws/bus.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/bus.js +350 -0
- package/dist/.sst/platform/src/components/aws/bus.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cdn.d.ts +299 -0
- package/dist/.sst/platform/src/components/aws/cdn.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cdn.js +234 -0
- package/dist/.sst/platform/src/components/aws/cdn.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cluster-v1.d.ts +882 -0
- package/dist/.sst/platform/src/components/aws/cluster-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cluster-v1.js +245 -0
- package/dist/.sst/platform/src/components/aws/cluster-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cluster.d.ts +308 -0
- package/dist/.sst/platform/src/components/aws/cluster.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cluster.js +321 -0
- package/dist/.sst/platform/src/components/aws/cluster.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-pool.d.ts +194 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-pool.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-pool.js +263 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-pool.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-provider.d.ts +38 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-provider.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-provider.js +67 -0
- package/dist/.sst/platform/src/components/aws/cognito-identity-provider.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts +50 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool-client.js +81 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool-client.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool.d.ts +599 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool.js +368 -0
- package/dist/.sst/platform/src/components/aws/cognito-user-pool.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/cron.d.ts +250 -0
- package/dist/.sst/platform/src/components/aws/cron.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/cron.js +200 -0
- package/dist/.sst/platform/src/components/aws/cron.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/dns-validated-certificate.d.ts +27 -0
- package/dist/.sst/platform/src/components/aws/dns-validated-certificate.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/dns-validated-certificate.js +55 -0
- package/dist/.sst/platform/src/components/aws/dns-validated-certificate.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/dns.d.ts +94 -0
- package/dist/.sst/platform/src/components/aws/dns.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/dns.js +121 -0
- package/dist/.sst/platform/src/components/aws/dns.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts +55 -0
- package/dist/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/dynamo-lambda-subscriber.js +79 -0
- package/dist/.sst/platform/src/components/aws/dynamo-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/dynamo.d.ts +569 -0
- package/dist/.sst/platform/src/components/aws/dynamo.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/dynamo.js +291 -0
- package/dist/.sst/platform/src/components/aws/dynamo.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/efs.d.ts +217 -0
- package/dist/.sst/platform/src/components/aws/efs.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/efs.js +241 -0
- package/dist/.sst/platform/src/components/aws/efs.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/email.d.ts +291 -0
- package/dist/.sst/platform/src/components/aws/email.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/email.js +276 -0
- package/dist/.sst/platform/src/components/aws/email.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/fargate.d.ts +769 -0
- package/dist/.sst/platform/src/components/aws/fargate.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/fargate.js +434 -0
- package/dist/.sst/platform/src/components/aws/fargate.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/function.d.ts +1631 -0
- package/dist/.sst/platform/src/components/aws/function.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/function.js +1041 -0
- package/dist/.sst/platform/src/components/aws/function.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts +3 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigateway-account.js +31 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigateway-account.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts +144 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.js +2 -0
- package/dist/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/arn.d.ts +35 -0
- package/dist/.sst/platform/src/components/aws/helpers/arn.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/arn.js +86 -0
- package/dist/.sst/platform/src/components/aws/helpers/arn.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/bootstrap.d.ts +13 -0
- package/dist/.sst/platform/src/components/aws/helpers/bootstrap.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/bootstrap.js +7 -0
- package/dist/.sst/platform/src/components/aws/helpers/bootstrap.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/container-builder.d.ts +4 -0
- package/dist/.sst/platform/src/components/aws/helpers/container-builder.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/container-builder.js +27 -0
- package/dist/.sst/platform/src/components/aws/helpers/container-builder.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/function-builder.d.ts +10 -0
- package/dist/.sst/platform/src/components/aws/helpers/function-builder.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/function-builder.js +51 -0
- package/dist/.sst/platform/src/components/aws/helpers/function-builder.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/provider.d.ts +3 -0
- package/dist/.sst/platform/src/components/aws/helpers/provider.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/provider.js +34 -0
- package/dist/.sst/platform/src/components/aws/helpers/provider.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/quota.d.ts +7 -0
- package/dist/.sst/platform/src/components/aws/helpers/quota.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/quota.js +20 -0
- package/dist/.sst/platform/src/components/aws/helpers/quota.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/site-builder.d.ts +4 -0
- package/dist/.sst/platform/src/components/aws/helpers/site-builder.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/site-builder.js +36 -0
- package/dist/.sst/platform/src/components/aws/helpers/site-builder.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/subscriber.d.ts +6 -0
- package/dist/.sst/platform/src/components/aws/helpers/subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/helpers/subscriber.js +13 -0
- package/dist/.sst/platform/src/components/aws/helpers/subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/https-redirect.d.ts +38 -0
- package/dist/.sst/platform/src/components/aws/https-redirect.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/https-redirect.js +124 -0
- package/dist/.sst/platform/src/components/aws/https-redirect.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/iam-edit.d.ts +39 -0
- package/dist/.sst/platform/src/components/aws/iam-edit.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/iam-edit.js +40 -0
- package/dist/.sst/platform/src/components/aws/iam-edit.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/index.d.ts +48 -0
- package/dist/.sst/platform/src/components/aws/index.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/index.js +49 -0
- package/dist/.sst/platform/src/components/aws/index.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts +48 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.js +82 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream.d.ts +249 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream.js +134 -0
- package/dist/.sst/platform/src/components/aws/kinesis-stream.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/linkable.d.ts +17 -0
- package/dist/.sst/platform/src/components/aws/linkable.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/linkable.js +25 -0
- package/dist/.sst/platform/src/components/aws/linkable.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/logging.d.ts +26 -0
- package/dist/.sst/platform/src/components/aws/logging.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/logging.js +26 -0
- package/dist/.sst/platform/src/components/aws/logging.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/mysql.d.ts +496 -0
- package/dist/.sst/platform/src/components/aws/mysql.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/mysql.js +514 -0
- package/dist/.sst/platform/src/components/aws/mysql.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/nextjs.d.ts +517 -0
- package/dist/.sst/platform/src/components/aws/nextjs.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/nextjs.js +444 -0
- package/dist/.sst/platform/src/components/aws/nextjs.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/nuxt.d.ts +495 -0
- package/dist/.sst/platform/src/components/aws/nuxt.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/nuxt.js +113 -0
- package/dist/.sst/platform/src/components/aws/nuxt.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/open-search.d.ts +295 -0
- package/dist/.sst/platform/src/components/aws/open-search.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/open-search.js +365 -0
- package/dist/.sst/platform/src/components/aws/open-search.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/opencontrol.d.ts +165 -0
- package/dist/.sst/platform/src/components/aws/opencontrol.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/opencontrol.js +164 -0
- package/dist/.sst/platform/src/components/aws/opencontrol.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/permission.d.ts +27 -0
- package/dist/.sst/platform/src/components/aws/permission.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/permission.js +19 -0
- package/dist/.sst/platform/src/components/aws/permission.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/postgres-v1.d.ts +317 -0
- package/dist/.sst/platform/src/components/aws/postgres-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/postgres-v1.js +304 -0
- package/dist/.sst/platform/src/components/aws/postgres-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/postgres.d.ts +500 -0
- package/dist/.sst/platform/src/components/aws/postgres.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/postgres.js +532 -0
- package/dist/.sst/platform/src/components/aws/postgres.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/bucket-files.d.ts +18 -0
- package/dist/.sst/platform/src/components/aws/providers/bucket-files.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/bucket-files.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/bucket-files.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts +13 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts +11 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-invalidation.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/distribution-invalidation.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/function-environment-update.d.ts +29 -0
- package/dist/.sst/platform/src/components/aws/providers/function-environment-update.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/function-environment-update.js +18 -0
- package/dist/.sst/platform/src/components/aws/providers/function-environment-update.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts +11 -0
- package/dist/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/hosted-zone-lookup.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/hosted-zone-lookup.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-keys.d.ts +11 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-keys.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-keys.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-keys.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts +11 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-routes-update.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/kv-routes-update.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/origin-access-control.d.ts +8 -0
- package/dist/.sst/platform/src/components/aws/providers/origin-access-control.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/origin-access-control.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/origin-access-control.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts +8 -0
- package/dist/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/rds-role-lookup.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/rds-role-lookup.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/vector-table.d.ts +12 -0
- package/dist/.sst/platform/src/components/aws/providers/vector-table.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/providers/vector-table.js +8 -0
- package/dist/.sst/platform/src/components/aws/providers/vector-table.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts +48 -0
- package/dist/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/queue-lambda-subscriber.js +81 -0
- package/dist/.sst/platform/src/components/aws/queue-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/queue.d.ts +485 -0
- package/dist/.sst/platform/src/components/aws/queue.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/queue.js +322 -0
- package/dist/.sst/platform/src/components/aws/queue.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/react.d.ts +416 -0
- package/dist/.sst/platform/src/components/aws/react.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/react.js +157 -0
- package/dist/.sst/platform/src/components/aws/react.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts +53 -0
- package/dist/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/realtime-lambda-subscriber.js +78 -0
- package/dist/.sst/platform/src/components/aws/realtime-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/realtime.d.ts +226 -0
- package/dist/.sst/platform/src/components/aws/realtime.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/realtime.js +221 -0
- package/dist/.sst/platform/src/components/aws/realtime.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/redis-v1.d.ts +338 -0
- package/dist/.sst/platform/src/components/aws/redis-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/redis-v1.js +335 -0
- package/dist/.sst/platform/src/components/aws/redis-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/redis.d.ts +364 -0
- package/dist/.sst/platform/src/components/aws/redis.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/redis.js +382 -0
- package/dist/.sst/platform/src/components/aws/redis.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/remix.d.ts +423 -0
- package/dist/.sst/platform/src/components/aws/remix.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/remix.js +212 -0
- package/dist/.sst/platform/src/components/aws/remix.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-base-route.d.ts +28 -0
- package/dist/.sst/platform/src/components/aws/router-base-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-base-route.js +40 -0
- package/dist/.sst/platform/src/components/aws/router-base-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-bucket-route.d.ts +29 -0
- package/dist/.sst/platform/src/components/aws/router-bucket-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-bucket-route.js +40 -0
- package/dist/.sst/platform/src/components/aws/router-bucket-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-url-route.d.ts +28 -0
- package/dist/.sst/platform/src/components/aws/router-url-route.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/router-url-route.js +51 -0
- package/dist/.sst/platform/src/components/aws/router-url-route.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/router.d.ts +1266 -0
- package/dist/.sst/platform/src/components/aws/router.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/router.js +1156 -0
- package/dist/.sst/platform/src/components/aws/router.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/service-v1.d.ts +78 -0
- package/dist/.sst/platform/src/components/aws/service-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/service-v1.js +606 -0
- package/dist/.sst/platform/src/components/aws/service-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/service.d.ts +1599 -0
- package/dist/.sst/platform/src/components/aws/service.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/service.js +924 -0
- package/dist/.sst/platform/src/components/aws/service.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts +53 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.js +75 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts +55 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-queue-subscriber.js +59 -0
- package/dist/.sst/platform/src/components/aws/sns-topic-queue-subscriber.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic.d.ts +389 -0
- package/dist/.sst/platform/src/components/aws/sns-topic.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/sns-topic.js +233 -0
- package/dist/.sst/platform/src/components/aws/sns-topic.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/solid-start.d.ts +414 -0
- package/dist/.sst/platform/src/components/aws/solid-start.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/solid-start.js +120 -0
- package/dist/.sst/platform/src/components/aws/solid-start.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/ssr-site.d.ts +494 -0
- package/dist/.sst/platform/src/components/aws/ssr-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/ssr-site.js +792 -0
- package/dist/.sst/platform/src/components/aws/ssr-site.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/static-site.d.ts +736 -0
- package/dist/.sst/platform/src/components/aws/static-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/static-site.js +583 -0
- package/dist/.sst/platform/src/components/aws/static-site.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/choice.d.ts +73 -0
- package/dist/.sst/platform/src/components/aws/step-functions/choice.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/choice.js +98 -0
- package/dist/.sst/platform/src/components/aws/step-functions/choice.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/fail.d.ts +63 -0
- package/dist/.sst/platform/src/components/aws/step-functions/fail.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/fail.js +25 -0
- package/dist/.sst/platform/src/components/aws/step-functions/fail.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/map.d.ts +236 -0
- package/dist/.sst/platform/src/components/aws/step-functions/map.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/map.js +108 -0
- package/dist/.sst/platform/src/components/aws/step-functions/map.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/parallel.d.ts +127 -0
- package/dist/.sst/platform/src/components/aws/step-functions/parallel.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/parallel.js +129 -0
- package/dist/.sst/platform/src/components/aws/step-functions/parallel.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/pass.d.ts +39 -0
- package/dist/.sst/platform/src/components/aws/step-functions/pass.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/pass.js +41 -0
- package/dist/.sst/platform/src/components/aws/step-functions/pass.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/state.d.ts +197 -0
- package/dist/.sst/platform/src/components/aws/step-functions/state.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/state.js +134 -0
- package/dist/.sst/platform/src/components/aws/step-functions/state.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/succeed.d.ts +26 -0
- package/dist/.sst/platform/src/components/aws/step-functions/succeed.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/succeed.js +25 -0
- package/dist/.sst/platform/src/components/aws/step-functions/succeed.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/task.d.ts +477 -0
- package/dist/.sst/platform/src/components/aws/step-functions/task.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/task.js +116 -0
- package/dist/.sst/platform/src/components/aws/step-functions/task.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/wait.d.ts +91 -0
- package/dist/.sst/platform/src/components/aws/step-functions/wait.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions/wait.js +46 -0
- package/dist/.sst/platform/src/components/aws/step-functions/wait.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions.d.ts +473 -0
- package/dist/.sst/platform/src/components/aws/step-functions.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/step-functions.js +576 -0
- package/dist/.sst/platform/src/components/aws/step-functions.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/svelte-kit.d.ts +417 -0
- package/dist/.sst/platform/src/components/aws/svelte-kit.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/svelte-kit.js +144 -0
- package/dist/.sst/platform/src/components/aws/svelte-kit.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/tan-stack-start.d.ts +354 -0
- package/dist/.sst/platform/src/components/aws/tan-stack-start.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/tan-stack-start.js +143 -0
- package/dist/.sst/platform/src/components/aws/tan-stack-start.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/task.d.ts +322 -0
- package/dist/.sst/platform/src/components/aws/task.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/task.js +311 -0
- package/dist/.sst/platform/src/components/aws/task.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/vector.d.ts +150 -0
- package/dist/.sst/platform/src/components/aws/vector.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/vector.js +224 -0
- package/dist/.sst/platform/src/components/aws/vector.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/vpc-v1.d.ts +208 -0
- package/dist/.sst/platform/src/components/aws/vpc-v1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/vpc-v1.js +355 -0
- package/dist/.sst/platform/src/components/aws/vpc-v1.js.map +1 -0
- package/dist/.sst/platform/src/components/aws/vpc.d.ts +444 -0
- package/dist/.sst/platform/src/components/aws/vpc.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/aws/vpc.js +834 -0
- package/dist/.sst/platform/src/components/aws/vpc.js.map +1 -0
- package/dist/.sst/platform/src/components/base/base-site.d.ts +53 -0
- package/dist/.sst/platform/src/components/base/base-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/base/base-site.js +47 -0
- package/dist/.sst/platform/src/components/base/base-site.js.map +1 -0
- package/dist/.sst/platform/src/components/base/base-ssr-site.d.ts +111 -0
- package/dist/.sst/platform/src/components/base/base-ssr-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/base/base-ssr-site.js +72 -0
- package/dist/.sst/platform/src/components/base/base-ssr-site.js.map +1 -0
- package/dist/.sst/platform/src/components/base/base-static-site.d.ts +199 -0
- package/dist/.sst/platform/src/components/base/base-static-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/base/base-static-site.js +87 -0
- package/dist/.sst/platform/src/components/base/base-static-site.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/account-id.d.ts +2 -0
- package/dist/.sst/platform/src/components/cloudflare/account-id.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/account-id.js +2 -0
- package/dist/.sst/platform/src/components/cloudflare/account-id.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/auth.d.ts +22 -0
- package/dist/.sst/platform/src/components/cloudflare/auth.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/auth.js +37 -0
- package/dist/.sst/platform/src/components/cloudflare/auth.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/binding.d.ts +69 -0
- package/dist/.sst/platform/src/components/cloudflare/binding.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/binding.js +25 -0
- package/dist/.sst/platform/src/components/cloudflare/binding.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/bucket.d.ts +101 -0
- package/dist/.sst/platform/src/components/cloudflare/bucket.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/bucket.js +98 -0
- package/dist/.sst/platform/src/components/cloudflare/bucket.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/cron.d.ts +121 -0
- package/dist/.sst/platform/src/components/cloudflare/cron.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/cron.js +86 -0
- package/dist/.sst/platform/src/components/cloudflare/cron.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/d1.d.ts +107 -0
- package/dist/.sst/platform/src/components/cloudflare/d1.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/d1.js +104 -0
- package/dist/.sst/platform/src/components/cloudflare/d1.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/dns.d.ts +94 -0
- package/dist/.sst/platform/src/components/cloudflare/dns.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/dns.js +138 -0
- package/dist/.sst/platform/src/components/cloudflare/dns.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts +19 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/fetch.js +39 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/fetch.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts +10 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/worker-builder.js +25 -0
- package/dist/.sst/platform/src/components/cloudflare/helpers/worker-builder.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/index.d.ts +13 -0
- package/dist/.sst/platform/src/components/cloudflare/index.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/index.js +13 -0
- package/dist/.sst/platform/src/components/cloudflare/index.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/kv.d.ts +101 -0
- package/dist/.sst/platform/src/components/cloudflare/kv.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/kv.js +98 -0
- package/dist/.sst/platform/src/components/cloudflare/kv.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts +20 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/dns-record.js +11 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/dns-record.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts +23 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/kv-data.js +63 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/kv-data.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts +22 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/worker-url.js +83 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/worker-url.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts +22 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/zone-lookup.js +54 -0
- package/dist/.sst/platform/src/components/cloudflare/providers/zone-lookup.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/queue.d.ts +60 -0
- package/dist/.sst/platform/src/components/cloudflare/queue.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/queue.js +57 -0
- package/dist/.sst/platform/src/components/cloudflare/queue.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/remix.d.ts +223 -0
- package/dist/.sst/platform/src/components/cloudflare/remix.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/remix.js +291 -0
- package/dist/.sst/platform/src/components/cloudflare/remix.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/ssr-site.d.ts +59 -0
- package/dist/.sst/platform/src/components/cloudflare/ssr-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/ssr-site.js +177 -0
- package/dist/.sst/platform/src/components/cloudflare/ssr-site.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/static-site.d.ts +262 -0
- package/dist/.sst/platform/src/components/cloudflare/static-site.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/static-site.js +315 -0
- package/dist/.sst/platform/src/components/cloudflare/static-site.js.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/worker.d.ts +273 -0
- package/dist/.sst/platform/src/components/cloudflare/worker.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cloudflare/worker.js +326 -0
- package/dist/.sst/platform/src/components/cloudflare/worker.js.map +1 -0
- package/dist/.sst/platform/src/components/component.d.ts +37 -0
- package/dist/.sst/platform/src/components/component.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/component.js +395 -0
- package/dist/.sst/platform/src/components/component.js.map +1 -0
- package/dist/.sst/platform/src/components/cpu.d.ts +3 -0
- package/dist/.sst/platform/src/components/cpu.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/cpu.js +9 -0
- package/dist/.sst/platform/src/components/cpu.js.map +1 -0
- package/dist/.sst/platform/src/components/dns.d.ts +59 -0
- package/dist/.sst/platform/src/components/dns.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/dns.js +7 -0
- package/dist/.sst/platform/src/components/dns.js.map +1 -0
- package/dist/.sst/platform/src/components/duration.d.ts +6 -0
- package/dist/.sst/platform/src/components/duration.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/duration.js +19 -0
- package/dist/.sst/platform/src/components/duration.js.map +1 -0
- package/dist/.sst/platform/src/components/error.d.ts +4 -0
- package/dist/.sst/platform/src/components/error.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/error.js +6 -0
- package/dist/.sst/platform/src/components/error.js.map +1 -0
- package/dist/.sst/platform/src/components/experimental/dev-command.d.ts +99 -0
- package/dist/.sst/platform/src/components/experimental/dev-command.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/experimental/dev-command.js +59 -0
- package/dist/.sst/platform/src/components/experimental/dev-command.js.map +1 -0
- package/dist/.sst/platform/src/components/experimental/index.d.ts +2 -0
- package/dist/.sst/platform/src/components/experimental/index.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/experimental/index.js +2 -0
- package/dist/.sst/platform/src/components/experimental/index.js.map +1 -0
- package/dist/.sst/platform/src/components/hint.d.ts +7 -0
- package/dist/.sst/platform/src/components/hint.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/hint.js +20 -0
- package/dist/.sst/platform/src/components/hint.js.map +1 -0
- package/dist/.sst/platform/src/components/index.d.ts +16 -0
- package/dist/.sst/platform/src/components/index.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/index.js +16 -0
- package/dist/.sst/platform/src/components/index.js.map +1 -0
- package/dist/.sst/platform/src/components/input.d.ts +3 -0
- package/dist/.sst/platform/src/components/input.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/input.js +2 -0
- package/dist/.sst/platform/src/components/input.js.map +1 -0
- package/dist/.sst/platform/src/components/link.d.ts +41 -0
- package/dist/.sst/platform/src/components/link.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/link.js +138 -0
- package/dist/.sst/platform/src/components/link.js.map +1 -0
- package/dist/.sst/platform/src/components/linkable.d.ts +271 -0
- package/dist/.sst/platform/src/components/linkable.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/linkable.js +244 -0
- package/dist/.sst/platform/src/components/linkable.js.map +1 -0
- package/dist/.sst/platform/src/components/naming.d.ts +7 -0
- package/dist/.sst/platform/src/components/naming.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/naming.js +58 -0
- package/dist/.sst/platform/src/components/naming.js.map +1 -0
- package/dist/.sst/platform/src/components/path.d.ts +2 -0
- package/dist/.sst/platform/src/components/path.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/path.js +5 -0
- package/dist/.sst/platform/src/components/path.js.map +1 -0
- package/dist/.sst/platform/src/components/rpc/rpc.d.ts +18 -0
- package/dist/.sst/platform/src/components/rpc/rpc.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/rpc/rpc.js +120 -0
- package/dist/.sst/platform/src/components/rpc/rpc.js.map +1 -0
- package/dist/.sst/platform/src/components/secret.d.ts +125 -0
- package/dist/.sst/platform/src/components/secret.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/secret.js +143 -0
- package/dist/.sst/platform/src/components/secret.js.map +1 -0
- package/dist/.sst/platform/src/components/size.d.ts +5 -0
- package/dist/.sst/platform/src/components/size.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/size.js +29 -0
- package/dist/.sst/platform/src/components/size.js.map +1 -0
- package/dist/.sst/platform/src/components/vercel/account-id.d.ts +2 -0
- package/dist/.sst/platform/src/components/vercel/account-id.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/vercel/account-id.js +2 -0
- package/dist/.sst/platform/src/components/vercel/account-id.js.map +1 -0
- package/dist/.sst/platform/src/components/vercel/dns.d.ts +73 -0
- package/dist/.sst/platform/src/components/vercel/dns.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/vercel/dns.js +104 -0
- package/dist/.sst/platform/src/components/vercel/dns.js.map +1 -0
- package/dist/.sst/platform/src/components/vercel/index.d.ts +3 -0
- package/dist/.sst/platform/src/components/vercel/index.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/vercel/index.js +3 -0
- package/dist/.sst/platform/src/components/vercel/index.js.map +1 -0
- package/dist/.sst/platform/src/components/vercel/providers/dns-record.d.ts +14 -0
- package/dist/.sst/platform/src/components/vercel/providers/dns-record.d.ts.map +1 -0
- package/dist/.sst/platform/src/components/vercel/providers/dns-record.js +8 -0
- package/dist/.sst/platform/src/components/vercel/providers/dns-record.js.map +1 -0
- package/dist/.sst/platform/src/config.d.ts +1243 -0
- package/dist/.sst/platform/src/config.d.ts.map +1 -0
- package/dist/.sst/platform/src/config.js +5 -0
- package/dist/.sst/platform/src/config.js.map +1 -0
- package/dist/.sst/platform/src/util/compare-semver.d.ts +4 -0
- package/dist/.sst/platform/src/util/compare-semver.d.ts.map +1 -0
- package/dist/.sst/platform/src/util/compare-semver.js +24 -0
- package/dist/.sst/platform/src/util/compare-semver.js.map +1 -0
- package/dist/.sst/platform/src/util/lazy.d.ts +2 -0
- package/dist/.sst/platform/src/util/lazy.d.ts.map +1 -0
- package/dist/.sst/platform/src/util/lazy.js +12 -0
- package/dist/.sst/platform/src/util/lazy.js.map +1 -0
- package/dist/.sst/platform/src/util/path-to-regex.d.ts +128 -0
- package/dist/.sst/platform/src/util/path-to-regex.d.ts.map +1 -0
- package/dist/.sst/platform/src/util/path-to-regex.js +392 -0
- package/dist/.sst/platform/src/util/path-to-regex.js.map +1 -0
- package/dist/.sst/platform/src/util/semaphore.d.ts +9 -0
- package/dist/.sst/platform/src/util/semaphore.d.ts.map +1 -0
- package/dist/.sst/platform/src/util/semaphore.js +36 -0
- package/dist/.sst/platform/src/util/semaphore.js.map +1 -0
- package/dist/.sst/platform/src/util/warn.d.ts +2 -0
- package/dist/.sst/platform/src/util/warn.d.ts.map +1 -0
- package/dist/.sst/platform/src/util/warn.js +8 -0
- package/dist/.sst/platform/src/util/warn.js.map +1 -0
- package/dist/components/monorise-core.d.ts +17 -0
- package/dist/components/monorise-core.d.ts.map +1 -0
- package/dist/components/monorise-core.js +134 -0
- package/dist/components/monorise-core.js.map +1 -0
- package/dist/components/q-function.d.ts +17 -0
- package/dist/components/q-function.d.ts.map +1 -0
- package/dist/components/q-function.js +53 -0
- package/dist/components/q-function.js.map +1 -0
- package/dist/components/single-table.d.ts +12 -0
- package/dist/components/single-table.d.ts.map +1 -0
- package/dist/components/single-table.js +71 -0
- package/dist/components/single-table.js.map +1 -0
- package/dist/constants/event.d.ts +73 -0
- package/dist/constants/event.d.ts.map +1 -0
- package/dist/constants/event.js +74 -0
- package/dist/constants/event.js.map +1 -0
- package/dist/constants/table.d.ts +3 -0
- package/dist/constants/table.d.ts.map +1 -0
- package/dist/constants/table.js +3 -0
- package/dist/constants/table.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/sst.config.d.ts +3 -0
- package/dist/sst.config.d.ts.map +1 -0
- package/dist/sst.config.js +24 -0
- package/dist/sst.config.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +25 -0
|
@@ -0,0 +1,754 @@
|
|
|
1
|
+
import { output, interpolate, all, } from "@pulumi/pulumi";
|
|
2
|
+
import { hashStringToPrettyString, logicalName } from "../naming";
|
|
3
|
+
import { Component, transform } from "../component";
|
|
4
|
+
import { toSeconds } from "../duration";
|
|
5
|
+
import { VisibleError } from "../error";
|
|
6
|
+
import { parseBucketArn } from "./helpers/arn";
|
|
7
|
+
import { BucketLambdaSubscriber } from "./bucket-lambda-subscriber";
|
|
8
|
+
import { iam, s3 } from "@pulumi/aws";
|
|
9
|
+
import { permission } from "./permission";
|
|
10
|
+
import { BucketQueueSubscriber } from "./bucket-queue-subscriber";
|
|
11
|
+
import { BucketTopicSubscriber } from "./bucket-topic-subscriber";
|
|
12
|
+
import { BucketNotification } from "./bucket-notification";
|
|
13
|
+
/**
|
|
14
|
+
* The `Bucket` component lets you add an [AWS S3 Bucket](https://aws.amazon.com/s3/) to
|
|
15
|
+
* your app.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* #### Minimal example
|
|
20
|
+
*
|
|
21
|
+
* ```ts title="sst.config.ts"
|
|
22
|
+
* const bucket = new sst.aws.Bucket("MyBucket");
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* #### Public read access
|
|
26
|
+
*
|
|
27
|
+
* Enable `public` read access for all the files in the bucket. Useful for hosting public files.
|
|
28
|
+
*
|
|
29
|
+
* ```ts title="sst.config.ts"
|
|
30
|
+
* new sst.aws.Bucket("MyBucket", {
|
|
31
|
+
* access: "public"
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* #### Add a subscriber
|
|
36
|
+
*
|
|
37
|
+
* ```ts title="sst.config.ts"
|
|
38
|
+
* bucket.notify({
|
|
39
|
+
* notifications: [
|
|
40
|
+
* {
|
|
41
|
+
* name: "MySubscriber",
|
|
42
|
+
* function: "src/subscriber.handler"
|
|
43
|
+
* }
|
|
44
|
+
* ]
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* #### Link the bucket to a resource
|
|
49
|
+
*
|
|
50
|
+
* You can link the bucket to other resources, like a function or your Next.js app.
|
|
51
|
+
*
|
|
52
|
+
* ```ts title="sst.config.ts"
|
|
53
|
+
* new sst.aws.Nextjs("MyWeb", {
|
|
54
|
+
* link: [bucket]
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* Once linked, you can generate a pre-signed URL to upload files in your app.
|
|
59
|
+
*
|
|
60
|
+
* ```ts title="app/page.tsx" {1,7}
|
|
61
|
+
* import { Resource } from "sst";
|
|
62
|
+
* import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
|
63
|
+
* import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
|
|
64
|
+
*
|
|
65
|
+
* const command = new PutObjectCommand({
|
|
66
|
+
* Key: "file.txt",
|
|
67
|
+
* Bucket: Resource.MyBucket.name
|
|
68
|
+
* });
|
|
69
|
+
* await getSignedUrl(new S3Client({}), command);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export class Bucket extends Component {
|
|
73
|
+
constructor(name, args = {}, opts = {}) {
|
|
74
|
+
var _a;
|
|
75
|
+
super(__pulumiType, name, args, opts);
|
|
76
|
+
this.isSubscribed = false;
|
|
77
|
+
this.constructorName = name;
|
|
78
|
+
this.constructorOpts = opts;
|
|
79
|
+
if (args && "ref" in args) {
|
|
80
|
+
const ref = args;
|
|
81
|
+
this.bucket = output(ref.bucket);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const parent = this;
|
|
85
|
+
const access = normalizeAccess();
|
|
86
|
+
const enforceHttps = output((_a = args.enforceHttps) !== null && _a !== void 0 ? _a : true);
|
|
87
|
+
const policyArgs = normalizePolicy();
|
|
88
|
+
const bucket = createBucket();
|
|
89
|
+
createVersioning();
|
|
90
|
+
const publicAccessBlock = createPublicAccess();
|
|
91
|
+
const policy = createBucketPolicy();
|
|
92
|
+
createCorsRule();
|
|
93
|
+
// Ensure the policy is created when the bucket is used in another component
|
|
94
|
+
// (ie. bucket.name). Also, a bucket can only have one policy. We want to ensure
|
|
95
|
+
// the policy created here is created first. And SST will throw an error if
|
|
96
|
+
// another policy is created after this one.
|
|
97
|
+
this.bucket = policy.urn.apply(() => bucket);
|
|
98
|
+
function normalizeAccess() {
|
|
99
|
+
return all([args.public, args.access]).apply(([pub, access]) => pub === true ? "public" : access);
|
|
100
|
+
}
|
|
101
|
+
function normalizePolicy() {
|
|
102
|
+
var _a;
|
|
103
|
+
return output((_a = args.policy) !== null && _a !== void 0 ? _a : []).apply((policy) => policy.map((p) => (Object.assign(Object.assign({}, p), { effect: p.effect && p.effect.charAt(0).toUpperCase() + p.effect.slice(1), principals: p.principals === "*"
|
|
104
|
+
? [{ type: "*", identifiers: ["*"] }]
|
|
105
|
+
: p.principals.map((i) => (Object.assign(Object.assign({}, i), { type: {
|
|
106
|
+
aws: "AWS",
|
|
107
|
+
service: "Service",
|
|
108
|
+
federated: "Federated",
|
|
109
|
+
canonical: "Canonical",
|
|
110
|
+
}[i.type] }))), paths: p.paths
|
|
111
|
+
? p.paths.map((path) => path.replace(/^\//, ""))
|
|
112
|
+
: ["", "*"] }))));
|
|
113
|
+
}
|
|
114
|
+
function createBucket() {
|
|
115
|
+
var _a;
|
|
116
|
+
return new s3.BucketV2(...transform((_a = args.transform) === null || _a === void 0 ? void 0 : _a.bucket, `${name}Bucket`, {
|
|
117
|
+
forceDestroy: true,
|
|
118
|
+
}, { parent }));
|
|
119
|
+
}
|
|
120
|
+
function createVersioning() {
|
|
121
|
+
return output(args.versioning).apply((versioning) => {
|
|
122
|
+
var _a;
|
|
123
|
+
if (!versioning)
|
|
124
|
+
return;
|
|
125
|
+
return new s3.BucketVersioningV2(...transform((_a = args.transform) === null || _a === void 0 ? void 0 : _a.versioning, `${name}Versioning`, {
|
|
126
|
+
bucket: bucket.bucket,
|
|
127
|
+
versioningConfiguration: {
|
|
128
|
+
status: "Enabled",
|
|
129
|
+
},
|
|
130
|
+
}, { parent }));
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function createPublicAccess() {
|
|
134
|
+
var _a, _b;
|
|
135
|
+
if (((_a = args.transform) === null || _a === void 0 ? void 0 : _a.publicAccessBlock) === false)
|
|
136
|
+
return;
|
|
137
|
+
return new s3.BucketPublicAccessBlock(...transform((_b = args.transform) === null || _b === void 0 ? void 0 : _b.publicAccessBlock, `${name}PublicAccessBlock`, {
|
|
138
|
+
bucket: bucket.bucket,
|
|
139
|
+
blockPublicAcls: true,
|
|
140
|
+
blockPublicPolicy: access.apply((v) => v !== "public"),
|
|
141
|
+
ignorePublicAcls: true,
|
|
142
|
+
restrictPublicBuckets: access.apply((v) => v !== "public"),
|
|
143
|
+
}, { parent }));
|
|
144
|
+
}
|
|
145
|
+
function createBucketPolicy() {
|
|
146
|
+
return all([access, enforceHttps, policyArgs]).apply(([access, enforceHttps, policyArgs]) => {
|
|
147
|
+
var _a;
|
|
148
|
+
const statements = [];
|
|
149
|
+
if (access) {
|
|
150
|
+
statements.push({
|
|
151
|
+
principals: [
|
|
152
|
+
access === "public"
|
|
153
|
+
? { type: "*", identifiers: ["*"] }
|
|
154
|
+
: {
|
|
155
|
+
type: "Service",
|
|
156
|
+
identifiers: ["cloudfront.amazonaws.com"],
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
actions: ["s3:GetObject"],
|
|
160
|
+
resources: [interpolate `${bucket.arn}/*`],
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
if (enforceHttps) {
|
|
164
|
+
statements.push({
|
|
165
|
+
effect: "Deny",
|
|
166
|
+
principals: [{ type: "*", identifiers: ["*"] }],
|
|
167
|
+
actions: ["s3:*"],
|
|
168
|
+
resources: [bucket.arn, interpolate `${bucket.arn}/*`],
|
|
169
|
+
conditions: [
|
|
170
|
+
{
|
|
171
|
+
test: "Bool",
|
|
172
|
+
variable: "aws:SecureTransport",
|
|
173
|
+
values: ["false"],
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
statements.push(...policyArgs.map((policy) => ({
|
|
179
|
+
effect: policy.effect,
|
|
180
|
+
principals: policy.principals,
|
|
181
|
+
actions: policy.actions,
|
|
182
|
+
conditions: policy.conditions,
|
|
183
|
+
resources: policy.paths.map((path) => path === "" ? bucket.arn : interpolate `${bucket.arn}/${path}`),
|
|
184
|
+
})));
|
|
185
|
+
return new s3.BucketPolicy(...transform((_a = args.transform) === null || _a === void 0 ? void 0 : _a.policy, `${name}Policy`, {
|
|
186
|
+
bucket: bucket.bucket,
|
|
187
|
+
policy: iam.getPolicyDocumentOutput({ statements }).json,
|
|
188
|
+
}, {
|
|
189
|
+
parent,
|
|
190
|
+
dependsOn: publicAccessBlock,
|
|
191
|
+
}));
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
function createCorsRule() {
|
|
195
|
+
return output(args.cors).apply((cors) => {
|
|
196
|
+
var _a, _b, _c, _d, _e;
|
|
197
|
+
if (cors === false)
|
|
198
|
+
return;
|
|
199
|
+
return new s3.BucketCorsConfigurationV2(...transform((_a = args.transform) === null || _a === void 0 ? void 0 : _a.cors, `${name}Cors`, {
|
|
200
|
+
bucket: bucket.bucket,
|
|
201
|
+
corsRules: [
|
|
202
|
+
{
|
|
203
|
+
allowedHeaders: (_b = cors === null || cors === void 0 ? void 0 : cors.allowHeaders) !== null && _b !== void 0 ? _b : ["*"],
|
|
204
|
+
allowedMethods: (_c = cors === null || cors === void 0 ? void 0 : cors.allowMethods) !== null && _c !== void 0 ? _c : [
|
|
205
|
+
"DELETE",
|
|
206
|
+
"GET",
|
|
207
|
+
"HEAD",
|
|
208
|
+
"POST",
|
|
209
|
+
"PUT",
|
|
210
|
+
],
|
|
211
|
+
allowedOrigins: (_d = cors === null || cors === void 0 ? void 0 : cors.allowOrigins) !== null && _d !== void 0 ? _d : ["*"],
|
|
212
|
+
exposeHeaders: cors === null || cors === void 0 ? void 0 : cors.exposeHeaders,
|
|
213
|
+
maxAgeSeconds: toSeconds((_e = cors === null || cors === void 0 ? void 0 : cors.maxAge) !== null && _e !== void 0 ? _e : "0 seconds"),
|
|
214
|
+
},
|
|
215
|
+
],
|
|
216
|
+
}, { parent }));
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* The generated name of the S3 Bucket.
|
|
222
|
+
*/
|
|
223
|
+
get name() {
|
|
224
|
+
return this.bucket.bucket;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* The domain name of the bucket. Has the format `${bucketName}.s3.amazonaws.com`.
|
|
228
|
+
*/
|
|
229
|
+
get domain() {
|
|
230
|
+
return this.bucket.bucketDomainName;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* The ARN of the S3 Bucket.
|
|
234
|
+
*/
|
|
235
|
+
get arn() {
|
|
236
|
+
return this.bucket.arn;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* The underlying [resources](/docs/components/#nodes) this component creates.
|
|
240
|
+
*/
|
|
241
|
+
get nodes() {
|
|
242
|
+
return {
|
|
243
|
+
/**
|
|
244
|
+
* The Amazon S3 bucket.
|
|
245
|
+
*/
|
|
246
|
+
bucket: this.bucket,
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Reference an existing bucket with the given bucket name. This is useful when you
|
|
251
|
+
* create a bucket in one stage and want to share it in another stage. It avoids having to
|
|
252
|
+
* create a new bucket in the other stage.
|
|
253
|
+
*
|
|
254
|
+
* :::tip
|
|
255
|
+
* You can use the `static get` method to share buckets across stages.
|
|
256
|
+
* :::
|
|
257
|
+
*
|
|
258
|
+
* @param name The name of the component.
|
|
259
|
+
* @param bucketName The name of the existing S3 Bucket.
|
|
260
|
+
* @param opts? Resource options.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* Imagine you create a bucket in the `dev` stage. And in your personal stage `frank`,
|
|
264
|
+
* instead of creating a new bucket, you want to share the bucket from `dev`.
|
|
265
|
+
*
|
|
266
|
+
* ```ts title="sst.config.ts"
|
|
267
|
+
* const bucket = $app.stage === "frank"
|
|
268
|
+
* ? sst.aws.Bucket.get("MyBucket", "app-dev-mybucket-12345678")
|
|
269
|
+
* : new sst.aws.Bucket("MyBucket");
|
|
270
|
+
* ```
|
|
271
|
+
*
|
|
272
|
+
* Here `app-dev-mybucket-12345678` is the auto-generated bucket name for the bucket created
|
|
273
|
+
* in the `dev` stage. You can find this by outputting the bucket name in the `dev` stage.
|
|
274
|
+
*
|
|
275
|
+
* ```ts title="sst.config.ts"
|
|
276
|
+
* return {
|
|
277
|
+
* bucket: bucket.name
|
|
278
|
+
* };
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
static get(name, bucketName, opts) {
|
|
282
|
+
return new Bucket(name, {
|
|
283
|
+
ref: true,
|
|
284
|
+
bucket: s3.BucketV2.get(`${name}Bucket`, bucketName, undefined, opts),
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Subscribe to event notifications from this bucket. You can subscribe to these
|
|
289
|
+
* notifications with a function, a queue, or a topic.
|
|
290
|
+
*
|
|
291
|
+
* @param args The config for the event notifications.
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
*
|
|
295
|
+
* For exmaple, to notify a function:
|
|
296
|
+
*
|
|
297
|
+
* ```js title="sst.config.ts" {5}
|
|
298
|
+
* bucket.notify({
|
|
299
|
+
* notifications: [
|
|
300
|
+
* {
|
|
301
|
+
* name: "MySubscriber",
|
|
302
|
+
* function: "src/subscriber.handler"
|
|
303
|
+
* }
|
|
304
|
+
* ]
|
|
305
|
+
* });
|
|
306
|
+
* ```
|
|
307
|
+
*
|
|
308
|
+
* Or let's say you have a queue.
|
|
309
|
+
*
|
|
310
|
+
* ```js title="sst.config.ts"
|
|
311
|
+
* const myQueue = new sst.aws.Queue("MyQueue");
|
|
312
|
+
* ```
|
|
313
|
+
*
|
|
314
|
+
* You can notify it by passing in the queue.
|
|
315
|
+
*
|
|
316
|
+
* ```js title="sst.config.ts" {5}
|
|
317
|
+
* bucket.notify({
|
|
318
|
+
* notifications: [
|
|
319
|
+
* {
|
|
320
|
+
* name: "MySubscriber",
|
|
321
|
+
* queue: myQueue
|
|
322
|
+
* }
|
|
323
|
+
* ]
|
|
324
|
+
* });
|
|
325
|
+
* ```
|
|
326
|
+
*
|
|
327
|
+
* Or let's say you have a topic.
|
|
328
|
+
*
|
|
329
|
+
* ```js title="sst.config.ts"
|
|
330
|
+
* const myTopic = new sst.aws.SnsTopic("MyTopic");
|
|
331
|
+
* ```
|
|
332
|
+
*
|
|
333
|
+
* You can notify it by passing in the topic.
|
|
334
|
+
*
|
|
335
|
+
* ```js title="sst.config.ts" {5}
|
|
336
|
+
* bucket.notify({
|
|
337
|
+
* notifications: [
|
|
338
|
+
* {
|
|
339
|
+
* name: "MySubscriber",
|
|
340
|
+
* topic: myTopic
|
|
341
|
+
* }
|
|
342
|
+
* ]
|
|
343
|
+
* });
|
|
344
|
+
* ```
|
|
345
|
+
*
|
|
346
|
+
* You can also set it to only send notifications for specific S3 events.
|
|
347
|
+
*
|
|
348
|
+
* ```js {6}
|
|
349
|
+
* bucket.notify({
|
|
350
|
+
* notifications: [
|
|
351
|
+
* {
|
|
352
|
+
* name: "MySubscriber",
|
|
353
|
+
* function: "src/subscriber.handler",
|
|
354
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
355
|
+
* }
|
|
356
|
+
* ]
|
|
357
|
+
* });
|
|
358
|
+
* ```
|
|
359
|
+
*
|
|
360
|
+
* And you can add filters to be only notified from specific files in the bucket.
|
|
361
|
+
*
|
|
362
|
+
* ```js {6}
|
|
363
|
+
* bucket.notify({
|
|
364
|
+
* notifications: [
|
|
365
|
+
* {
|
|
366
|
+
* name: "MySubscriber",
|
|
367
|
+
* function: "src/subscriber.handler",
|
|
368
|
+
* filterPrefix: "images/"
|
|
369
|
+
* }
|
|
370
|
+
* ]
|
|
371
|
+
* });
|
|
372
|
+
* ```
|
|
373
|
+
*/
|
|
374
|
+
notify(args) {
|
|
375
|
+
if (this.isSubscribed) {
|
|
376
|
+
throw new VisibleError(`Cannot call "notify" on the "${this.constructorName}" bucket multiple times. Calling it again will override previous notifications.`);
|
|
377
|
+
}
|
|
378
|
+
this.isSubscribed = true;
|
|
379
|
+
const name = this.constructorName;
|
|
380
|
+
const opts = this.constructorOpts;
|
|
381
|
+
return new BucketNotification(`${name}Notifications`, Object.assign({ bucket: { name: this.bucket.bucket, arn: this.bucket.arn } }, args), opts);
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Subscribe to events from this bucket.
|
|
385
|
+
*
|
|
386
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
387
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
388
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
389
|
+
* back using the new `notify` function.
|
|
390
|
+
*
|
|
391
|
+
* @param subscriber The function that'll be notified.
|
|
392
|
+
* @param args Configure the subscription.
|
|
393
|
+
*
|
|
394
|
+
* @example
|
|
395
|
+
*
|
|
396
|
+
* ```js title="sst.config.ts"
|
|
397
|
+
* bucket.subscribe("src/subscriber.handler");
|
|
398
|
+
* ```
|
|
399
|
+
*
|
|
400
|
+
* Subscribe to specific S3 events. The `link` ensures the subscriber can access the bucket.
|
|
401
|
+
*
|
|
402
|
+
* ```js title="sst.config.ts" "link: [bucket]"
|
|
403
|
+
* bucket.subscribe({
|
|
404
|
+
* handler: "src/subscriber.handler",
|
|
405
|
+
* link: [bucket]
|
|
406
|
+
* }, {
|
|
407
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
408
|
+
* });
|
|
409
|
+
* ```
|
|
410
|
+
*
|
|
411
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
412
|
+
*
|
|
413
|
+
* ```js title="sst.config.ts" {2}
|
|
414
|
+
* bucket.subscribe("src/subscriber.handler", {
|
|
415
|
+
* filterPrefix: "images/",
|
|
416
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
417
|
+
* });
|
|
418
|
+
* ```
|
|
419
|
+
*
|
|
420
|
+
* Customize the subscriber function.
|
|
421
|
+
*
|
|
422
|
+
* ```js title="sst.config.ts"
|
|
423
|
+
* bucket.subscribe({
|
|
424
|
+
* handler: "src/subscriber.handler",
|
|
425
|
+
* timeout: "60 seconds",
|
|
426
|
+
* });
|
|
427
|
+
* ```
|
|
428
|
+
*
|
|
429
|
+
* Or pass in the ARN of an existing Lambda function.
|
|
430
|
+
*
|
|
431
|
+
* ```js title="sst.config.ts"
|
|
432
|
+
* bucket.subscribe("arn:aws:lambda:us-east-1:123456789012:function:my-function");
|
|
433
|
+
* ```
|
|
434
|
+
*/
|
|
435
|
+
subscribe(subscriber, args) {
|
|
436
|
+
this.ensureNotSubscribed();
|
|
437
|
+
return Bucket._subscribeFunction(this.constructorName, this.bucket.bucket, this.bucket.arn, subscriber, args, { provider: this.constructorOpts.provider });
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Subscribe to events of an S3 bucket that was not created in your app.
|
|
441
|
+
*
|
|
442
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
443
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
444
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
445
|
+
* back using the new `notify` function.
|
|
446
|
+
*
|
|
447
|
+
* @param bucketArn The ARN of the S3 bucket to subscribe to.
|
|
448
|
+
* @param subscriber The function that'll be notified.
|
|
449
|
+
* @param args Configure the subscription.
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
*
|
|
453
|
+
* For example, let's say you have an existing S3 bucket with the following ARN.
|
|
454
|
+
*
|
|
455
|
+
* ```js title="sst.config.ts"
|
|
456
|
+
* const bucketArn = "arn:aws:s3:::my-bucket";
|
|
457
|
+
* ```
|
|
458
|
+
*
|
|
459
|
+
* You can subscribe to it by passing in the ARN.
|
|
460
|
+
*
|
|
461
|
+
* ```js title="sst.config.ts"
|
|
462
|
+
* sst.aws.Bucket.subscribe(bucketArn, "src/subscriber.handler");
|
|
463
|
+
* ```
|
|
464
|
+
*
|
|
465
|
+
* Subscribe to specific S3 events.
|
|
466
|
+
*
|
|
467
|
+
* ```js title="sst.config.ts"
|
|
468
|
+
* sst.aws.Bucket.subscribe(bucketArn, "src/subscriber.handler", {
|
|
469
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
470
|
+
* });
|
|
471
|
+
* ```
|
|
472
|
+
*
|
|
473
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
474
|
+
*
|
|
475
|
+
* ```js title="sst.config.ts" {2}
|
|
476
|
+
* sst.aws.Bucket.subscribe(bucketArn, "src/subscriber.handler", {
|
|
477
|
+
* filterPrefix: "images/",
|
|
478
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
479
|
+
* });
|
|
480
|
+
* ```
|
|
481
|
+
*
|
|
482
|
+
* Customize the subscriber function.
|
|
483
|
+
*
|
|
484
|
+
* ```js title="sst.config.ts"
|
|
485
|
+
* sst.aws.Bucket.subscribe(bucketArn, {
|
|
486
|
+
* handler: "src/subscriber.handler",
|
|
487
|
+
* timeout: "60 seconds",
|
|
488
|
+
* });
|
|
489
|
+
* ```
|
|
490
|
+
*/
|
|
491
|
+
static subscribe(bucketArn, subscriber, args) {
|
|
492
|
+
return output(bucketArn).apply((bucketArn) => {
|
|
493
|
+
const bucketName = parseBucketArn(bucketArn).bucketName;
|
|
494
|
+
return this._subscribeFunction(bucketName, bucketName, bucketArn, subscriber, args);
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
static _subscribeFunction(name, bucketName, bucketArn, subscriber, args = {}, opts = {}) {
|
|
498
|
+
return all([bucketArn, subscriber, args]).apply(([bucketArn, subscriber, args]) => {
|
|
499
|
+
const subscriberId = this.buildSubscriberId(bucketArn, typeof subscriber === "string" ? subscriber : subscriber.handler);
|
|
500
|
+
return new BucketLambdaSubscriber(`${name}Subscriber${subscriberId}`, Object.assign({ bucket: { name: bucketName, arn: bucketArn }, subscriber,
|
|
501
|
+
subscriberId }, args), opts);
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Subscribe to events from this bucket with an SQS Queue.
|
|
506
|
+
*
|
|
507
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
508
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
509
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
510
|
+
* back using the new `notify` function.
|
|
511
|
+
*
|
|
512
|
+
* @param queueArn The ARN of the queue that'll be notified.
|
|
513
|
+
* @param args Configure the subscription.
|
|
514
|
+
*
|
|
515
|
+
* @example
|
|
516
|
+
*
|
|
517
|
+
* For example, let's say you have a queue.
|
|
518
|
+
*
|
|
519
|
+
* ```js title="sst.config.ts"
|
|
520
|
+
* const queue = new sst.aws.Queue("MyQueue");
|
|
521
|
+
* ```
|
|
522
|
+
*
|
|
523
|
+
* You can subscribe to this bucket with it.
|
|
524
|
+
*
|
|
525
|
+
* ```js title="sst.config.ts"
|
|
526
|
+
* bucket.subscribe(queue.arn);
|
|
527
|
+
* ```
|
|
528
|
+
*
|
|
529
|
+
* Subscribe to specific S3 events.
|
|
530
|
+
*
|
|
531
|
+
* ```js title="sst.config.ts"
|
|
532
|
+
* bucket.subscribe(queue.arn, {
|
|
533
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
534
|
+
* });
|
|
535
|
+
* ```
|
|
536
|
+
*
|
|
537
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
538
|
+
*
|
|
539
|
+
* ```js title="sst.config.ts" {2}
|
|
540
|
+
* bucket.subscribe(queue.arn, {
|
|
541
|
+
* filterPrefix: "images/",
|
|
542
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
543
|
+
* });
|
|
544
|
+
* ```
|
|
545
|
+
*/
|
|
546
|
+
subscribeQueue(queueArn, args = {}) {
|
|
547
|
+
this.ensureNotSubscribed();
|
|
548
|
+
return Bucket._subscribeQueue(this.constructorName, this.bucket.bucket, this.arn, queueArn, args, { provider: this.constructorOpts.provider });
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Subscribe to events of an S3 bucket that was not created in your app with an SQS Queue.
|
|
552
|
+
*
|
|
553
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
554
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
555
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
556
|
+
* back using the new `notify` function.
|
|
557
|
+
*
|
|
558
|
+
* @param bucketArn The ARN of the S3 bucket to subscribe to.
|
|
559
|
+
* @param queueArn The ARN of the queue that'll be notified.
|
|
560
|
+
* @param args Configure the subscription.
|
|
561
|
+
*
|
|
562
|
+
* @example
|
|
563
|
+
*
|
|
564
|
+
* For example, let's say you have an existing S3 bucket and SQS queue with the following ARNs.
|
|
565
|
+
*
|
|
566
|
+
* ```js title="sst.config.ts"
|
|
567
|
+
* const bucketArn = "arn:aws:s3:::my-bucket";
|
|
568
|
+
* const queueArn = "arn:aws:sqs:us-east-1:123456789012:MyQueue";
|
|
569
|
+
* ```
|
|
570
|
+
*
|
|
571
|
+
* You can subscribe to the bucket with the queue.
|
|
572
|
+
*
|
|
573
|
+
* ```js title="sst.config.ts"
|
|
574
|
+
* sst.aws.Bucket.subscribeQueue(bucketArn, queueArn);
|
|
575
|
+
* ```
|
|
576
|
+
*
|
|
577
|
+
* Subscribe to specific S3 events.
|
|
578
|
+
*
|
|
579
|
+
* ```js title="sst.config.ts"
|
|
580
|
+
* sst.aws.Bucket.subscribeQueue(bucketArn, queueArn, {
|
|
581
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
582
|
+
* });
|
|
583
|
+
* ```
|
|
584
|
+
*
|
|
585
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
586
|
+
*
|
|
587
|
+
* ```js title="sst.config.ts" {2}
|
|
588
|
+
* sst.aws.Bucket.subscribeQueue(bucketArn, queueArn, {
|
|
589
|
+
* filterPrefix: "images/",
|
|
590
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
591
|
+
* });
|
|
592
|
+
* ```
|
|
593
|
+
*/
|
|
594
|
+
static subscribeQueue(bucketArn, queueArn, args) {
|
|
595
|
+
return output(bucketArn).apply((bucketArn) => {
|
|
596
|
+
const bucketName = parseBucketArn(bucketArn).bucketName;
|
|
597
|
+
return this._subscribeQueue(bucketName, bucketName, bucketArn, queueArn, args);
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
static _subscribeQueue(name, bucketName, bucketArn, queueArn, args = {}, opts = {}) {
|
|
601
|
+
return all([bucketArn, queueArn, args]).apply(([bucketArn, queueArn, args]) => {
|
|
602
|
+
const subscriberId = this.buildSubscriberId(bucketArn, queueArn);
|
|
603
|
+
return new BucketQueueSubscriber(`${name}Subscriber${subscriberId}`, Object.assign({ bucket: { name: bucketName, arn: bucketArn }, queue: queueArn, subscriberId }, args), opts);
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Subscribe to events from this bucket with an SNS Topic.
|
|
608
|
+
*
|
|
609
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
610
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
611
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
612
|
+
* back using the new `notify` function.
|
|
613
|
+
*
|
|
614
|
+
* @param topicArn The ARN of the topic that'll be notified.
|
|
615
|
+
* @param args Configure the subscription.
|
|
616
|
+
*
|
|
617
|
+
* @example
|
|
618
|
+
*
|
|
619
|
+
* For example, let's say you have a topic.
|
|
620
|
+
*
|
|
621
|
+
* ```js title="sst.config.ts"
|
|
622
|
+
* const topic = new sst.aws.SnsTopic("MyTopic");
|
|
623
|
+
* ```
|
|
624
|
+
*
|
|
625
|
+
* You can subscribe to this bucket with it.
|
|
626
|
+
*
|
|
627
|
+
* ```js title="sst.config.ts"
|
|
628
|
+
* bucket.subscribe(topic.arn);
|
|
629
|
+
* ```
|
|
630
|
+
*
|
|
631
|
+
* Subscribe to specific S3 events.
|
|
632
|
+
*
|
|
633
|
+
* ```js title="sst.config.ts"
|
|
634
|
+
* bucket.subscribe(topic.arn, {
|
|
635
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
636
|
+
* });
|
|
637
|
+
* ```
|
|
638
|
+
*
|
|
639
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
640
|
+
*
|
|
641
|
+
* ```js title="sst.config.ts" {2}
|
|
642
|
+
* bucket.subscribe(topic.arn, {
|
|
643
|
+
* filterPrefix: "images/",
|
|
644
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
645
|
+
* });
|
|
646
|
+
* ```
|
|
647
|
+
*/
|
|
648
|
+
subscribeTopic(topicArn, args = {}) {
|
|
649
|
+
this.ensureNotSubscribed();
|
|
650
|
+
return Bucket._subscribeTopic(this.constructorName, this.bucket.bucket, this.arn, topicArn, args, { provider: this.constructorOpts.provider });
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Subscribe to events of an S3 bucket that was not created in your app with an SNS Topic.
|
|
654
|
+
*
|
|
655
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
656
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
657
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
658
|
+
* back using the new `notify` function.
|
|
659
|
+
*
|
|
660
|
+
* @param bucketArn The ARN of the S3 bucket to subscribe to.
|
|
661
|
+
* @param topicArn The ARN of the topic that'll be notified.
|
|
662
|
+
* @param args Configure the subscription.
|
|
663
|
+
*
|
|
664
|
+
* @example
|
|
665
|
+
*
|
|
666
|
+
* For example, let's say you have an existing S3 bucket and SNS topic with the following ARNs.
|
|
667
|
+
*
|
|
668
|
+
* ```js title="sst.config.ts"
|
|
669
|
+
* const bucketArn = "arn:aws:s3:::my-bucket";
|
|
670
|
+
* const topicArn = "arn:aws:sns:us-east-1:123456789012:MyTopic";
|
|
671
|
+
* ```
|
|
672
|
+
*
|
|
673
|
+
* You can subscribe to the bucket with the topic.
|
|
674
|
+
*
|
|
675
|
+
* ```js title="sst.config.ts"
|
|
676
|
+
* sst.aws.Bucket.subscribe(bucketArn, topicArn);
|
|
677
|
+
* ```
|
|
678
|
+
*
|
|
679
|
+
* Subscribe to specific S3 events.
|
|
680
|
+
*
|
|
681
|
+
* ```js title="sst.config.ts"
|
|
682
|
+
* sst.aws.Bucket.subscribe(bucketArn, topicArn, {
|
|
683
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
684
|
+
* });
|
|
685
|
+
* ```
|
|
686
|
+
*
|
|
687
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
688
|
+
*
|
|
689
|
+
* ```js title="sst.config.ts" {2}
|
|
690
|
+
* sst.aws.Bucket.subscribe(bucketArn, topicArn, {
|
|
691
|
+
* filterPrefix: "images/",
|
|
692
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
693
|
+
* });
|
|
694
|
+
* ```
|
|
695
|
+
*/
|
|
696
|
+
static subscribeTopic(bucketArn, topicArn, args) {
|
|
697
|
+
return output(bucketArn).apply((bucketArn) => {
|
|
698
|
+
const bucketName = parseBucketArn(bucketArn).bucketName;
|
|
699
|
+
return this._subscribeTopic(bucketName, bucketName, bucketArn, topicArn, args);
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
static _subscribeTopic(name, bucketName, bucketArn, topicArn, args = {}, opts = {}) {
|
|
703
|
+
return all([bucketArn, topicArn, args]).apply(([bucketArn, topicArn, args]) => {
|
|
704
|
+
const subscriberId = this.buildSubscriberId(bucketArn, topicArn);
|
|
705
|
+
return new BucketTopicSubscriber(`${name}Subscriber${subscriberId}`, Object.assign({ bucket: { name: bucketName, arn: bucketArn }, topic: topicArn, subscriberId }, args), opts);
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
static buildSubscriberId(bucketArn, _discriminator) {
|
|
709
|
+
return logicalName(hashStringToPrettyString([
|
|
710
|
+
bucketArn,
|
|
711
|
+
// Temporarily only allowing one subscriber per bucket because of the
|
|
712
|
+
// AWS/Terraform issue that appending/removing a notification deletes
|
|
713
|
+
// all existing notifications.
|
|
714
|
+
//
|
|
715
|
+
// A solution would be to implement a dynamic provider. On create,
|
|
716
|
+
// get existing notifications then append. And on delete, get existing
|
|
717
|
+
// notifications then remove from the list.
|
|
718
|
+
//
|
|
719
|
+
// https://github.com/hashicorp/terraform-provider-aws/issues/501
|
|
720
|
+
//
|
|
721
|
+
// Commenting out the lines below to ensure the id never changes.
|
|
722
|
+
// Because on id change, the removal of notification happens after
|
|
723
|
+
// the creation of notification. And the newly created notification
|
|
724
|
+
// gets removed.
|
|
725
|
+
//...events,
|
|
726
|
+
//args.filterPrefix ?? "",
|
|
727
|
+
//args.filterSuffix ?? "",
|
|
728
|
+
//discriminator,
|
|
729
|
+
].join(""), 6));
|
|
730
|
+
}
|
|
731
|
+
ensureNotSubscribed() {
|
|
732
|
+
if (this.isSubscribed)
|
|
733
|
+
throw new VisibleError(`Cannot subscribe to the "${this.constructorName}" bucket multiple times. An S3 bucket can only have one subscriber.`);
|
|
734
|
+
this.isSubscribed = true;
|
|
735
|
+
}
|
|
736
|
+
/** @internal */
|
|
737
|
+
getSSTLink() {
|
|
738
|
+
return {
|
|
739
|
+
properties: {
|
|
740
|
+
name: this.name,
|
|
741
|
+
},
|
|
742
|
+
include: [
|
|
743
|
+
permission({
|
|
744
|
+
actions: ["s3:*"],
|
|
745
|
+
resources: [this.arn, interpolate `${this.arn}/*`],
|
|
746
|
+
}),
|
|
747
|
+
],
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
const __pulumiType = "sst:aws:Bucket";
|
|
752
|
+
// @ts-expect-error
|
|
753
|
+
Bucket.__pulumiType = __pulumiType;
|
|
754
|
+
//# sourceMappingURL=bucket.js.map
|