File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
include/ydb-cpp-sdk/client/import Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ struct TImportFromS3Settings : public TOperationRequestSettings<TImportFromS3Set
4141 FLUENT_SETTING_VECTOR (TItem, Item);
4242 FLUENT_SETTING_OPTIONAL (std::string, Description);
4343 FLUENT_SETTING_OPTIONAL (uint32_t , NumberOfRetries);
44+ FLUENT_SETTING_OPTIONAL (bool , NoACL);
4445};
4546
4647class TImportFromS3Response : public TOperation {
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ message ImportFromS3Settings {
4242 The object name begins with 'source_prefix'.
4343 This prefix is followed by:
4444 * '/data_PartNumber', where 'PartNumber' represents the index of the part, starting at zero;
45- * '/scheme.pb' - object with information about scheme, indexes, etc.
45+ * '/scheme.pb' - object with information about scheme, indexes, etc;
46+ * '/permissions.pb' - object with information about ACL and owner.
4647 */
4748 string source_prefix = 1 [(required) = true ];
4849
@@ -67,6 +68,10 @@ message ImportFromS3Settings {
6768 // details: https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html
6869 // it is especially useful for custom s3 implementations
6970 bool disable_virtual_addressing = 10 ;
71+
72+ // Prevent importing of ACL and owner. If true, objects are created with empty ACL
73+ // and their owner will be the user who started the import.
74+ bool no_acl = 11 ;
7075}
7176
7277message ImportFromS3Result {
Original file line number Diff line number Diff line change @@ -154,6 +154,10 @@ TFuture<TImportFromS3Response> TImportClient::ImportFromS3(const TImportFromS3Se
154154 request.mutable_settings ()->set_number_of_retries (settings.NumberOfRetries_ .value ());
155155 }
156156
157+ if (settings.NoACL_ ) {
158+ request.mutable_settings ()->set_no_acl (settings.NoACL_ .value ());
159+ }
160+
157161 request.mutable_settings ()->set_disable_virtual_addressing (!settings.UseVirtualAddressing_ );
158162
159163 return Impl_->ImportFromS3 (std::move (request), settings);
You can’t perform that action at this time.
0 commit comments