#pragma once #include #if USE_AWS_S3 #include #include #include #include #include #include #include namespace DB::S3 { class ClientFactory { public: ClientFactory(); ~ClientFactory(); static ClientFactory & instance(); std::shared_ptr create(const String & endpoint, const String & access_key_id, const String & secret_access_key); private: static Aws::SDKOptions aws_options; }; /** * The following patterns are allowed: * s3://bucket/key * http(s)://endpoint/bucket/key */ struct URI { // Custom endpoint if URI scheme is not S3. String endpoint; String bucket; String key; explicit URI (Poco::URI & uri); }; } #endif