diff --git a/ydb/public/lib/ydb_cli/commands/ydb_service_import.cpp b/ydb/public/lib/ydb_cli/commands/ydb_service_import.cpp index f4a6ae1bba2d..6903d02b3a0b 100644 --- a/ydb/public/lib/ydb_cli/commands/ydb_service_import.cpp +++ b/ydb/public/lib/ydb_cli/commands/ydb_service_import.cpp @@ -131,7 +131,11 @@ int TCommandImportFromS3::Run(TConfig& config) { } settings.NumberOfRetries(NumberOfRetries); - +#if defined(_win32_) + for (const auto& item : Items) { + settings.AppendItem({item.Source, item.Destination}); + } +#else InitAwsAPI(); try { auto s3Client = CreateS3ClientWrapper(settings); @@ -162,6 +166,7 @@ int TCommandImportFromS3::Run(TConfig& config) { throw; } ShutdownAwsAPI(); +#endif TImportClient client(CreateDriver(config)); TImportFromS3Response response = client.ImportFromS3(std::move(settings)).GetValueSync(); diff --git a/ydb/public/lib/ydb_cli/common/aws.cpp b/ydb/public/lib/ydb_cli/common/aws.cpp index 6b02e299cc9a..800cbf995b0a 100644 --- a/ydb/public/lib/ydb_cli/common/aws.cpp +++ b/ydb/public/lib/ydb_cli/common/aws.cpp @@ -2,10 +2,12 @@ #include +#if !defined(_win32_) #include #include #include #include +#endif namespace NYdb::NConsoleClient { @@ -41,6 +43,19 @@ TString TCommandWithAwsCredentials::ReadIniKey(const TString& iniKey) { } } +#if defined(_win32_) +std::unique_ptr CreateS3ClientWrapper(const NImport::TImportFromS3Settings& settings) { + throw yexception() << "AWS API is not supported for windows platform"; +} + +void InitAwsAPI() { + throw yexception() << "AWS API is not supported for windows platform"; +} + +void ShutdownAwsAPI() { + throw yexception() << "AWS API is not supported for windows platform"; +} +#else class TS3ClientWrapper : public IS3ClientWrapper { public: TS3ClientWrapper(const NImport::TImportFromS3Settings& settings) @@ -100,5 +115,6 @@ void InitAwsAPI() { void ShutdownAwsAPI() { Aws::ShutdownAPI(Aws::SDKOptions()); } +#endif }