AWS SDK for C++

AWS SDK for C++ Version 1.11.548

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Loading...
Searching...
No Matches
ClientConfiguration.h
1
6#pragma once
7
8#include <aws/core/Core_EXPORTS.h>
9#include <aws/core/http/Scheme.h>
10#include <aws/core/http/Version.h>
11#include <aws/core/Region.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/http/HttpTypes.h>
14#include <aws/core/utils/Array.h>
15#include <aws/crt/Optional.h>
16#include <smithy/tracing/TelemetryProvider.h>
17#include <memory>
18
19namespace Aws
20{
21 namespace Utils
22 {
23 namespace Threading
24 {
25 class Executor;
26 } // namespace Threading
27
28 namespace RateLimits
29 {
30 class RateLimiterInterface;
31 } // namespace RateLimits
32 } // namespace Utils
33 namespace Client
34 {
35 class RetryStrategy; // forward declare
36
44 {
45 DEFAULT,
46 ALWAYS,
47 NEVER
48 };
49
54 {
55 DISABLE,
56 ENABLE,
57 };
58
67 };
68
77 };
78
82 };
88 bool shouldDisableIMDS = false;
89 };
90
95 struct AWS_CORE_API ClientConfiguration
96 {
98 {
102 std::function<std::shared_ptr<RetryStrategy>()> retryStrategyCreateFn;
108 std::function<std::shared_ptr<Utils::Threading::Executor>()> executorCreateFn;
112 std::function<std::shared_ptr<Utils::RateLimits::RateLimiterInterface>()> writeRateLimiterCreateFn;
116 std::function<std::shared_ptr<Utils::RateLimits::RateLimiterInterface>()> readRateLimiterCreateFn;
120 std::function<std::shared_ptr<smithy::components::tracing::TelemetryProvider>()> telemetryProviderCreateFn;
121
123 };
124
126
132
139 ClientConfiguration(const char* profileName, bool shouldDisableIMDS = false);
140
147 explicit ClientConfiguration(bool useSmartDefaults, const char* defaultMode = "legacy", bool shouldDisableIMDS = false);
148
152 virtual ~ClientConfiguration() = default;
153
157 ProviderFactories configFactories = ProviderFactories::defaultFactories;
158
174 bool useDualStack = false;
175
179 bool useFIPS = false;
180
184 unsigned maxConnections = 25;
190 long httpRequestTimeoutMs = 0;
198 long requestTimeoutMs = 0;
202 long connectTimeoutMs = 1000;
207 bool enableTcpKeepAlive = true;
213 unsigned long tcpKeepAliveIntervalMs = 30000;
218 unsigned long lowSpeedLimit = 1;
223 std::shared_ptr<RetryStrategy> retryStrategy = nullptr;
228
232 bool allowSystemProxy = false;
244 unsigned proxyPort = 0;
286 std::shared_ptr<Aws::Utils::Threading::Executor> executor = nullptr;
291 bool verifySSL = true;
322 std::shared_ptr<Aws::Utils::RateLimits::RateLimiterInterface> writeRateLimiter = nullptr;
327 std::shared_ptr<Aws::Utils::RateLimits::RateLimiterInterface> readRateLimiter = nullptr;
336 Aws::Http::TransferLibPerformanceMode httpLibPerfMode = Http::TransferLibPerformanceMode::LOW_LATENCY;
341
351 bool disableExpectHeader = false;
352
356 bool enableClockSkewAdjustment = true;
357
365 bool enableHostPrefixInjection = true;
366
378 Aws::Crt::Optional<bool> enableEndpointDiscovery;
379
384 bool enableHttpClientTrace = false;
385
390
397
401 bool disableIMDS = false;
402
411 Aws::Http::Version version = Http::Version::HTTP_VERSION_2TLS;
412
416 bool disableImdsV1 = false;
417
427
428 struct {
434 RequestChecksumCalculation requestChecksumCalculation = RequestChecksumCalculation::WHEN_SUPPORTED;
435
441 ResponseChecksumValidation responseChecksumValidation = ResponseChecksumValidation::WHEN_SUPPORTED;
442 } checksumConfig;
443
447 static Aws::String LoadConfigFromEnvOrProfile(const Aws::String& envKey, const Aws::String& profile,
448 const Aws::String& profileProperty, const Aws::Vector<Aws::String>& allowedValues,
449 const Aws::String& defaultValue);
450
455 std::shared_ptr<smithy::components::tracing::TelemetryProvider> telemetryProvider;
456
466 bool useAnonymousAuth = false;
467 } winHTTPOptions;
468 };
469
474 std::shared_ptr<RetryStrategy> InitRetryStrategy(Aws::String retryMode = "");
475
480 AWS_CORE_API Aws::String ComputeUserAgentString(ClientConfiguration const * const pConfig = nullptr);
481
482 AWS_CORE_API Aws::String FilterUserAgentToken(char const * const token);
483
484 } // namespace Client
485} // namespace Aws
AWS_CORE_API Aws::String FilterUserAgentToken(char const *const token)
AWS_CORE_API Aws::String ComputeUserAgentString(ClientConfiguration const *const pConfig=nullptr)
std::shared_ptr< RetryStrategy > InitRetryStrategy(Aws::String retryMode="")
TransferLibPerformanceMode
Definition HttpTypes.h:43
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition AWSString.h:97
std::vector< T, Aws::Allocator< T > > Vector
Definition AWSVector.h:17
std::function< std::shared_ptr< Utils::Threading::Executor >()> executorCreateFn
std::function< std::shared_ptr< Utils::RateLimits::RateLimiterInterface >()> readRateLimiterCreateFn
std::function< std::shared_ptr< smithy::components::tracing::TelemetryProvider >()> telemetryProviderCreateFn
std::function< std::shared_ptr< Utils::RateLimits::RateLimiterInterface >()> writeRateLimiterCreateFn
std::function< std::shared_ptr< RetryStrategy >()> retryStrategyCreateFn
Aws::Crt::Optional< bool > enableEndpointDiscovery
ClientConfiguration(const char *profileName, bool shouldDisableIMDS=false)
static Aws::String LoadConfigFromEnvOrProfile(const Aws::String &envKey, const Aws::String &profile, const Aws::String &profileProperty, const Aws::Vector< Aws::String > &allowedValues, const Aws::String &defaultValue)
Aws::Http::TransferLibType httpLibOverride
Aws::Client::RequestCompressionConfig requestCompressionConfig
ClientConfiguration(const ClientConfigurationInitValues &configuration)
virtual ~ClientConfiguration()=default
ClientConfiguration(bool useSmartDefaults, const char *defaultMode="legacy", bool shouldDisableIMDS=false)
Aws::Utils::Array< Aws::String > nonProxyHosts
std::shared_ptr< smithy::components::tracing::TelemetryProvider > telemetryProvider