syntax = "proto3"; option cc_enable_arenas = true; import "protos/annotations/validation.proto"; import "protos/ydb_operation.proto"; import "google/protobuf/timestamp.proto"; package Ydb.Export; option go_package = "github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Export"; option java_package = "tech.ydb.export"; /// Common message ExportProgress { enum Progress { PROGRESS_UNSPECIFIED = 0; PROGRESS_PREPARING = 1; PROGRESS_TRANSFER_DATA = 2; PROGRESS_DONE = 3; PROGRESS_CANCELLATION = 4; PROGRESS_CANCELLED = 5; } } message ExportItemProgress { uint32 parts_total = 1; uint32 parts_completed = 2; google.protobuf.Timestamp start_time = 3; google.protobuf.Timestamp end_time = 4; } /// YT message ExportToYtSettings { message Item { // Database path to a table to be exported string source_path = 1 [(required) = true]; string destination_path = 2 [(required) = true]; } string host = 1 [(required) = true]; uint32 port = 2; string token = 3 [(required) = true]; repeated Item items = 4 [(size).ge = 1]; string description = 5 [(length).le = 128]; uint32 number_of_retries = 6; bool use_type_v3 = 7; } message ExportToYtResult { } message ExportToYtMetadata { ExportToYtSettings settings = 1; ExportProgress.Progress progress = 2; repeated ExportItemProgress items_progress = 3; } message ExportToYtRequest { Ydb.Operations.OperationParams operation_params = 1; ExportToYtSettings settings = 2 [(required) = true]; } message ExportToYtResponse { // operation.result = ExportToYtResult // operation.metadata = ExportToYtMetadata Ydb.Operations.Operation operation = 1; } /// S3 message ExportToS3Settings { enum Scheme { UNSPECIFIED = 0; HTTP = 1; HTTPS = 2; } enum StorageClass { STORAGE_CLASS_UNSPECIFIED = 0; STANDARD = 1; REDUCED_REDUNDANCY = 2; STANDARD_IA = 3; ONEZONE_IA = 4; INTELLIGENT_TIERING = 5; GLACIER = 6; DEEP_ARCHIVE = 7; OUTPOSTS = 8; }; message Item { // Database path to a table to be exported string source_path = 1 [(required) = true]; /* Tables are exported to one or more S3 objects. The object name begins with 'destination_prefix'. This prefix will be followed by '/data_PartNumber', where 'PartNumber' represents the index of the part, starting at zero. */ string destination_prefix = 2 [(required) = true]; } string endpoint = 1 [(required) = true]; Scheme scheme = 2; // HTTPS if not specified string bucket = 3 [(required) = true]; string access_key = 4 [(required) = true]; string secret_key = 5 [(required) = true]; repeated Item items = 6 [(size).ge = 1]; string description = 7 [(length).le = 128]; uint32 number_of_retries = 8; StorageClass storage_class = 9; // Codec used to compress data. Codecs are available: // - zstd. // - zstd-N, where N is compression level, e.g. zstd-3. string compression = 10; // Region to use in requests string region = 11; } message ExportToS3Result { } message ExportToS3Metadata { ExportToS3Settings settings = 1; ExportProgress.Progress progress = 2; repeated ExportItemProgress items_progress = 3; } message ExportToS3Request { Ydb.Operations.OperationParams operation_params = 1; ExportToS3Settings settings = 2 [(required) = true]; } message ExportToS3Response { // operation.result = ExportToS3Result // operation.metadata = ExportToS3Metadata Ydb.Operations.Operation operation = 1; }