AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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
62 };
68 bool shouldDisableIMDS = false;
69 };
70
75 struct AWS_CORE_API ClientConfiguration
76 {
78 {
82 std::function<std::shared_ptr<RetryStrategy>()> retryStrategyCreateFn;
88 std::function<std::shared_ptr<Utils::Threading::Executor>()> executorCreateFn;
92 std::function<std::shared_ptr<Utils::RateLimits::RateLimiterInterface>()> writeRateLimiterCreateFn;
96 std::function<std::shared_ptr<Utils::RateLimits::RateLimiterInterface>()> readRateLimiterCreateFn;
100 std::function<std::shared_ptr<smithy::components::tracing::TelemetryProvider>()> telemetryProviderCreateFn;
101
103 };
104
106
112
119 ClientConfiguration(const char* profileName, bool shouldDisableIMDS = false);
120
127 explicit ClientConfiguration(bool useSmartDefaults, const char* defaultMode = "legacy", bool shouldDisableIMDS = false);
128
132 virtual ~ClientConfiguration() = default;
133
137 ProviderFactories configFactories = ProviderFactories::defaultFactories;
138
154 bool useDualStack = false;
155
159 bool useFIPS = false;
160
164 unsigned maxConnections = 25;
170 long httpRequestTimeoutMs = 0;
178 long requestTimeoutMs = 0;
182 long connectTimeoutMs = 1000;
187 bool enableTcpKeepAlive = true;
193 unsigned long tcpKeepAliveIntervalMs = 30000;
198 unsigned long lowSpeedLimit = 1;
203 std::shared_ptr<RetryStrategy> retryStrategy = nullptr;
208
212 bool allowSystemProxy = false;
224 unsigned proxyPort = 0;
266 std::shared_ptr<Aws::Utils::Threading::Executor> executor = nullptr;
271 bool verifySSL = true;
302 std::shared_ptr<Aws::Utils::RateLimits::RateLimiterInterface> writeRateLimiter = nullptr;
307 std::shared_ptr<Aws::Utils::RateLimits::RateLimiterInterface> readRateLimiter = nullptr;
316 Aws::Http::TransferLibPerformanceMode httpLibPerfMode = Http::TransferLibPerformanceMode::LOW_LATENCY;
321
331 bool disableExpectHeader = false;
332
336 bool enableClockSkewAdjustment = true;
337
345 bool enableHostPrefixInjection = true;
346
358 Aws::Crt::Optional<bool> enableEndpointDiscovery;
359
364 bool enableHttpClientTrace = false;
365
370
377
381 bool disableIMDS = false;
382
391 Aws::Http::Version version = Http::Version::HTTP_VERSION_2TLS;
392
396 bool disableImdsV1 = false;
397
407
412 const Aws::String& profile,
413 const Aws::String& profileProperty,
414 const Aws::Vector<Aws::String>& allowedValues,
415 const Aws::String& defaultValue);
416
421 std::shared_ptr<smithy::components::tracing::TelemetryProvider> telemetryProvider;
422 };
423
428 std::shared_ptr<RetryStrategy> InitRetryStrategy(Aws::String retryMode = "");
429
434 AWS_CORE_API Aws::String ComputeUserAgentString(ClientConfiguration const * const pConfig = nullptr);
435
436 AWS_CORE_API Aws::String FilterUserAgentToken(char const * const token);
437
438 } // namespace Client
439} // 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:48
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