monorise 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/index.d.ts +254 -0
- package/dist/base/index.js +44 -0
- package/dist/base/index.js.map +1 -0
- package/dist/cli/cli.d.ts +1 -0
- package/dist/cli/cli.js +461 -0
- package/dist/cli/cli.js.map +1 -0
- package/dist/core/index.d.ts +4767 -0
- package/dist/core/index.js +7941 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/dist/react/actions/app.action.d.ts +46 -0
- package/dist/react/actions/app.action.d.ts.map +1 -0
- package/dist/react/actions/auth.action.d.ts +24 -0
- package/dist/react/actions/auth.action.d.ts.map +1 -0
- package/dist/react/actions/config.action.d.ts +10 -0
- package/dist/react/actions/config.action.d.ts.map +1 -0
- package/dist/react/actions/core.action.d.ts +219 -0
- package/dist/react/actions/core.action.d.ts.map +1 -0
- package/dist/react/index.d.ts +1093 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +2344 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/lib/api.d.ts +38 -0
- package/dist/react/lib/api.d.ts.map +1 -0
- package/dist/react/lib/constant.d.ts +2 -0
- package/dist/react/lib/constant.d.ts.map +1 -0
- package/dist/react/lib/entity.d.ts +10 -0
- package/dist/react/lib/entity.d.ts.map +1 -0
- package/dist/react/lib/utils.d.ts +10 -0
- package/dist/react/lib/utils.d.ts.map +1 -0
- package/dist/react/services/auth.service.d.ts +21 -0
- package/dist/react/services/auth.service.d.ts.map +1 -0
- package/dist/react/services/core.service.d.ts +76 -0
- package/dist/react/services/core.service.d.ts.map +1 -0
- package/dist/react/services/filestore.service.d.ts +22 -0
- package/dist/react/services/filestore.service.d.ts.map +1 -0
- package/dist/react/store/monorise.store.d.ts +169 -0
- package/dist/react/store/monorise.store.d.ts.map +1 -0
- package/dist/react/tsup.config.d.ts +3 -0
- package/dist/react/tsup.config.d.ts.map +1 -0
- package/dist/react/types/api.type.d.ts +30 -0
- package/dist/react/types/api.type.d.ts.map +1 -0
- package/dist/react/types/axios.type.d.ts +13 -0
- package/dist/react/types/axios.type.d.ts.map +1 -0
- package/dist/react/types/monorise.type.d.ts +8 -0
- package/dist/react/types/monorise.type.d.ts.map +1 -0
- package/dist/react/types/mutual.type.d.ts +21 -0
- package/dist/react/types/mutual.type.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/analog.d.ts +423 -0
- package/dist/sst/.sst/platform/src/components/aws/analog.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts +74 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts +542 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-api-key.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts +36 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-base-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts +39 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-integration-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-usage-plan.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts +1002 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts +54 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts +28 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-base-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts +59 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts +54 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-private-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts +44 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-url-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts +931 -0
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts +52 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-function.d.ts +33 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-function.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-resolver.d.ts +41 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync-resolver.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts +638 -0
- package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/astro.d.ts +421 -0
- package/dist/sst/.sst/platform/src/components/aws/astro.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts +702 -0
- package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts +26 -0
- package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/auth.d.ts +295 -0
- package/dist/sst/.sst/platform/src/components/aws/auth.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts +61 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-notification.d.ts +47 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-notification.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-queue-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket-topic-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts +1216 -0
- package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-base-subscriber.d.ts +20 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-base-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts +49 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts +44 -0
- package/dist/sst/.sst/platform/src/components/aws/bus-queue-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/bus.d.ts +403 -0
- package/dist/sst/.sst/platform/src/components/aws/bus.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts +299 -0
- package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster-v1.d.ts +882 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts +306 -0
- package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts +194 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-provider.d.ts +38 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-provider.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts +50 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool-client.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts +603 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cron.d.ts +250 -0
- package/dist/sst/.sst/platform/src/components/aws/cron.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dns-validated-certificate.d.ts +27 -0
- package/dist/sst/.sst/platform/src/components/aws/dns-validated-certificate.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dns.d.ts +94 -0
- package/dist/sst/.sst/platform/src/components/aws/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts +568 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/efs.d.ts +217 -0
- package/dist/sst/.sst/platform/src/components/aws/efs.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/email.d.ts +291 -0
- package/dist/sst/.sst/platform/src/components/aws/email.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts +803 -0
- package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/function.d.ts +1629 -0
- package/dist/sst/.sst/platform/src/components/aws/function.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigateway-account.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts +144 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/apigatewayv2-domain.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts +40 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/bootstrap.d.ts +13 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/bootstrap.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/container-builder.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/container-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts +10 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts +7 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts +6 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/https-redirect.d.ts +38 -0
- package/dist/sst/.sst/platform/src/components/aws/https-redirect.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/iam-edit.d.ts +39 -0
- package/dist/sst/.sst/platform/src/components/aws/iam-edit.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/index.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts +249 -0
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts +17 -0
- package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/logging.d.ts +26 -0
- package/dist/sst/.sst/platform/src/components/aws/logging.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts +496 -0
- package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts +517 -0
- package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/nuxt.d.ts +495 -0
- package/dist/sst/.sst/platform/src/components/aws/nuxt.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts +295 -0
- package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts +165 -0
- package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/permission.d.ts +40 -0
- package/dist/sst/.sst/platform/src/components/aws/permission.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts +317 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts +500 -0
- package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/bucket-files.d.ts +18 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/bucket-files.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts +13 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-deployment-waiter.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/distribution-invalidation.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/function-environment-update.d.ts +29 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/function-environment-update.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/hosted-zone-lookup.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-keys.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-keys.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/kv-routes-update.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/origin-access-control.d.ts +8 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/origin-access-control.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts +8 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/rds-role-lookup.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/vector-table.d.ts +12 -0
- package/dist/sst/.sst/platform/src/components/aws/providers/vector-table.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts +48 -0
- package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/queue.d.ts +485 -0
- package/dist/sst/.sst/platform/src/components/aws/queue.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/react.d.ts +416 -0
- package/dist/sst/.sst/platform/src/components/aws/react.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts +232 -0
- package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts +338 -0
- package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/redis.d.ts +364 -0
- package/dist/sst/.sst/platform/src/components/aws/redis.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/remix.d.ts +423 -0
- package/dist/sst/.sst/platform/src/components/aws/remix.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router-base-route.d.ts +28 -0
- package/dist/sst/.sst/platform/src/components/aws/router-base-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router-bucket-route.d.ts +29 -0
- package/dist/sst/.sst/platform/src/components/aws/router-bucket-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router-url-route.d.ts +28 -0
- package/dist/sst/.sst/platform/src/components/aws/router-url-route.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/router.d.ts +1272 -0
- package/dist/sst/.sst/platform/src/components/aws/router.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/service-v1.d.ts +78 -0
- package/dist/sst/.sst/platform/src/components/aws/service-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/service.d.ts +1625 -0
- package/dist/sst/.sst/platform/src/components/aws/service.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts +55 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-queue-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts +389 -0
- package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/solid-start.d.ts +414 -0
- package/dist/sst/.sst/platform/src/components/aws/solid-start.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts +685 -0
- package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/static-site.d.ts +736 -0
- package/dist/sst/.sst/platform/src/components/aws/static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/choice.d.ts +73 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/choice.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/fail.d.ts +63 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/fail.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/map.d.ts +236 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/map.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/parallel.d.ts +127 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/parallel.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/pass.d.ts +39 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/pass.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts +231 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/succeed.d.ts +26 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/succeed.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts +477 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/wait.d.ts +91 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions/wait.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts +473 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/svelte-kit.d.ts +417 -0
- package/dist/sst/.sst/platform/src/components/aws/svelte-kit.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts +354 -0
- package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/task.d.ts +322 -0
- package/dist/sst/.sst/platform/src/components/aws/task.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/vector.d.ts +150 -0
- package/dist/sst/.sst/platform/src/components/aws/vector.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc-v1.d.ts +208 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc-v1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts +444 -0
- package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/base/base-site.d.ts +53 -0
- package/dist/sst/.sst/platform/src/components/base/base-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/base/base-ssr-site.d.ts +13 -0
- package/dist/sst/.sst/platform/src/components/base/base-ssr-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/base/base-static-site.d.ts +199 -0
- package/dist/sst/.sst/platform/src/components/base/base-static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/account-id.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/account-id.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/auth.d.ts +22 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/auth.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts +69 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts +103 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts +121 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts +107 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/dns.d.ts +94 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/astro.d.ts +186 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/astro.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/index.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/solid-start.d.ts +171 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/solid-start.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/static-site.d.ts +222 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/experimental/static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts +19 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/fetch.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts +10 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/helpers/worker-builder.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts +16 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts +107 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts +20 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/dns-record.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts +23 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/kv-data.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-assets.d.ts +18 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-assets.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts +22 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-url.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts +22 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts +60 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/ssr-site.d.ts +51 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/ssr-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts +262 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts +295 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/component.d.ts +37 -0
- package/dist/sst/.sst/platform/src/components/component.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cpu.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/cpu.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/dns.d.ts +59 -0
- package/dist/sst/.sst/platform/src/components/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/duration.d.ts +7 -0
- package/dist/sst/.sst/platform/src/components/duration.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/error.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/error.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/experimental/dev-command.d.ts +99 -0
- package/dist/sst/.sst/platform/src/components/experimental/dev-command.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/experimental/index.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/experimental/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/index.d.ts +16 -0
- package/dist/sst/.sst/platform/src/components/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/input.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/input.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/link.d.ts +41 -0
- package/dist/sst/.sst/platform/src/components/link.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/linkable.d.ts +271 -0
- package/dist/sst/.sst/platform/src/components/linkable.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/naming.d.ts +7 -0
- package/dist/sst/.sst/platform/src/components/naming.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/path.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/path.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/rpc/rpc.d.ts +19 -0
- package/dist/sst/.sst/platform/src/components/rpc/rpc.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/secret.d.ts +125 -0
- package/dist/sst/.sst/platform/src/components/secret.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/size.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/size.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/account-id.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/vercel/account-id.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/dns.d.ts +73 -0
- package/dist/sst/.sst/platform/src/components/vercel/dns.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/index.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/vercel/index.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/vercel/providers/dns-record.d.ts +14 -0
- package/dist/sst/.sst/platform/src/components/vercel/providers/dns-record.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/config.d.ts +1258 -0
- package/dist/sst/.sst/platform/src/config.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/compare-semver.d.ts +4 -0
- package/dist/sst/.sst/platform/src/util/compare-semver.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/fs.d.ts +5 -0
- package/dist/sst/.sst/platform/src/util/fs.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/lazy.d.ts +2 -0
- package/dist/sst/.sst/platform/src/util/lazy.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/semaphore.d.ts +9 -0
- package/dist/sst/.sst/platform/src/util/semaphore.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/util/warn.d.ts +2 -0
- package/dist/sst/.sst/platform/src/util/warn.d.ts.map +1 -0
- package/dist/sst/components/dashboard.d.ts +2 -0
- package/dist/sst/components/dashboard.d.ts.map +1 -0
- package/dist/sst/components/monorise-core.d.ts +18 -0
- package/dist/sst/components/monorise-core.d.ts.map +1 -0
- package/dist/sst/components/q-function.d.ts +17 -0
- package/dist/sst/components/q-function.d.ts.map +1 -0
- package/dist/sst/components/single-table.d.ts +14 -0
- package/dist/sst/components/single-table.d.ts.map +1 -0
- package/dist/sst/constants/event.d.ts +73 -0
- package/dist/sst/constants/event.d.ts.map +1 -0
- package/dist/sst/constants/table.d.ts +3 -0
- package/dist/sst/constants/table.d.ts.map +1 -0
- package/dist/sst/index.d.ts +11 -0
- package/dist/sst/index.d.ts.map +1 -0
- package/dist/sst/index.js +609 -0
- package/dist/sst/index.js.map +1 -0
- package/dist/sst/sst.config.d.ts +3 -0
- package/dist/sst/sst.config.d.ts.map +1 -0
- package/dist/sst/tsup.config.d.ts +3 -0
- package/dist/sst/tsup.config.d.ts.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,1216 @@
|
|
|
1
|
+
import { ComponentResourceOptions, Output } from "@pulumi/pulumi";
|
|
2
|
+
import { Component, Prettify, Transform } from "../component";
|
|
3
|
+
import { Link } from "../link";
|
|
4
|
+
import type { Input } from "../input";
|
|
5
|
+
import { FunctionArgs, FunctionArn } from "./function";
|
|
6
|
+
import { Duration, DurationDays } from "../duration";
|
|
7
|
+
import { BucketLambdaSubscriber } from "./bucket-lambda-subscriber";
|
|
8
|
+
import { s3 } from "@pulumi/aws";
|
|
9
|
+
import { BucketQueueSubscriber } from "./bucket-queue-subscriber";
|
|
10
|
+
import { BucketTopicSubscriber } from "./bucket-topic-subscriber";
|
|
11
|
+
import { Queue } from "./queue";
|
|
12
|
+
import { SnsTopic } from "./sns-topic";
|
|
13
|
+
import { BucketNotification } from "./bucket-notification";
|
|
14
|
+
interface BucketCorsArgs {
|
|
15
|
+
/**
|
|
16
|
+
* The HTTP headers that origins can include in requests to the bucket.
|
|
17
|
+
* @default `["*"]`
|
|
18
|
+
* @example
|
|
19
|
+
* ```js
|
|
20
|
+
* {
|
|
21
|
+
* cors: {
|
|
22
|
+
* allowHeaders: ["date", "keep-alive", "x-custom-header"]
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
allowHeaders?: Input<Input<string>[]>;
|
|
28
|
+
/**
|
|
29
|
+
* The origins that can access the bucket.
|
|
30
|
+
* @default `["*"]`
|
|
31
|
+
* @example
|
|
32
|
+
* ```js
|
|
33
|
+
* {
|
|
34
|
+
* cors: {
|
|
35
|
+
* allowOrigins: ["https://www.example.com", "http://localhost:60905"]
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
* Or the wildcard for all origins.
|
|
40
|
+
* ```js
|
|
41
|
+
* {
|
|
42
|
+
* cors: {
|
|
43
|
+
* allowOrigins: ["*"]
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
allowOrigins?: Input<Input<string>[]>;
|
|
49
|
+
/**
|
|
50
|
+
* The HTTP methods that are allowed when calling the bucket.
|
|
51
|
+
* @default `["DELETE" | "GET" | "HEAD" | "POST" | "PUT"]`
|
|
52
|
+
* @example
|
|
53
|
+
* ```js
|
|
54
|
+
* {
|
|
55
|
+
* cors: {
|
|
56
|
+
* allowMethods: ["GET", "POST", "DELETE"]
|
|
57
|
+
* }
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
allowMethods?: Input<Input<"DELETE" | "GET" | "HEAD" | "POST" | "PUT">[]>;
|
|
62
|
+
/**
|
|
63
|
+
* The HTTP headers you want to expose to an origin that calls the bucket.
|
|
64
|
+
* @default `[]`
|
|
65
|
+
* @example
|
|
66
|
+
* ```js
|
|
67
|
+
* {
|
|
68
|
+
* cors: {
|
|
69
|
+
* exposeHeaders: ["date", "keep-alive", "x-custom-header"]
|
|
70
|
+
* }
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
exposeHeaders?: Input<Input<string>[]>;
|
|
75
|
+
/**
|
|
76
|
+
* The maximum amount of time the browser can cache results of a preflight request. By
|
|
77
|
+
* default the browser doesn't cache the results. The maximum value is `86400 seconds` or `1 day`.
|
|
78
|
+
* @default `"0 seconds"`
|
|
79
|
+
* @example
|
|
80
|
+
* ```js
|
|
81
|
+
* {
|
|
82
|
+
* cors: {
|
|
83
|
+
* maxAge: "1 day"
|
|
84
|
+
* }
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
maxAge?: Input<Duration>;
|
|
89
|
+
}
|
|
90
|
+
interface BucketLifecycleArgs {
|
|
91
|
+
/**
|
|
92
|
+
* The unique identifier for the lifecycle rule.
|
|
93
|
+
*
|
|
94
|
+
* This ID must be unique across all lifecycle rules in the bucket and cannot exceed 255 characters.
|
|
95
|
+
* Whitespace-only values are not allowed.
|
|
96
|
+
*
|
|
97
|
+
* If not provided, SST will generate a unique ID based on the bucket component name and rule index.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* Use stable IDs to ensure rule identity is preserved when reordering rules.
|
|
101
|
+
* ```js
|
|
102
|
+
* {
|
|
103
|
+
* id: "expire-tmp-files",
|
|
104
|
+
* prefix: "/tmp",
|
|
105
|
+
* expiresIn: "7 days"
|
|
106
|
+
* }
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
id?: Input<string>;
|
|
110
|
+
/**
|
|
111
|
+
* An S3 object key prefix that the lifecycle rule applies to.
|
|
112
|
+
* @example
|
|
113
|
+
* Applies to all the objects in the `images/` folder.
|
|
114
|
+
* ```js
|
|
115
|
+
* {
|
|
116
|
+
* prefix: "images/"
|
|
117
|
+
* }
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
prefix?: Input<string>;
|
|
121
|
+
/**
|
|
122
|
+
* Whether the lifecycle rule is enabled.
|
|
123
|
+
* @example
|
|
124
|
+
* ```js
|
|
125
|
+
* {
|
|
126
|
+
* enabled: true
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
* @default `true`
|
|
130
|
+
*/
|
|
131
|
+
enabled?: Input<boolean>;
|
|
132
|
+
/**
|
|
133
|
+
* Days after which the objects in the bucket should expire.
|
|
134
|
+
* @example
|
|
135
|
+
* ```js
|
|
136
|
+
* {
|
|
137
|
+
* expiresIn: "30 days"
|
|
138
|
+
* }
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
expiresIn?: Input<DurationDays>;
|
|
142
|
+
/**
|
|
143
|
+
* Date after which the objects in the bucket should expire. Defaults to midnight UTC time.
|
|
144
|
+
* @example
|
|
145
|
+
* ```js
|
|
146
|
+
* {
|
|
147
|
+
* expiresAt: "2023-08-22"
|
|
148
|
+
* }
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
expiresAt?: Input<string>;
|
|
152
|
+
}
|
|
153
|
+
export interface BucketArgs {
|
|
154
|
+
/**
|
|
155
|
+
* Enable public read access for all the files in the bucket.
|
|
156
|
+
*
|
|
157
|
+
* :::tip
|
|
158
|
+
* You don't need to enable this if you're using CloudFront to serve files from the bucket.
|
|
159
|
+
* :::
|
|
160
|
+
*
|
|
161
|
+
* Should only be turned on if you want to host public files directly from the bucket.
|
|
162
|
+
* @deprecated Use `access` instead.
|
|
163
|
+
* @default `false`
|
|
164
|
+
* @example
|
|
165
|
+
* ```js
|
|
166
|
+
* {
|
|
167
|
+
* public: true
|
|
168
|
+
* }
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
public?: Input<boolean>;
|
|
172
|
+
/**
|
|
173
|
+
* Enable public read access for all the files in the bucket. By default, no access is
|
|
174
|
+
* granted.
|
|
175
|
+
*
|
|
176
|
+
* :::tip
|
|
177
|
+
* If you are using the `Router` to serve files from this bucket, you need to allow
|
|
178
|
+
* `cloudfront` access the bucket.
|
|
179
|
+
* :::
|
|
180
|
+
*
|
|
181
|
+
* This adds a statement to the bucket policy that either allows `public` access or just
|
|
182
|
+
* `cloudfront` access.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```js
|
|
186
|
+
* {
|
|
187
|
+
* access: "public"
|
|
188
|
+
* }
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
access?: Input<"public" | "cloudfront">;
|
|
192
|
+
/**
|
|
193
|
+
* Configure the policy for the bucket.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* Restrict Access to Specific IP Addresses
|
|
197
|
+
*
|
|
198
|
+
* ```js
|
|
199
|
+
* {
|
|
200
|
+
* policy: [{
|
|
201
|
+
* actions: ["s3:*"],
|
|
202
|
+
* principals: "*",
|
|
203
|
+
* conditions: [
|
|
204
|
+
* {
|
|
205
|
+
* test: "IpAddress",
|
|
206
|
+
* variable: "aws:SourceIp",
|
|
207
|
+
* values: ["10.0.0.0/16"]
|
|
208
|
+
* }
|
|
209
|
+
* ]
|
|
210
|
+
* }]
|
|
211
|
+
* }
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* Allow Specific IAM User Access
|
|
215
|
+
*
|
|
216
|
+
* ```js
|
|
217
|
+
* {
|
|
218
|
+
* policy: [{
|
|
219
|
+
* actions: ["s3:*"],
|
|
220
|
+
* principals: [{
|
|
221
|
+
* type: "aws",
|
|
222
|
+
* identifiers: ["arn:aws:iam::123456789012:user/specific-user"]
|
|
223
|
+
* }],
|
|
224
|
+
* }]
|
|
225
|
+
* }
|
|
226
|
+
* ```
|
|
227
|
+
*
|
|
228
|
+
* Cross-Account Access
|
|
229
|
+
*
|
|
230
|
+
* ```js
|
|
231
|
+
* {
|
|
232
|
+
* policy: [{
|
|
233
|
+
* actions: ["s3:GetObject", "s3:ListBucket"],
|
|
234
|
+
* principals: [{
|
|
235
|
+
* type: "aws",
|
|
236
|
+
* identifiers: ["123456789012"]
|
|
237
|
+
* }],
|
|
238
|
+
* }]
|
|
239
|
+
* }
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
policy?: Input<Input<{
|
|
243
|
+
/**
|
|
244
|
+
* Configures whether the permission is allowed or denied.
|
|
245
|
+
* @default `"allow"`
|
|
246
|
+
* @example
|
|
247
|
+
* ```ts
|
|
248
|
+
* {
|
|
249
|
+
* effect: "deny"
|
|
250
|
+
* }
|
|
251
|
+
* ```
|
|
252
|
+
*/
|
|
253
|
+
effect?: Input<"allow" | "deny">;
|
|
254
|
+
/**
|
|
255
|
+
* The [IAM actions](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html#actions_table) that can be performed.
|
|
256
|
+
* @example
|
|
257
|
+
* ```js
|
|
258
|
+
* {
|
|
259
|
+
* actions: ["s3:*"]
|
|
260
|
+
* }
|
|
261
|
+
* ```
|
|
262
|
+
*/
|
|
263
|
+
actions: Input<Input<string>[]>;
|
|
264
|
+
/**
|
|
265
|
+
* The principals that can perform the actions.
|
|
266
|
+
* @example
|
|
267
|
+
* Allow anyone to perform the actions.
|
|
268
|
+
*
|
|
269
|
+
* ```js
|
|
270
|
+
* {
|
|
271
|
+
* principals: "*"
|
|
272
|
+
* }
|
|
273
|
+
* ```
|
|
274
|
+
*
|
|
275
|
+
* Allow anyone within an AWS account.
|
|
276
|
+
*
|
|
277
|
+
* ```js
|
|
278
|
+
* {
|
|
279
|
+
* principals: [{ type: "aws", identifiers: ["123456789012"] }]
|
|
280
|
+
* }
|
|
281
|
+
* ```
|
|
282
|
+
*
|
|
283
|
+
* Allow specific IAM roles.
|
|
284
|
+
* ```js
|
|
285
|
+
* {
|
|
286
|
+
* principals: [{
|
|
287
|
+
* type: "aws",
|
|
288
|
+
* identifiers: [
|
|
289
|
+
* "arn:aws:iam::123456789012:role/MyRole",
|
|
290
|
+
* "arn:aws:iam::123456789012:role/MyOtherRole"
|
|
291
|
+
* ]
|
|
292
|
+
* }]
|
|
293
|
+
* }
|
|
294
|
+
* ```
|
|
295
|
+
*
|
|
296
|
+
* Allow AWS CloudFront.
|
|
297
|
+
* ```js
|
|
298
|
+
* {
|
|
299
|
+
* principals: [{ type: "service", identifiers: ["cloudfront.amazonaws.com"] }]
|
|
300
|
+
* }
|
|
301
|
+
* ```
|
|
302
|
+
*
|
|
303
|
+
* Allow OIDC federated users.
|
|
304
|
+
* ```js
|
|
305
|
+
* {
|
|
306
|
+
* principals: [{
|
|
307
|
+
* type: "federated",
|
|
308
|
+
* identifiers: ["accounts.google.com"]
|
|
309
|
+
* }]
|
|
310
|
+
* }
|
|
311
|
+
* ```
|
|
312
|
+
*
|
|
313
|
+
* Allow SAML federated users.
|
|
314
|
+
* ```js
|
|
315
|
+
* {
|
|
316
|
+
* principals: [{
|
|
317
|
+
* type: "federated",
|
|
318
|
+
* identifiers: ["arn:aws:iam::123456789012:saml-provider/provider-name"]
|
|
319
|
+
* }]
|
|
320
|
+
* }
|
|
321
|
+
* ```
|
|
322
|
+
*
|
|
323
|
+
* Allow Canonical User IDs.
|
|
324
|
+
* ```js
|
|
325
|
+
* {
|
|
326
|
+
* principals: [{
|
|
327
|
+
* type: "canonical",
|
|
328
|
+
* identifiers: ["79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be"]
|
|
329
|
+
* }]
|
|
330
|
+
* }
|
|
331
|
+
* ```
|
|
332
|
+
*
|
|
333
|
+
* Allow specific IAM users.
|
|
334
|
+
*
|
|
335
|
+
*/
|
|
336
|
+
principals: Input<"*" | Input<{
|
|
337
|
+
type: Input<"aws" | "service" | "federated" | "canonical">;
|
|
338
|
+
identifiers: Input<Input<string>[]>;
|
|
339
|
+
}>[]>;
|
|
340
|
+
/**
|
|
341
|
+
* Configure specific conditions for when the policy is in effect.
|
|
342
|
+
* @example
|
|
343
|
+
* ```js
|
|
344
|
+
* {
|
|
345
|
+
* conditions: [
|
|
346
|
+
* {
|
|
347
|
+
* test: "StringEquals",
|
|
348
|
+
* variable: "s3:x-amz-server-side-encryption",
|
|
349
|
+
* values: ["AES256"]
|
|
350
|
+
* }
|
|
351
|
+
* ]
|
|
352
|
+
* }
|
|
353
|
+
* ```
|
|
354
|
+
*/
|
|
355
|
+
conditions?: Input<Input<{
|
|
356
|
+
/**
|
|
357
|
+
* Name of the [IAM condition operator](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html) to evaluate.
|
|
358
|
+
*/
|
|
359
|
+
test: Input<string>;
|
|
360
|
+
/**
|
|
361
|
+
* Name of a [Context Variable](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#AvailableKeys) to apply the condition to. Context variables may either be standard AWS variables starting with `aws:` or service-specific variables prefixed with the service name.
|
|
362
|
+
*/
|
|
363
|
+
variable: Input<string>;
|
|
364
|
+
/**
|
|
365
|
+
* The values to evaluate the condition against. If multiple values are provided, the condition matches if at least one of them applies. That is, AWS evaluates multiple values as though using an "OR" boolean operation.
|
|
366
|
+
*/
|
|
367
|
+
values: Input<Input<string>[]>;
|
|
368
|
+
}>[]>;
|
|
369
|
+
/**
|
|
370
|
+
* The S3 file paths that the policy is applied to. The paths are specified using
|
|
371
|
+
* the [S3 path format](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html).
|
|
372
|
+
* The bucket arn will be prepended to the paths when constructing the policy.
|
|
373
|
+
* @default `["", "*"]`
|
|
374
|
+
* @example
|
|
375
|
+
* Apply the policy to the bucket itself.
|
|
376
|
+
* ```js
|
|
377
|
+
* {
|
|
378
|
+
* paths: [""]
|
|
379
|
+
* }
|
|
380
|
+
* ```
|
|
381
|
+
*
|
|
382
|
+
* Apply to all files in the bucket.
|
|
383
|
+
* ```js
|
|
384
|
+
* {
|
|
385
|
+
* paths: ["*"]
|
|
386
|
+
* }
|
|
387
|
+
* ```
|
|
388
|
+
*
|
|
389
|
+
* Apply to all files in the `images/` folder.
|
|
390
|
+
* ```js
|
|
391
|
+
* {
|
|
392
|
+
* paths: ["images/*"]
|
|
393
|
+
* }
|
|
394
|
+
* ```
|
|
395
|
+
*/
|
|
396
|
+
paths?: Input<Input<string>[]>;
|
|
397
|
+
}>[]>;
|
|
398
|
+
/**
|
|
399
|
+
* Enforce HTTPS for all requests to the bucket.
|
|
400
|
+
*
|
|
401
|
+
* By default, the bucket policy will automatically block any HTTP requests.
|
|
402
|
+
* This is done using the `aws:SecureTransport` condition key.
|
|
403
|
+
*
|
|
404
|
+
* @default true
|
|
405
|
+
* @example
|
|
406
|
+
* ```js
|
|
407
|
+
* {
|
|
408
|
+
* enforceHttps: false
|
|
409
|
+
* }
|
|
410
|
+
* ```
|
|
411
|
+
*/
|
|
412
|
+
enforceHttps?: Input<boolean>;
|
|
413
|
+
/**
|
|
414
|
+
* The CORS configuration for the bucket. Defaults to `true`, which is the same as:
|
|
415
|
+
*
|
|
416
|
+
* ```js
|
|
417
|
+
* {
|
|
418
|
+
* cors: {
|
|
419
|
+
* allowHeaders: ["*"],
|
|
420
|
+
* allowOrigins: ["*"],
|
|
421
|
+
* allowMethods: ["DELETE", "GET", "HEAD", "POST", "PUT"],
|
|
422
|
+
* exposeHeaders: [],
|
|
423
|
+
* maxAge: "0 seconds"
|
|
424
|
+
* }
|
|
425
|
+
* }
|
|
426
|
+
* ```
|
|
427
|
+
*
|
|
428
|
+
* @default `true`
|
|
429
|
+
*/
|
|
430
|
+
cors?: Input<false | Prettify<BucketCorsArgs>>;
|
|
431
|
+
/**
|
|
432
|
+
* The lifecycle configuration for the bucket.
|
|
433
|
+
* @example
|
|
434
|
+
* Delete objects in the "/tmp" directory after 30 days.
|
|
435
|
+
* ```js
|
|
436
|
+
* {
|
|
437
|
+
* lifecycle: [
|
|
438
|
+
* {
|
|
439
|
+
* prefix: "/tmp",
|
|
440
|
+
* expiresIn: "30 days"
|
|
441
|
+
* }
|
|
442
|
+
* ]
|
|
443
|
+
* }
|
|
444
|
+
* ```
|
|
445
|
+
*
|
|
446
|
+
* Use stable IDs to preserve rule identity when reordering.
|
|
447
|
+
* ```js
|
|
448
|
+
* {
|
|
449
|
+
* lifecycle: [
|
|
450
|
+
* {
|
|
451
|
+
* id: "expire-tmp-files",
|
|
452
|
+
* prefix: "/tmp",
|
|
453
|
+
* expiresIn: "7 days"
|
|
454
|
+
* },
|
|
455
|
+
* {
|
|
456
|
+
* id: "archive-old-logs",
|
|
457
|
+
* prefix: "/logs",
|
|
458
|
+
* expiresIn: "90 days"
|
|
459
|
+
* }
|
|
460
|
+
* ]
|
|
461
|
+
* }
|
|
462
|
+
* ```
|
|
463
|
+
*/
|
|
464
|
+
lifecycle?: Input<Input<Prettify<BucketLifecycleArgs>>[]>;
|
|
465
|
+
/**
|
|
466
|
+
* Enable versioning for the bucket.
|
|
467
|
+
*
|
|
468
|
+
* Bucket versioning enables you to store multiple versions of an object, protecting
|
|
469
|
+
* against accidental deletion or overwriting.
|
|
470
|
+
*
|
|
471
|
+
* @default `false`
|
|
472
|
+
* @example
|
|
473
|
+
* ```js
|
|
474
|
+
* {
|
|
475
|
+
* versioning: true
|
|
476
|
+
* }
|
|
477
|
+
* ```
|
|
478
|
+
*/
|
|
479
|
+
versioning?: Input<boolean>;
|
|
480
|
+
/**
|
|
481
|
+
* [Transform](/docs/components#transform) how this component creates its underlying
|
|
482
|
+
* resources.
|
|
483
|
+
*/
|
|
484
|
+
transform?: {
|
|
485
|
+
/**
|
|
486
|
+
* Transform the S3 Bucket resource.
|
|
487
|
+
*/
|
|
488
|
+
bucket?: Transform<s3.BucketV2Args>;
|
|
489
|
+
/**
|
|
490
|
+
* Transform the S3 Bucket CORS configuration resource.
|
|
491
|
+
*/
|
|
492
|
+
cors?: Transform<s3.BucketCorsConfigurationV2Args>;
|
|
493
|
+
/**
|
|
494
|
+
* Transform the S3 Bucket Policy resource.
|
|
495
|
+
*/
|
|
496
|
+
policy?: Transform<s3.BucketPolicyArgs>;
|
|
497
|
+
/**
|
|
498
|
+
* Transform the S3 Bucket versioning resource.
|
|
499
|
+
*/
|
|
500
|
+
versioning?: Transform<s3.BucketVersioningV2Args>;
|
|
501
|
+
/**
|
|
502
|
+
* Transform the S3 Bucket lifecycle resource.
|
|
503
|
+
* */
|
|
504
|
+
lifecycle?: Transform<s3.BucketLifecycleConfigurationV2Args>;
|
|
505
|
+
/**
|
|
506
|
+
* Transform the public access block resource that's attached to the Bucket.
|
|
507
|
+
*
|
|
508
|
+
* Returns `false` if the public access block resource should not be created.
|
|
509
|
+
*/
|
|
510
|
+
publicAccessBlock?: Transform<s3.BucketPublicAccessBlockArgs> | false;
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
export interface BucketNotificationsArgs {
|
|
514
|
+
/**
|
|
515
|
+
* A list of subscribers that'll be notified when events happen in the bucket.
|
|
516
|
+
*/
|
|
517
|
+
notifications: Input<Input<{
|
|
518
|
+
/**
|
|
519
|
+
* The name of the subscriber.
|
|
520
|
+
*/
|
|
521
|
+
name: Input<string>;
|
|
522
|
+
/**
|
|
523
|
+
* The function that'll be notified.
|
|
524
|
+
*
|
|
525
|
+
* @example
|
|
526
|
+
* ```js
|
|
527
|
+
* {
|
|
528
|
+
* name: "MySubscriber",
|
|
529
|
+
* function: "src/subscriber.handler"
|
|
530
|
+
* }
|
|
531
|
+
* ```
|
|
532
|
+
*
|
|
533
|
+
* Customize the subscriber function. The `link` ensures the subscriber can access the
|
|
534
|
+
* bucket through the [SDK](/docs/reference/sdk/).
|
|
535
|
+
*
|
|
536
|
+
* ```js
|
|
537
|
+
* {
|
|
538
|
+
* name: "MySubscriber",
|
|
539
|
+
* function: {
|
|
540
|
+
* handler: "src/subscriber.handler",
|
|
541
|
+
* timeout: "60 seconds",
|
|
542
|
+
* link: [bucket]
|
|
543
|
+
* }
|
|
544
|
+
* }
|
|
545
|
+
* ```
|
|
546
|
+
*
|
|
547
|
+
* Or pass in the ARN of an existing Lambda function.
|
|
548
|
+
*
|
|
549
|
+
* ```js
|
|
550
|
+
* {
|
|
551
|
+
* name: "MySubscriber",
|
|
552
|
+
* function: "arn:aws:lambda:us-east-1:123456789012:function:my-function"
|
|
553
|
+
* }
|
|
554
|
+
* ```
|
|
555
|
+
*/
|
|
556
|
+
function?: Input<string | FunctionArgs | FunctionArn>;
|
|
557
|
+
/**
|
|
558
|
+
* The Queue that'll be notified.
|
|
559
|
+
*
|
|
560
|
+
* @example
|
|
561
|
+
* For example, let's say you have a queue.
|
|
562
|
+
*
|
|
563
|
+
* ```js title="sst.config.ts"
|
|
564
|
+
* const myQueue = new sst.aws.Queue("MyQueue");
|
|
565
|
+
* ```
|
|
566
|
+
*
|
|
567
|
+
* You can subscribe to this bucket with it.
|
|
568
|
+
*
|
|
569
|
+
* ```js
|
|
570
|
+
* {
|
|
571
|
+
* name: "MySubscriber",
|
|
572
|
+
* queue: myQueue
|
|
573
|
+
* }
|
|
574
|
+
* ```
|
|
575
|
+
*
|
|
576
|
+
* Or pass in the ARN of an existing SQS queue.
|
|
577
|
+
*
|
|
578
|
+
* ```js
|
|
579
|
+
* {
|
|
580
|
+
* name: "MySubscriber",
|
|
581
|
+
* queue: "arn:aws:sqs:us-east-1:123456789012:my-queue"
|
|
582
|
+
* }
|
|
583
|
+
* ```
|
|
584
|
+
*/
|
|
585
|
+
queue?: Input<string | Queue>;
|
|
586
|
+
/**
|
|
587
|
+
* The SNS topic that'll be notified.
|
|
588
|
+
*
|
|
589
|
+
* @example
|
|
590
|
+
* For example, let's say you have a topic.
|
|
591
|
+
*
|
|
592
|
+
* ```js title="sst.config.ts"
|
|
593
|
+
* const myTopic = new sst.aws.SnsTopic("MyTopic");
|
|
594
|
+
* ```
|
|
595
|
+
*
|
|
596
|
+
* You can subscribe to this bucket with it.
|
|
597
|
+
*
|
|
598
|
+
* ```js
|
|
599
|
+
* {
|
|
600
|
+
* name: "MySubscriber",
|
|
601
|
+
* topic: myTopic
|
|
602
|
+
* }
|
|
603
|
+
* ```
|
|
604
|
+
*
|
|
605
|
+
* Or pass in the ARN of an existing SNS topic.
|
|
606
|
+
*
|
|
607
|
+
* ```js
|
|
608
|
+
* {
|
|
609
|
+
* name: "MySubscriber",
|
|
610
|
+
* topic: "arn:aws:sns:us-east-1:123456789012:my-topic"
|
|
611
|
+
* }
|
|
612
|
+
* ```
|
|
613
|
+
*/
|
|
614
|
+
topic?: Input<string | SnsTopic>;
|
|
615
|
+
/**
|
|
616
|
+
* A list of S3 event types that'll trigger a notification.
|
|
617
|
+
* @default All S3 events
|
|
618
|
+
* @example
|
|
619
|
+
* ```js
|
|
620
|
+
* {
|
|
621
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
622
|
+
* }
|
|
623
|
+
* ```
|
|
624
|
+
*/
|
|
625
|
+
events?: Input<Input<"s3:ObjectCreated:*" | "s3:ObjectCreated:Put" | "s3:ObjectCreated:Post" | "s3:ObjectCreated:Copy" | "s3:ObjectCreated:CompleteMultipartUpload" | "s3:ObjectRemoved:*" | "s3:ObjectRemoved:Delete" | "s3:ObjectRemoved:DeleteMarkerCreated" | "s3:ObjectRestore:*" | "s3:ObjectRestore:Post" | "s3:ObjectRestore:Completed" | "s3:ObjectRestore:Delete" | "s3:ReducedRedundancyLostObject" | "s3:Replication:*" | "s3:Replication:OperationFailedReplication" | "s3:Replication:OperationMissedThreshold" | "s3:Replication:OperationReplicatedAfterThreshold" | "s3:Replication:OperationNotTracked" | "s3:LifecycleExpiration:*" | "s3:LifecycleExpiration:Delete" | "s3:LifecycleExpiration:DeleteMarkerCreated" | "s3:LifecycleTransition" | "s3:IntelligentTiering" | "s3:ObjectTagging:*" | "s3:ObjectTagging:Put" | "s3:ObjectTagging:Delete" | "s3:ObjectAcl:Put">[]>;
|
|
626
|
+
/**
|
|
627
|
+
* An S3 object key prefix that will trigger a notification.
|
|
628
|
+
* @example
|
|
629
|
+
* To be notified for all the objects in the `images/` folder.
|
|
630
|
+
* ```js
|
|
631
|
+
* {
|
|
632
|
+
* filterPrefix: "images/"
|
|
633
|
+
* }
|
|
634
|
+
* ```
|
|
635
|
+
*/
|
|
636
|
+
filterPrefix?: Input<string>;
|
|
637
|
+
/**
|
|
638
|
+
* An S3 object key suffix that will trigger the notification.
|
|
639
|
+
* @example
|
|
640
|
+
* To be notified for all the objects with the `.jpg` suffix.
|
|
641
|
+
* ```js
|
|
642
|
+
* {
|
|
643
|
+
* filterSuffix: ".jpg"
|
|
644
|
+
* }
|
|
645
|
+
* ```
|
|
646
|
+
*/
|
|
647
|
+
filterSuffix?: Input<string>;
|
|
648
|
+
}>[]>;
|
|
649
|
+
/**
|
|
650
|
+
* [Transform](/docs/components#transform) how this notification creates its underlying
|
|
651
|
+
* resources.
|
|
652
|
+
*/
|
|
653
|
+
transform?: {
|
|
654
|
+
/**
|
|
655
|
+
* Transform the S3 Bucket Notification resource.
|
|
656
|
+
*/
|
|
657
|
+
notification?: Transform<s3.BucketNotificationArgs>;
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* @internal
|
|
662
|
+
*/
|
|
663
|
+
export interface BucketSubscriberArgs {
|
|
664
|
+
/**
|
|
665
|
+
* A list of S3 event types that'll trigger the notification.
|
|
666
|
+
* @default All S3 events
|
|
667
|
+
* @example
|
|
668
|
+
* ```js
|
|
669
|
+
* {
|
|
670
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
671
|
+
* }
|
|
672
|
+
* ```
|
|
673
|
+
*/
|
|
674
|
+
events?: Input<Input<"s3:ObjectCreated:*" | "s3:ObjectCreated:Put" | "s3:ObjectCreated:Post" | "s3:ObjectCreated:Copy" | "s3:ObjectCreated:CompleteMultipartUpload" | "s3:ObjectRemoved:*" | "s3:ObjectRemoved:Delete" | "s3:ObjectRemoved:DeleteMarkerCreated" | "s3:ObjectRestore:*" | "s3:ObjectRestore:Post" | "s3:ObjectRestore:Completed" | "s3:ObjectRestore:Delete" | "s3:ReducedRedundancyLostObject" | "s3:Replication:*" | "s3:Replication:OperationFailedReplication" | "s3:Replication:OperationMissedThreshold" | "s3:Replication:OperationReplicatedAfterThreshold" | "s3:Replication:OperationNotTracked" | "s3:LifecycleExpiration:*" | "s3:LifecycleExpiration:Delete" | "s3:LifecycleExpiration:DeleteMarkerCreated" | "s3:LifecycleTransition" | "s3:IntelligentTiering" | "s3:ObjectTagging:*" | "s3:ObjectTagging:Put" | "s3:ObjectTagging:Delete" | "s3:ObjectAcl:Put">[]>;
|
|
675
|
+
/**
|
|
676
|
+
* An S3 object key prefix that will trigger the notification.
|
|
677
|
+
* @example
|
|
678
|
+
* To filter for all the objects in the `images/` folder.
|
|
679
|
+
* ```js
|
|
680
|
+
* {
|
|
681
|
+
* filterPrefix: "images/"
|
|
682
|
+
* }
|
|
683
|
+
* ```
|
|
684
|
+
*/
|
|
685
|
+
filterPrefix?: Input<string>;
|
|
686
|
+
/**
|
|
687
|
+
* An S3 object key suffix that will trigger the notification.
|
|
688
|
+
* @example
|
|
689
|
+
* To filter for all the objects with the `.jpg` suffix.
|
|
690
|
+
* ```js
|
|
691
|
+
* {
|
|
692
|
+
* filterSuffix: ".jpg"
|
|
693
|
+
* }
|
|
694
|
+
* ```
|
|
695
|
+
*/
|
|
696
|
+
filterSuffix?: Input<string>;
|
|
697
|
+
/**
|
|
698
|
+
* [Transform](/docs/components#transform) how this notification creates its underlying
|
|
699
|
+
* resources.
|
|
700
|
+
*/
|
|
701
|
+
transform?: {
|
|
702
|
+
/**
|
|
703
|
+
* Transform the S3 Bucket Notification resource.
|
|
704
|
+
*/
|
|
705
|
+
notification?: Transform<s3.BucketNotificationArgs>;
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* The `Bucket` component lets you add an [AWS S3 Bucket](https://aws.amazon.com/s3/) to
|
|
710
|
+
* your app.
|
|
711
|
+
*
|
|
712
|
+
* @example
|
|
713
|
+
*
|
|
714
|
+
* #### Minimal example
|
|
715
|
+
*
|
|
716
|
+
* ```ts title="sst.config.ts"
|
|
717
|
+
* const bucket = new sst.aws.Bucket("MyBucket");
|
|
718
|
+
* ```
|
|
719
|
+
*
|
|
720
|
+
* #### Public read access
|
|
721
|
+
*
|
|
722
|
+
* Enable `public` read access for all the files in the bucket. Useful for hosting public files.
|
|
723
|
+
*
|
|
724
|
+
* ```ts title="sst.config.ts"
|
|
725
|
+
* new sst.aws.Bucket("MyBucket", {
|
|
726
|
+
* access: "public"
|
|
727
|
+
* });
|
|
728
|
+
* ```
|
|
729
|
+
*
|
|
730
|
+
* #### Add a subscriber
|
|
731
|
+
*
|
|
732
|
+
* ```ts title="sst.config.ts"
|
|
733
|
+
* bucket.notify({
|
|
734
|
+
* notifications: [
|
|
735
|
+
* {
|
|
736
|
+
* name: "MySubscriber",
|
|
737
|
+
* function: "src/subscriber.handler"
|
|
738
|
+
* }
|
|
739
|
+
* ]
|
|
740
|
+
* });
|
|
741
|
+
* ```
|
|
742
|
+
*
|
|
743
|
+
* #### Link the bucket to a resource
|
|
744
|
+
*
|
|
745
|
+
* You can link the bucket to other resources, like a function or your Next.js app.
|
|
746
|
+
*
|
|
747
|
+
* ```ts title="sst.config.ts"
|
|
748
|
+
* new sst.aws.Nextjs("MyWeb", {
|
|
749
|
+
* link: [bucket]
|
|
750
|
+
* });
|
|
751
|
+
* ```
|
|
752
|
+
*
|
|
753
|
+
* Once linked, you can generate a pre-signed URL to upload files in your app.
|
|
754
|
+
*
|
|
755
|
+
* ```ts title="app/page.tsx" {1,7}
|
|
756
|
+
* import { Resource } from "sst";
|
|
757
|
+
* import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
|
758
|
+
* import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
|
|
759
|
+
*
|
|
760
|
+
* const command = new PutObjectCommand({
|
|
761
|
+
* Key: "file.txt",
|
|
762
|
+
* Bucket: Resource.MyBucket.name
|
|
763
|
+
* });
|
|
764
|
+
* await getSignedUrl(new S3Client({}), command);
|
|
765
|
+
* ```
|
|
766
|
+
*/
|
|
767
|
+
export declare class Bucket extends Component implements Link.Linkable {
|
|
768
|
+
private constructorName;
|
|
769
|
+
private constructorOpts;
|
|
770
|
+
private isSubscribed;
|
|
771
|
+
private bucket;
|
|
772
|
+
constructor(name: string, args?: BucketArgs, opts?: ComponentResourceOptions);
|
|
773
|
+
/**
|
|
774
|
+
* The generated name of the S3 Bucket.
|
|
775
|
+
*/
|
|
776
|
+
get name(): Output<string>;
|
|
777
|
+
/**
|
|
778
|
+
* The domain name of the bucket. Has the format `${bucketName}.s3.amazonaws.com`.
|
|
779
|
+
*/
|
|
780
|
+
get domain(): Output<string>;
|
|
781
|
+
/**
|
|
782
|
+
* The ARN of the S3 Bucket.
|
|
783
|
+
*/
|
|
784
|
+
get arn(): Output<string>;
|
|
785
|
+
/**
|
|
786
|
+
* The underlying [resources](/docs/components/#nodes) this component creates.
|
|
787
|
+
*/
|
|
788
|
+
get nodes(): {
|
|
789
|
+
/**
|
|
790
|
+
* The Amazon S3 bucket.
|
|
791
|
+
*/
|
|
792
|
+
bucket: Output<import("@pulumi/aws/s3/bucketV2").BucketV2>;
|
|
793
|
+
};
|
|
794
|
+
/**
|
|
795
|
+
* Reference an existing bucket with the given bucket name. This is useful when you
|
|
796
|
+
* create a bucket in one stage and want to share it in another stage. It avoids having to
|
|
797
|
+
* create a new bucket in the other stage.
|
|
798
|
+
*
|
|
799
|
+
* :::tip
|
|
800
|
+
* You can use the `static get` method to share buckets across stages.
|
|
801
|
+
* :::
|
|
802
|
+
*
|
|
803
|
+
* @param name The name of the component.
|
|
804
|
+
* @param bucketName The name of the existing S3 Bucket.
|
|
805
|
+
* @param opts? Resource options.
|
|
806
|
+
*
|
|
807
|
+
* @example
|
|
808
|
+
* Imagine you create a bucket in the `dev` stage. And in your personal stage `frank`,
|
|
809
|
+
* instead of creating a new bucket, you want to share the bucket from `dev`.
|
|
810
|
+
*
|
|
811
|
+
* ```ts title="sst.config.ts"
|
|
812
|
+
* const bucket = $app.stage === "frank"
|
|
813
|
+
* ? sst.aws.Bucket.get("MyBucket", "app-dev-mybucket-12345678")
|
|
814
|
+
* : new sst.aws.Bucket("MyBucket");
|
|
815
|
+
* ```
|
|
816
|
+
*
|
|
817
|
+
* Here `app-dev-mybucket-12345678` is the auto-generated bucket name for the bucket created
|
|
818
|
+
* in the `dev` stage. You can find this by outputting the bucket name in the `dev` stage.
|
|
819
|
+
*
|
|
820
|
+
* ```ts title="sst.config.ts"
|
|
821
|
+
* return {
|
|
822
|
+
* bucket: bucket.name
|
|
823
|
+
* };
|
|
824
|
+
* ```
|
|
825
|
+
*/
|
|
826
|
+
static get(name: string, bucketName: string, opts?: ComponentResourceOptions): Bucket;
|
|
827
|
+
/**
|
|
828
|
+
* Subscribe to event notifications from this bucket. You can subscribe to these
|
|
829
|
+
* notifications with a function, a queue, or a topic.
|
|
830
|
+
*
|
|
831
|
+
* @param args The config for the event notifications.
|
|
832
|
+
*
|
|
833
|
+
* @example
|
|
834
|
+
*
|
|
835
|
+
* For exmaple, to notify a function:
|
|
836
|
+
*
|
|
837
|
+
* ```js title="sst.config.ts" {5}
|
|
838
|
+
* bucket.notify({
|
|
839
|
+
* notifications: [
|
|
840
|
+
* {
|
|
841
|
+
* name: "MySubscriber",
|
|
842
|
+
* function: "src/subscriber.handler"
|
|
843
|
+
* }
|
|
844
|
+
* ]
|
|
845
|
+
* });
|
|
846
|
+
* ```
|
|
847
|
+
*
|
|
848
|
+
* Or let's say you have a queue.
|
|
849
|
+
*
|
|
850
|
+
* ```js title="sst.config.ts"
|
|
851
|
+
* const myQueue = new sst.aws.Queue("MyQueue");
|
|
852
|
+
* ```
|
|
853
|
+
*
|
|
854
|
+
* You can notify it by passing in the queue.
|
|
855
|
+
*
|
|
856
|
+
* ```js title="sst.config.ts" {5}
|
|
857
|
+
* bucket.notify({
|
|
858
|
+
* notifications: [
|
|
859
|
+
* {
|
|
860
|
+
* name: "MySubscriber",
|
|
861
|
+
* queue: myQueue
|
|
862
|
+
* }
|
|
863
|
+
* ]
|
|
864
|
+
* });
|
|
865
|
+
* ```
|
|
866
|
+
*
|
|
867
|
+
* Or let's say you have a topic.
|
|
868
|
+
*
|
|
869
|
+
* ```js title="sst.config.ts"
|
|
870
|
+
* const myTopic = new sst.aws.SnsTopic("MyTopic");
|
|
871
|
+
* ```
|
|
872
|
+
*
|
|
873
|
+
* You can notify it by passing in the topic.
|
|
874
|
+
*
|
|
875
|
+
* ```js title="sst.config.ts" {5}
|
|
876
|
+
* bucket.notify({
|
|
877
|
+
* notifications: [
|
|
878
|
+
* {
|
|
879
|
+
* name: "MySubscriber",
|
|
880
|
+
* topic: myTopic
|
|
881
|
+
* }
|
|
882
|
+
* ]
|
|
883
|
+
* });
|
|
884
|
+
* ```
|
|
885
|
+
*
|
|
886
|
+
* You can also set it to only send notifications for specific S3 events.
|
|
887
|
+
*
|
|
888
|
+
* ```js {6}
|
|
889
|
+
* bucket.notify({
|
|
890
|
+
* notifications: [
|
|
891
|
+
* {
|
|
892
|
+
* name: "MySubscriber",
|
|
893
|
+
* function: "src/subscriber.handler",
|
|
894
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
895
|
+
* }
|
|
896
|
+
* ]
|
|
897
|
+
* });
|
|
898
|
+
* ```
|
|
899
|
+
*
|
|
900
|
+
* And you can add filters to be only notified from specific files in the bucket.
|
|
901
|
+
*
|
|
902
|
+
* ```js {6}
|
|
903
|
+
* bucket.notify({
|
|
904
|
+
* notifications: [
|
|
905
|
+
* {
|
|
906
|
+
* name: "MySubscriber",
|
|
907
|
+
* function: "src/subscriber.handler",
|
|
908
|
+
* filterPrefix: "images/"
|
|
909
|
+
* }
|
|
910
|
+
* ]
|
|
911
|
+
* });
|
|
912
|
+
* ```
|
|
913
|
+
*/
|
|
914
|
+
notify(args: BucketNotificationsArgs): BucketNotification;
|
|
915
|
+
/**
|
|
916
|
+
* Subscribe to events from this bucket.
|
|
917
|
+
*
|
|
918
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
919
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
920
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
921
|
+
* back using the new `notify` function.
|
|
922
|
+
*
|
|
923
|
+
* @param subscriber The function that'll be notified.
|
|
924
|
+
* @param args Configure the subscription.
|
|
925
|
+
*
|
|
926
|
+
* @example
|
|
927
|
+
*
|
|
928
|
+
* ```js title="sst.config.ts"
|
|
929
|
+
* bucket.subscribe("src/subscriber.handler");
|
|
930
|
+
* ```
|
|
931
|
+
*
|
|
932
|
+
* Subscribe to specific S3 events. The `link` ensures the subscriber can access the bucket.
|
|
933
|
+
*
|
|
934
|
+
* ```js title="sst.config.ts" "link: [bucket]"
|
|
935
|
+
* bucket.subscribe({
|
|
936
|
+
* handler: "src/subscriber.handler",
|
|
937
|
+
* link: [bucket]
|
|
938
|
+
* }, {
|
|
939
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
940
|
+
* });
|
|
941
|
+
* ```
|
|
942
|
+
*
|
|
943
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
944
|
+
*
|
|
945
|
+
* ```js title="sst.config.ts" {2}
|
|
946
|
+
* bucket.subscribe("src/subscriber.handler", {
|
|
947
|
+
* filterPrefix: "images/",
|
|
948
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
949
|
+
* });
|
|
950
|
+
* ```
|
|
951
|
+
*
|
|
952
|
+
* Customize the subscriber function.
|
|
953
|
+
*
|
|
954
|
+
* ```js title="sst.config.ts"
|
|
955
|
+
* bucket.subscribe({
|
|
956
|
+
* handler: "src/subscriber.handler",
|
|
957
|
+
* timeout: "60 seconds",
|
|
958
|
+
* });
|
|
959
|
+
* ```
|
|
960
|
+
*
|
|
961
|
+
* Or pass in the ARN of an existing Lambda function.
|
|
962
|
+
*
|
|
963
|
+
* ```js title="sst.config.ts"
|
|
964
|
+
* bucket.subscribe("arn:aws:lambda:us-east-1:123456789012:function:my-function");
|
|
965
|
+
* ```
|
|
966
|
+
*/
|
|
967
|
+
subscribe(subscriber: Input<string | FunctionArgs | FunctionArn>, args?: BucketSubscriberArgs): Output<BucketLambdaSubscriber>;
|
|
968
|
+
/**
|
|
969
|
+
* Subscribe to events of an S3 bucket that was not created in your app.
|
|
970
|
+
*
|
|
971
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
972
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
973
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
974
|
+
* back using the new `notify` function.
|
|
975
|
+
*
|
|
976
|
+
* @param bucketArn The ARN of the S3 bucket to subscribe to.
|
|
977
|
+
* @param subscriber The function that'll be notified.
|
|
978
|
+
* @param args Configure the subscription.
|
|
979
|
+
*
|
|
980
|
+
* @example
|
|
981
|
+
*
|
|
982
|
+
* For example, let's say you have an existing S3 bucket with the following ARN.
|
|
983
|
+
*
|
|
984
|
+
* ```js title="sst.config.ts"
|
|
985
|
+
* const bucketArn = "arn:aws:s3:::my-bucket";
|
|
986
|
+
* ```
|
|
987
|
+
*
|
|
988
|
+
* You can subscribe to it by passing in the ARN.
|
|
989
|
+
*
|
|
990
|
+
* ```js title="sst.config.ts"
|
|
991
|
+
* sst.aws.Bucket.subscribe(bucketArn, "src/subscriber.handler");
|
|
992
|
+
* ```
|
|
993
|
+
*
|
|
994
|
+
* Subscribe to specific S3 events.
|
|
995
|
+
*
|
|
996
|
+
* ```js title="sst.config.ts"
|
|
997
|
+
* sst.aws.Bucket.subscribe(bucketArn, "src/subscriber.handler", {
|
|
998
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
999
|
+
* });
|
|
1000
|
+
* ```
|
|
1001
|
+
*
|
|
1002
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
1003
|
+
*
|
|
1004
|
+
* ```js title="sst.config.ts" {2}
|
|
1005
|
+
* sst.aws.Bucket.subscribe(bucketArn, "src/subscriber.handler", {
|
|
1006
|
+
* filterPrefix: "images/",
|
|
1007
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
1008
|
+
* });
|
|
1009
|
+
* ```
|
|
1010
|
+
*
|
|
1011
|
+
* Customize the subscriber function.
|
|
1012
|
+
*
|
|
1013
|
+
* ```js title="sst.config.ts"
|
|
1014
|
+
* sst.aws.Bucket.subscribe(bucketArn, {
|
|
1015
|
+
* handler: "src/subscriber.handler",
|
|
1016
|
+
* timeout: "60 seconds",
|
|
1017
|
+
* });
|
|
1018
|
+
* ```
|
|
1019
|
+
*/
|
|
1020
|
+
static subscribe(bucketArn: Input<string>, subscriber: Input<string | FunctionArgs | FunctionArn>, args?: BucketSubscriberArgs): Output<BucketLambdaSubscriber>;
|
|
1021
|
+
private static _subscribeFunction;
|
|
1022
|
+
/**
|
|
1023
|
+
* Subscribe to events from this bucket with an SQS Queue.
|
|
1024
|
+
*
|
|
1025
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
1026
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
1027
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
1028
|
+
* back using the new `notify` function.
|
|
1029
|
+
*
|
|
1030
|
+
* @param queueArn The ARN of the queue that'll be notified.
|
|
1031
|
+
* @param args Configure the subscription.
|
|
1032
|
+
*
|
|
1033
|
+
* @example
|
|
1034
|
+
*
|
|
1035
|
+
* For example, let's say you have a queue.
|
|
1036
|
+
*
|
|
1037
|
+
* ```js title="sst.config.ts"
|
|
1038
|
+
* const queue = new sst.aws.Queue("MyQueue");
|
|
1039
|
+
* ```
|
|
1040
|
+
*
|
|
1041
|
+
* You can subscribe to this bucket with it.
|
|
1042
|
+
*
|
|
1043
|
+
* ```js title="sst.config.ts"
|
|
1044
|
+
* bucket.subscribe(queue.arn);
|
|
1045
|
+
* ```
|
|
1046
|
+
*
|
|
1047
|
+
* Subscribe to specific S3 events.
|
|
1048
|
+
*
|
|
1049
|
+
* ```js title="sst.config.ts"
|
|
1050
|
+
* bucket.subscribe(queue.arn, {
|
|
1051
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
1052
|
+
* });
|
|
1053
|
+
* ```
|
|
1054
|
+
*
|
|
1055
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
1056
|
+
*
|
|
1057
|
+
* ```js title="sst.config.ts" {2}
|
|
1058
|
+
* bucket.subscribe(queue.arn, {
|
|
1059
|
+
* filterPrefix: "images/",
|
|
1060
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
1061
|
+
* });
|
|
1062
|
+
* ```
|
|
1063
|
+
*/
|
|
1064
|
+
subscribeQueue(queueArn: Input<string>, args?: BucketSubscriberArgs): Output<BucketQueueSubscriber>;
|
|
1065
|
+
/**
|
|
1066
|
+
* Subscribe to events of an S3 bucket that was not created in your app with an SQS Queue.
|
|
1067
|
+
*
|
|
1068
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
1069
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
1070
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
1071
|
+
* back using the new `notify` function.
|
|
1072
|
+
*
|
|
1073
|
+
* @param bucketArn The ARN of the S3 bucket to subscribe to.
|
|
1074
|
+
* @param queueArn The ARN of the queue that'll be notified.
|
|
1075
|
+
* @param args Configure the subscription.
|
|
1076
|
+
*
|
|
1077
|
+
* @example
|
|
1078
|
+
*
|
|
1079
|
+
* For example, let's say you have an existing S3 bucket and SQS queue with the following ARNs.
|
|
1080
|
+
*
|
|
1081
|
+
* ```js title="sst.config.ts"
|
|
1082
|
+
* const bucketArn = "arn:aws:s3:::my-bucket";
|
|
1083
|
+
* const queueArn = "arn:aws:sqs:us-east-1:123456789012:MyQueue";
|
|
1084
|
+
* ```
|
|
1085
|
+
*
|
|
1086
|
+
* You can subscribe to the bucket with the queue.
|
|
1087
|
+
*
|
|
1088
|
+
* ```js title="sst.config.ts"
|
|
1089
|
+
* sst.aws.Bucket.subscribeQueue(bucketArn, queueArn);
|
|
1090
|
+
* ```
|
|
1091
|
+
*
|
|
1092
|
+
* Subscribe to specific S3 events.
|
|
1093
|
+
*
|
|
1094
|
+
* ```js title="sst.config.ts"
|
|
1095
|
+
* sst.aws.Bucket.subscribeQueue(bucketArn, queueArn, {
|
|
1096
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
1097
|
+
* });
|
|
1098
|
+
* ```
|
|
1099
|
+
*
|
|
1100
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
1101
|
+
*
|
|
1102
|
+
* ```js title="sst.config.ts" {2}
|
|
1103
|
+
* sst.aws.Bucket.subscribeQueue(bucketArn, queueArn, {
|
|
1104
|
+
* filterPrefix: "images/",
|
|
1105
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
1106
|
+
* });
|
|
1107
|
+
* ```
|
|
1108
|
+
*/
|
|
1109
|
+
static subscribeQueue(bucketArn: Input<string>, queueArn: Input<string>, args?: BucketSubscriberArgs): Output<BucketQueueSubscriber>;
|
|
1110
|
+
private static _subscribeQueue;
|
|
1111
|
+
/**
|
|
1112
|
+
* Subscribe to events from this bucket with an SNS Topic.
|
|
1113
|
+
*
|
|
1114
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
1115
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
1116
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
1117
|
+
* back using the new `notify` function.
|
|
1118
|
+
*
|
|
1119
|
+
* @param topicArn The ARN of the topic that'll be notified.
|
|
1120
|
+
* @param args Configure the subscription.
|
|
1121
|
+
*
|
|
1122
|
+
* @example
|
|
1123
|
+
*
|
|
1124
|
+
* For example, let's say you have a topic.
|
|
1125
|
+
*
|
|
1126
|
+
* ```js title="sst.config.ts"
|
|
1127
|
+
* const topic = new sst.aws.SnsTopic("MyTopic");
|
|
1128
|
+
* ```
|
|
1129
|
+
*
|
|
1130
|
+
* You can subscribe to this bucket with it.
|
|
1131
|
+
*
|
|
1132
|
+
* ```js title="sst.config.ts"
|
|
1133
|
+
* bucket.subscribe(topic.arn);
|
|
1134
|
+
* ```
|
|
1135
|
+
*
|
|
1136
|
+
* Subscribe to specific S3 events.
|
|
1137
|
+
*
|
|
1138
|
+
* ```js title="sst.config.ts"
|
|
1139
|
+
* bucket.subscribe(topic.arn, {
|
|
1140
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
1141
|
+
* });
|
|
1142
|
+
* ```
|
|
1143
|
+
*
|
|
1144
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
1145
|
+
*
|
|
1146
|
+
* ```js title="sst.config.ts" {2}
|
|
1147
|
+
* bucket.subscribe(topic.arn, {
|
|
1148
|
+
* filterPrefix: "images/",
|
|
1149
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
1150
|
+
* });
|
|
1151
|
+
* ```
|
|
1152
|
+
*/
|
|
1153
|
+
subscribeTopic(topicArn: Input<string>, args?: BucketSubscriberArgs): Output<BucketTopicSubscriber>;
|
|
1154
|
+
/**
|
|
1155
|
+
* Subscribe to events of an S3 bucket that was not created in your app with an SNS Topic.
|
|
1156
|
+
*
|
|
1157
|
+
* @deprecated The `notify` function is now the recommended way to subscribe to events
|
|
1158
|
+
* from this bucket. It allows you to configure multiple subscribers at once. To migrate,
|
|
1159
|
+
* remove the current subscriber, deploy the changes, and then add the subscriber
|
|
1160
|
+
* back using the new `notify` function.
|
|
1161
|
+
*
|
|
1162
|
+
* @param bucketArn The ARN of the S3 bucket to subscribe to.
|
|
1163
|
+
* @param topicArn The ARN of the topic that'll be notified.
|
|
1164
|
+
* @param args Configure the subscription.
|
|
1165
|
+
*
|
|
1166
|
+
* @example
|
|
1167
|
+
*
|
|
1168
|
+
* For example, let's say you have an existing S3 bucket and SNS topic with the following ARNs.
|
|
1169
|
+
*
|
|
1170
|
+
* ```js title="sst.config.ts"
|
|
1171
|
+
* const bucketArn = "arn:aws:s3:::my-bucket";
|
|
1172
|
+
* const topicArn = "arn:aws:sns:us-east-1:123456789012:MyTopic";
|
|
1173
|
+
* ```
|
|
1174
|
+
*
|
|
1175
|
+
* You can subscribe to the bucket with the topic.
|
|
1176
|
+
*
|
|
1177
|
+
* ```js title="sst.config.ts"
|
|
1178
|
+
* sst.aws.Bucket.subscribe(bucketArn, topicArn);
|
|
1179
|
+
* ```
|
|
1180
|
+
*
|
|
1181
|
+
* Subscribe to specific S3 events.
|
|
1182
|
+
*
|
|
1183
|
+
* ```js title="sst.config.ts"
|
|
1184
|
+
* sst.aws.Bucket.subscribe(bucketArn, topicArn, {
|
|
1185
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
1186
|
+
* });
|
|
1187
|
+
* ```
|
|
1188
|
+
*
|
|
1189
|
+
* Subscribe to specific S3 events from a specific folder.
|
|
1190
|
+
*
|
|
1191
|
+
* ```js title="sst.config.ts" {2}
|
|
1192
|
+
* sst.aws.Bucket.subscribe(bucketArn, topicArn, {
|
|
1193
|
+
* filterPrefix: "images/",
|
|
1194
|
+
* events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
|
|
1195
|
+
* });
|
|
1196
|
+
* ```
|
|
1197
|
+
*/
|
|
1198
|
+
static subscribeTopic(bucketArn: Input<string>, topicArn: Input<string>, args?: BucketSubscriberArgs): Output<BucketTopicSubscriber>;
|
|
1199
|
+
private static _subscribeTopic;
|
|
1200
|
+
private static buildSubscriberId;
|
|
1201
|
+
private ensureNotSubscribed;
|
|
1202
|
+
/** @internal */
|
|
1203
|
+
getSSTLink(): {
|
|
1204
|
+
properties: {
|
|
1205
|
+
name: Output<string>;
|
|
1206
|
+
};
|
|
1207
|
+
include: {
|
|
1208
|
+
effect?: "allow" | "deny" | undefined;
|
|
1209
|
+
actions: string[];
|
|
1210
|
+
resources: Input<Input<string>[]>;
|
|
1211
|
+
type: "aws.permission";
|
|
1212
|
+
}[];
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
export {};
|
|
1216
|
+
//# sourceMappingURL=bucket.d.ts.map
|