MCPcopy Create free account
hub / github.com/ByConity/ByConity / validateBucket

Method validateBucket

src/IO/S3Common.cpp:444–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442 }
443
444 void URI::validateBucket(const String & bucket, const Poco::URI & uri)
445 {
446 /// S3 specification requires at least 3 and at most 63 characters in bucket name.
447 /// https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-s3-bucket-naming-requirements.html
448 if (bucket.length() < 3 || bucket.length() > 63)
449 throw Exception("Bucket name length is out of bounds in virtual hosted style S3 URI:" + quoteString(bucket)
450 + (!uri.empty() ? " (" + uri.toString() + ")" : ""), ErrorCodes::BAD_ARGUMENTS);
451 }
452
453 S3Config::S3Config(const String & ini_file_path)
454 {

Callers

nothing calls this directly

Calls 5

quoteStringFunction · 0.85
lengthMethod · 0.80
ExceptionClass · 0.50
emptyMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected