File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,11 @@ int TCommandImportFromS3::Run(TConfig& config) {
131
131
}
132
132
133
133
settings.NumberOfRetries (NumberOfRetries);
134
-
134
+ #if defined(_win32_)
135
+ for (const auto & item : Items) {
136
+ settings.AppendItem ({item.Source , item.Destination });
137
+ }
138
+ #else
135
139
InitAwsAPI ();
136
140
try {
137
141
auto s3Client = CreateS3ClientWrapper (settings);
@@ -162,6 +166,7 @@ int TCommandImportFromS3::Run(TConfig& config) {
162
166
throw ;
163
167
}
164
168
ShutdownAwsAPI ();
169
+ #endif
165
170
166
171
TImportClient client (CreateDriver (config));
167
172
TImportFromS3Response response = client.ImportFromS3 (std::move (settings)).GetValueSync ();
Original file line number Diff line number Diff line change 2
2
3
3
#include < ydb/public/sdk/cpp/client/ydb_import/import.h>
4
4
5
+ #if !defined(_win32_)
5
6
#include < aws/core/Aws.h>
6
7
#include < aws/core/auth/AWSCredentialsProvider.h>
7
8
#include < aws/s3/S3Client.h>
8
9
#include < aws/s3/model/ListObjectsV2Request.h>
10
+ #endif
9
11
10
12
namespace NYdb ::NConsoleClient {
11
13
@@ -41,6 +43,19 @@ TString TCommandWithAwsCredentials::ReadIniKey(const TString& iniKey) {
41
43
}
42
44
}
43
45
46
+ #if defined(_win32_)
47
+ std::unique_ptr<IS3ClientWrapper> CreateS3ClientWrapper (const NImport::TImportFromS3Settings& settings) {
48
+ throw yexception () << " AWS API is not supported for windows platform" ;
49
+ }
50
+
51
+ void InitAwsAPI () {
52
+ throw yexception () << " AWS API is not supported for windows platform" ;
53
+ }
54
+
55
+ void ShutdownAwsAPI () {
56
+ throw yexception () << " AWS API is not supported for windows platform" ;
57
+ }
58
+ #else
44
59
class TS3ClientWrapper : public IS3ClientWrapper {
45
60
public:
46
61
TS3ClientWrapper (const NImport::TImportFromS3Settings& settings)
@@ -100,5 +115,6 @@ void InitAwsAPI() {
100
115
void ShutdownAwsAPI () {
101
116
Aws::ShutdownAPI (Aws::SDKOptions ());
102
117
}
118
+ #endif
103
119
104
120
}
You can’t perform that action at this time.
0 commit comments