Files
supabase/apps/studio/components/interfaces/Storage/AnalyticsBuckets/CreateAnalyticsBucketForm.utils.ts
Joshen Lim d150246ffb Update layout of existing destination panel + add some improvements (#41429)
* Update layout of existing destination panel + add some improvements

* update icn

* Smol fix
2025-12-17 21:33:23 +08:00

15 lines
820 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Rules: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html?i
* Bucket names must be between 3 and 63 characters long.
* Bucket names can consist only of lowercase letters, numbers, and hyphens (-).
* Bucket names must begin and end with a letter or number.
* Bucket names must not contain any underscores (_) or periods (.).
* Bucket names must not start with any of the following reserved prefixes: 
xn--, sthree-, amzn-s3-demo-, aws
* Bucket names must not end with any of the following reserved suffixes:
-s3alias, --ol-s3, --x-s3, --table-s3
*/
export const reservedPrefixes = /^(?:xn--|sthree-|amzn-s3-demo-|aws)/
export const reservedSuffixes = /(?:-s3alias|--ol-s3|--x-s3|--table-s3)$/
export const validBucketNameRegex = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/