aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Aws::Crt::S3::S3Client Class Referencefinal

#include <S3.h>

Public Member Functions

 S3Client (const S3Client &)=delete
 
 S3Client (S3Client &&)=delete
 
S3Clientoperator= (const S3Client &)=delete
 
S3Clientoperator= (S3Client &&)=delete
 
 S3Client (const S3ClientConfig &config) noexcept
 
 ~S3Client () noexcept=default
 
std::shared_ptr< S3MetaRequestMakeMetaRequest (S3MetaRequestOptions &options) noexcept
 
 operator bool () const noexcept
 
int LastError () const noexcept
 

Static Public Member Functions

static bool MakeDefaultSigningConfig (Auth::AwsSigningConfig &config, const String &region, const std::shared_ptr< Auth::ICredentialsProvider > &provider) noexcept
 

Detailed Description

High-throughput client for issuing S3 meta requests. Holds the underlying aws_s3_client, including its thread pool, connection pool, and signing config; the C handle is released when the wrapper is destroyed. A single client may serve many concurrent meta requests; create one per region per process unless you have a specific reason to do otherwise.

Constructor & Destructor Documentation

◆ S3Client() [1/3]

Aws::Crt::S3::S3Client::S3Client ( const S3Client )
delete

◆ S3Client() [2/3]

Aws::Crt::S3::S3Client::S3Client ( S3Client &&  )
delete

◆ S3Client() [3/3]

Aws::Crt::S3::S3Client::S3Client ( const S3ClientConfig config)
explicitnoexcept

◆ ~S3Client()

Aws::Crt::S3::S3Client::~S3Client ( )
defaultnoexcept

Member Function Documentation

◆ LastError()

int Aws::Crt::S3::S3Client::LastError ( ) const
noexcept
Returns
the CRT error code from the most recent failed operation on this client, or AWS_ERROR_UNKNOWN if none has been recorded.

◆ MakeDefaultSigningConfig()

bool Aws::Crt::S3::S3Client::MakeDefaultSigningConfig ( Auth::AwsSigningConfig config,
const String region,
const std::shared_ptr< Auth::ICredentialsProvider > &  provider 
)
staticnoexcept

Populate an existing signing config with defaults appropriate for S3, sourced from the given region and credentials provider. Fills the caller's config in place rather than returning one - AwsSigningConfig (via ISigningConfig) deletes its copy and move constructors, so it cannot be returned by value, and this avoids a heap allocation for the common case where the caller already owns the config (ex. as a member or on the stack).

Parameters
configthe signing config to populate.
regionthe AWS region to sign requests for.
providerthe credentials provider used during signing.
Returns
true on success, or false if provider is null.

◆ MakeMetaRequest()

std::shared_ptr< S3MetaRequest > Aws::Crt::S3::S3Client::MakeMetaRequest ( S3MetaRequestOptions options)
noexcept

Submit a meta request. The callbacks installed on the options object are copied into a CRT-owned callback bundle that backs the running request, so the caller may discard the options object after this call returns.

Parameters
optionsthe configured options for this meta request, produced by one of the subclass factories. Borrowed for the duration of the call only; the caller retains ownership.
Returns
a handle to the running meta request, or nullptr on failure. On failure, LastError() returns the CRT error code.

◆ operator bool()

Aws::Crt::S3::S3Client::operator bool ( ) const
inlineexplicitnoexcept
Returns
true if the underlying client was constructed successfully.

◆ operator=() [1/2]

S3Client & Aws::Crt::S3::S3Client::operator= ( const S3Client )
delete

◆ operator=() [2/2]

S3Client & Aws::Crt::S3::S3Client::operator= ( S3Client &&  )
delete

The documentation for this class was generated from the following files: