|
aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
|
#include <S3.h>
Classes | |
| struct | Impl |
Configuration object used to construct an S3Client. The credentials provider is required at construction; every other setting is optional and set through the fluent Set* setters. The object owns backing storage for string-valued fields, the credentials provider reference, and the internally-built signing config, so it must outlive the S3Client construction call.
|
delete |
|
delete |
|
explicitnoexcept |
Construct a config. The credentials provider is required (no defensible default - the SDK can't guess credentials). The signing config is built internally via S3Client::MakeDefaultSigningConfig, which wraps aws_s3_init_default_signing_config and additionally clears use_double_uri_encode and should_normalize_uri_path (both required for S3 request signing; without either, keys with reserved characters or "//" fail with SignatureDoesNotMatch). Region defaults to "us-east-1"; override via SetRegion. S3 Express is enabled by default; override via SetEnableS3Express.
| credentialsProvider | the credentials provider used to source SigV4 credentials. The config retains a shared reference; the provider must remain valid at least until the S3Client is constructed (aws_s3_client_new deep-copies the signing config and acquires its own reference to the provider). |
|
defaultnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
delete |
|
delete |
|
noexcept |
Set the client bootstrap used for connection establishment. If not set, the process-global default bootstrap is used (see Aws::Crt::ApiHandle::GetOrCreateStaticDefaultClientBootstrap).
| bootstrap | the client bootstrap. |
|
noexcept |
Install a callback invoked once the underlying CRT client has finished its asynchronous shutdown. aws_s3_client_release (called from ~S3Client) only starts teardown; the client's threads and connection pool may still be winding down after the destructor returns. This callback is the signal that teardown is complete and it is safe to release dependencies the client borrowed (event loop group, client bootstrap, credentials provider). It fires on a CRT thread, after the S3Client object may already be gone.
| callback | the callback to invoke on shutdown completion. |
|
noexcept |
Enable connection health monitoring. A connection is shut down if its throughput falls below the minimum for longer than the allowable failure interval.
| minimumThroughputBytesPerSecond | minimum acceptable throughput. |
| allowableThroughputFailureIntervalSeconds | grace interval in seconds. |
|
noexcept |
| timeoutMs | connection timeout in milliseconds. |
|
noexcept |
|
noexcept |
Set the upper bound on memory the CRT may buffer for in-flight parts across all meta requests created with this client.
| bytes | memory ceiling in bytes. |
|
noexcept |
| bytes | threshold in bytes above which an upload is split into a multipart upload. |
|
noexcept |
Set the network interface names the client distributes its connections across, allowing it to saturate multiple NICs. If any interface name is invalid or its link goes down, you will see connection failures.
Experimental and only supported on Linux, macOS, and platforms with SO_BINDTODEVICE or IP_BOUND_IF; not supported on Windows (AWS_ERROR_PLATFORM_NOT_SUPPORTED is raised on unsupported platforms). The config owns a copy of the names.
| networkInterfaceNames | the interface names, ex. "eth0". |
|
noexcept |
Set the target part size for multipart transfers (downloads and uploads). For uploads, the CRT may increase the effective part size if the target would require more than 10,000 parts (the S3 service limit), and will also raise it to the 5 MiB minimum upload part size.
| bytes | target part size in bytes. |
|
noexcept |
Set the HTTP proxy options used for connections. The config owns a copy of the options.
| proxyOptions | the proxy options. |
|
noexcept |
Enable read backpressure and set the initial read window, in bytes, for downloads. When backpressure is enabled the CRT pauses delivering body data once the window is exhausted until the application increments it. A window of 0 with backpressure enabled means no data is read until the window is incremented.
| enable | whether to enable read backpressure. |
| initialReadWindow | initial read window in bytes. |
|
noexcept |
Override the AWS region the client signs requests for. Defaults to "us-east-1" if not set.
| region | the region string, ex. "us-east-1". |
|
noexcept |
Select a network-level retry strategy by flavor. This is the common path: the matching aws_retry_strategy is built when the S3Client is constructed (the point at which the event loop group is known). S3RetryStrategyType::Default leaves the choice to the CRT. Overrides any factory set via SetRetryStrategyFactory.
| type | the retry strategy flavor. |
| options | backoff knobs, used only for ExponentialBackoff. |
|
noexcept |
Install a factory for fine-grained control over the retry strategy. Invoked once, at S3Client construction, with this config; it returns the S3RetryStrategy binding the client should use. Use this when the flavors exposed by SetRetryStrategy are not sufficient. Overrides any flavor set via SetRetryStrategy.
| factory | callback that produces the retry strategy. |
|
noexcept |
Configure TCP keep-alive for connections. Both values are in seconds; a value of 0 leaves the corresponding setting at the operating-system default.
| keepAliveIntervalSec | interval between keep-alive probes. |
| keepAliveTimeoutSec | timeout before a connection is considered dead. |
|
noexcept |
Set the target aggregate throughput the client will tune toward, in gigabits per second. This drives the CRT's pool sizing.
| gbps | target throughput in Gbps. |
|
noexcept |
Set the TLS connection options used for connections. Pair with SetTlsMode(S3TlsMode::Enabled); the options are ignored when TLS mode is Disabled. The config owns a copy of the options.
| options | the TLS connection options. |
|
noexcept |
Set whether the client establishes connections over TLS. The configured TLS connection options are only consulted when the mode is Enabled.
| mode | the TLS mode. |