@@ -151,6 +151,9 @@ namespace Aws
151151 const Aws::Map<Aws::String, Aws::String>& metadata,
152152 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context,
153153 const Aws::String& precalculatedChecksum) {
154+ // Track S3 Express bucket usage
155+ m_transferConfig.s3Client ->AppendToUserAgent (" ft/s3-express" );
156+
154157 // destructor of FStream will close stream automatically (when out of scope), no need to call close explicitly
155158#ifdef _MSC_VER
156159 auto wide = Aws::Utils::StringUtils::ToWString (fileName.c_str ());
@@ -169,6 +172,9 @@ namespace Aws
169172 const Aws::Map<Aws::String, Aws::String>& metadata,
170173 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context,
171174 const Aws::String& precalculatedChecksum) {
175+ // Track S3 Express bucket usage
176+ m_transferConfig.s3Client ->AppendToUserAgent (" ft/s3-express" );
177+
172178 auto handle =
173179 CreateUploadFileHandle (fileStream.get (), bucketName, keyName, contentType, metadata, context, " " , precalculatedChecksum);
174180 return SubmitUpload (handle, fileStream);
@@ -181,6 +187,9 @@ namespace Aws
181187 const Aws::String& writeToFile,
182188 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context)
183189 {
190+ // Track S3 Express bucket usage
191+ m_transferConfig.s3Client ->AppendToUserAgent (" ft/s3-express" );
192+
184193 auto handle = Aws::MakeShared<TransferHandle>(CLASS_TAG, bucketName, keyName, writeToStreamfn, writeToFile);
185194 handle->ApplyDownloadConfiguration (downloadConfig);
186195 handle->SetContext (context);
@@ -205,6 +214,9 @@ namespace Aws
205214 const Aws::String& writeToFile,
206215 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context)
207216 {
217+ // Track S3 Express bucket usage
218+ m_transferConfig.s3Client ->AppendToUserAgent (" ft/s3-express" );
219+
208220 auto handle = Aws::MakeShared<TransferHandle>(CLASS_TAG, bucketName, keyName, fileOffset, downloadBytes, writeToStreamfn, writeToFile);
209221 handle->ApplyDownloadConfiguration (downloadConfig);
210222 handle->SetContext (context);
@@ -226,6 +238,9 @@ namespace Aws
226238 const DownloadConfiguration& downloadConfig,
227239 const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context)
228240 {
241+ // Track S3 Express bucket usage
242+ m_transferConfig.s3Client ->AppendToUserAgent (" ft/s3-express" );
243+
229244#ifdef _MSC_VER
230245 auto createFileFn = [=]() { return Aws::New<Aws::FStream>(CLASS_TAG, Aws::Utils::StringUtils::ToWString (writeToFile.c_str ()).c_str (),
231246 std::ios_base::out | std::ios_base::in | std::ios_base::binary | std::ios_base::trunc);};
@@ -1504,4 +1519,4 @@ namespace Aws
15041519 }
15051520 }
15061521 }
1507- }
1522+ }
0 commit comments