#include </data/code/userver/libraries/s3api/src/s3api/clients/client.hpp>
Implementation of S3 client.
Definition at line 35 of file client.hpp.
Public Types | |
| using | CiUnorderedMap = ::http::headers::HeaderMap |
| using | Meta = CiUnorderedMap |
| using | Headers = CiUnorderedMap |
Public Member Functions | |
| ClientImpl (std::shared_ptr< S3Connection > s3conn, std::shared_ptr< authenticators::Authenticator > authenticator, std::string bucket) | |
| ClientImpl (std::shared_ptr< S3Connection > s3conn, std::shared_ptr< authenticators::AccessKey > authenticator, std::string bucket) | |
| std::string | PutObject (std::string_view path, std::string data, const std::optional< Meta > &meta, std::string_view content_type, const std::optional< std::string > &content_disposition, const std::optional< std::vector< Tag > > &tags) const final |
| void | DeleteObject (std::string_view path) const final |
| void | PutObjectConditional (std::string_view path, std::string data, const std::optional< std::string > &expected_etag) const final |
| Write JSON data without metadata if the object's ETag matches. A missing expected_etag creates the object only if it does not exist. An empty ETag is invalid. The default implementation throws std::logic_error. | |
| void | PutObjectConditional (std::string_view path, std::string data, const std::optional< std::string > &expected_etag, const std::optional< Meta > &meta) const final |
| Conditional JSON write with the same preconditions as the overload without metadata. | |
| std::optional< std::string > | GetObject (std::string_view path, std::optional< std::string > versiong, HeadersDataResponse *headers_data, const HeaderDataRequest &headers_request) const final |
| std::string | TryGetObject (std::string_view path, std::optional< std::string > versiong, HeadersDataResponse *headers_data, const HeaderDataRequest &headers_request) const final |
| std::optional< std::string > | GetPartialObject (std::string_view path, std::string_view range, std::optional< std::string > versiong, HeadersDataResponse *headers_data, const HeaderDataRequest &headers_request) const final |
| std::string | TryGetPartialObject (std::string_view path, std::string_view range, std::optional< std::string > versiong, HeadersDataResponse *headers_data, const HeaderDataRequest &headers_request) const final |
| std::string | CopyObject (std::string_view key_from, std::string_view bucket_to, std::string_view key_to, const std::optional< Meta > &meta) final |
| std::string | CopyObject (std::string_view key_from, std::string_view key_to, const std::optional< Meta > &meta) final |
| std::optional< HeadersDataResponse > | GetObjectHead (std::string_view path, const HeaderDataRequest &request) const final |
| std::string | GenerateDownloadUrl (std::string_view path, time_t expires, bool use_ssl) const final |
| std::string | GenerateDownloadUrlVirtualHostAddressing (std::string_view path, const std::chrono::system_clock::time_point &expires_at, std::string_view protocol) const final |
| std::string | GenerateUploadUrlVirtualHostAddressing (std::string_view data, std::string_view content_type, std::string_view path, const std::chrono::system_clock::time_point &expires_at, std::string_view protocol) const final |
| std::optional< std::string > | ListBucketContents (std::string_view path, int max_keys, std::string marker, std::string delimiter) const final |
| std::vector< ObjectMeta > | ListBucketContentsParsed (std::string_view path_prefix) const final |
| std::vector< std::string > | ListBucketDirectories (std::string_view path_prefix) const final |
| multipart_upload::InitiateMultipartUploadResult | CreateMultipartUpload (const multipart_upload::CreateMultipartUploadRequest &request) const final |
| Initiate a multipart upload sequence Performs a CreateMultipartUpload S3 Action. Returns result with upload ID which is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html. | |
| multipart_upload::UploadPartResult | UploadPart (const multipart_upload::UploadPartRequest &request) const final |
| Upload a part in a multipart upload sequence. Performs an UploadPart S3 Action. Returns ETag value which you must include in the subsequent request to complete the multipart upload. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html. | |
| multipart_upload::CompleteMultipartUploadResult | CompleteMultipartUpload (const multipart_upload::CompleteMultipartUploadRequest &request) const final |
| Complete a multipart upload by assembling previously uploaded parts. Performs a CompleteMultipartUpload S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html. | |
| void | AbortMultipartUpload (const multipart_upload::AbortMultipartUploadRequest &request) const final |
| Abort a multipart upload sequence. Performs an AbortMultipartUpload S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html. | |
| multipart_upload::ListPartsResult | ListParts (const multipart_upload::ListPartsRequest &request) const final |
| List the parts that have been uploaded for a specific multipart upload. Performs a ListParts S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html. | |
| multipart_upload::ListMultipartUploadsResult | ListMultipartUploads (const multipart_upload::ListMultipartUploadsRequest &request) const final |
| List in-progress multipart uploads in a bucket Performs a ListMultipartUploads S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html. | |
| void | UpdateConfig (ConnectionCfg &&config) final |
| std::string_view | GetBucketName () const final |
|
inherited |
| s3api::ClientImpl::ClientImpl | ( | std::shared_ptr< S3Connection > | s3conn, |
| std::shared_ptr< authenticators::Authenticator > | authenticator, | ||
| std::string | bucket ) |
Definition at line 192 of file client.cpp.
| s3api::ClientImpl::ClientImpl | ( | std::shared_ptr< S3Connection > | s3conn, |
| std::shared_ptr< authenticators::AccessKey > | authenticator, | ||
| std::string | bucket ) |
Definition at line 202 of file client.cpp.
|
finalvirtual |
Abort a multipart upload sequence. Performs an AbortMultipartUpload S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html.
Implements s3api::Client.
Definition at line 653 of file client.cpp.
|
finalvirtual |
Complete a multipart upload by assembling previously uploaded parts. Performs a CompleteMultipartUpload S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html.
Implements s3api::Client.
Definition at line 637 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 549 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 587 of file client.cpp.
|
finalvirtual |
Initiate a multipart upload sequence Performs a CreateMultipartUpload S3 Action. Returns result with upload ID which is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html.
Implements s3api::Client.
Definition at line 595 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 241 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 371 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 394 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 406 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 214 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 291 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 356 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 322 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 474 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 488 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 518 of file client.cpp.
|
finalvirtual |
List in-progress multipart uploads in a bucket Performs a ListMultipartUploads S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html.
Implements s3api::Client.
Definition at line 672 of file client.cpp.
|
finalvirtual |
List the parts that have been uploaded for a specific multipart upload. Performs a ListParts S3 Action. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html.
Implements s3api::Client.
Definition at line 658 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 216 of file client.cpp.
|
finalvirtual |
Write JSON data without metadata if the object's ETag matches. A missing expected_etag creates the object only if it does not exist. An empty ETag is invalid. The default implementation throws std::logic_error.
Reimplemented from s3api::Client.
Definition at line 262 of file client.cpp.
|
finalvirtual |
Conditional JSON write with the same preconditions as the overload without metadata.
| path | object key. |
| data | JSON content to write. |
| expected_etag | ETag that must match, or std::nullopt to require an absent object. |
| meta | User metadata keys without the x-amz-meta- prefix, which is added automatically. std::nullopt and an empty map send no user metadata headers. The default implementation delegates to the overload without metadata for absent or empty metadata, and throws std::logic_error for nonempty metadata. Clients supporting metadata override this overload. |
Reimplemented from s3api::Client.
Definition at line 270 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 312 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 344 of file client.cpp.
|
finalvirtual |
Implements s3api::Client.
Definition at line 190 of file client.cpp.
|
finalvirtual |
Upload a part in a multipart upload sequence. Performs an UploadPart S3 Action. Returns ETag value which you must include in the subsequent request to complete the multipart upload. For details see https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html.
Implements s3api::Client.
Definition at line 608 of file client.cpp.