Interface IClientConfig
This interface is the read only access to the ClientConfig object used when setting up service clients. Once service clients are initiated the config object should not be changed to avoid issues with using a service client in a multi threaded environment.
[CLSCompliant(false)]
public interface IClientConfig
- Extension Methods
Properties
AWSTokenProvider
For Services using Bearer authentication, this controls how BearerTokenSigner resolves a AWSToken.
See DefaultAWSTokenProviderChain for additional information.IAWSTokenProvider AWSTokenProvider { get; }
Property Value
AllowAutoRedirect
This flag controls if .NET HTTP infrastructure should follow redirection responses (e.g. HTTP 307 - temporary redirect).
bool AllowAutoRedirect { get; }
Property Value
AuthenticationRegion
Gets the AuthenticationRegion property. Used in AWS4 request signing, this is an optional property; change it only if the region cannot be determined from the service endpoint.
string AuthenticationRegion { get; }
Property Value
AuthenticationServiceName
Gets the AuthenticationServiceName property. Used in AWS4 request signing, this is the short-form name of the service being called.
string AuthenticationServiceName { get; }
Property Value
BufferSize
Gets the BufferSize property. The BufferSize controls the buffer used to read in from input streams and write out to the request.
int BufferSize { get; }
Property Value
CacheHttpClient
This is a switch used for performance testing and is not intended for production applications to change. This switch may be removed in a future version of the SDK as the .NET Core platform matures.
If true, the HttpClient is cached and reused for every request made by the service client and shared with other service clients.
For the .NET Core platform this is default to true because the HttpClient manages the connection pool.
bool CacheHttpClient { get; }
Property Value
ClockOffset
Returns the calculated clock skew value for this config's service endpoint. If AWSConfigs.CorrectForClockSkew is false, this value won't be used to construct service requests.
TimeSpan ClockOffset { get; }
Property Value
CorrectedUtcNow
Returns the clock skew adjusted utc now. This value is affected by AWSConfigs.ManualClockCorrection
DateTime CorrectedUtcNow { get; }
Property Value
DefaultConfigurationMode
Returns the DefaultConfigurationMode that will be used. If none is specified, than the correct one is computed by IDefaultConfigurationProvider.
DefaultConfigurationMode DefaultConfigurationMode { get; }
Property Value
DisableHostPrefixInjection
Gets the DisableHostPrefixInjection flag. If true, host prefix injection will be disabled for this client, the default value of this flag is false. Host prefix injection prefixes the service endpoint with request members from APIs which use this feature. Example: for a hostPrefix of "foo-name." and a endpoint of "service.region.amazonaws.com" the default behavior is to prefix the endpoint with the hostPrefix resulting in a final endpoint of "foo-name.service.region.amazonaws.com". Setting DisableHostPrefixInjection to true will disable hostPrefix injection resulting in a final endpoint of "service.region.amazonaws.com" regardless of the value of hostPrefix. E.g. You may want to disable host prefix injection for testing against a local mock endpoint.
bool DisableHostPrefixInjection { get; }
Property Value
DisableLogging
Gets the DisableLogging. If true logging for this client will be disabled.
bool DisableLogging { get; }
Property Value
EndpointDiscoveryCacheLimit
Returns the maximum number of discovered endpoints that can be stored within the cache for the client. The default limit is 1000 cache entries.
int EndpointDiscoveryCacheLimit { get; }
Property Value
EndpointDiscoveryEnabled
Returns the flag indicating if endpoint discovery should be enabled or disabled for operations that are not required to use endpoint discovery.
bool EndpointDiscoveryEnabled { get; }
Property Value
EndpointProvider
Gets and sets of the EndpointProvider property. This property is used for endpoints resolution. During service client creation it is set to service's default generated EndpointProvider, but can be changed to use custom user supplied EndpointProvider.
IEndpointProvider EndpointProvider { get; }
Property Value
FastFailRequests
Under Adaptive retry mode, this flag determines if the client should wait for a send token to become available or don't block and fail the request immediately if a send token is not available.
bool FastFailRequests { get; }
Property Value
HttpClientCacheSize
If CacheHttpClient is set to true then HttpClientCacheSize controls the number of HttpClients cached.
int HttpClientCacheSize { get; }
Property Value
HttpClientFactory
HttpClientFactory HttpClientFactory { get; }
Property Value
IsMaxErrorRetrySet
Determines if MaxErrorRetry has been manually set.
bool IsMaxErrorRetrySet { get; }
Property Value
LogMetrics
Flag on whether to log metrics for service calls.
This can be set in the application's configs, as below:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="AWSLogMetrics" value"true"/>
</appSettings>
</configuration>
bool LogMetrics { get; }
Property Value
LogResponse
Gets the LogResponse property. If this property is set to true, the service response is read in its entirety and logged.
bool LogResponse { get; }
Property Value
MaxConnectionsPerServer
Get the value to use for MaxConnectionsPerServer on requests. If this property is null, MaxConnectionsPerServer will be left at its default value of MaxValue.
int? MaxConnectionsPerServer { get; }
Property Value
- int?
MaxErrorRetry
Returns the flag indicating how many retry HTTP requests an SDK should make for a single SDK operation invocation before giving up. This flag will return 4 when the RetryMode is set to "Legacy" which is the default. For RetryMode values of "Standard" or "Adaptive" this flag will return 2. In addition to the values returned that are dependant on the RetryMode, the value can be set to a specific value by using the AWS_MAX_ATTEMPTS environment variable, max_attempts in the shared configuration file, or by setting a value directly on this property. When using AWS_MAX_ATTEMPTS or max_attempts the value returned from this property will be one less than the value entered because this flag is the number of retry requests, not total requests. To learn more about the RetryMode property that affects the values returned by this flag, see RetryMode.
int MaxErrorRetry { get; }
Property Value
ProgressUpdateInterval
Gets the interval at which progress update events are raised for upload operations. By default, the progress update events are raised at every 100KB of data transferred.
long ProgressUpdateInterval { get; }
Property Value
ProxyCredentials
Credentials to use with a proxy.
ICredentials ProxyCredentials { get; }
Property Value
ProxyHost
Gets the ProxyHost property.
string ProxyHost { get; }
Property Value
ProxyPort
Gets the ProxyPort property.
int ProxyPort { get; }
Property Value
ReadEntireResponse
Gets the ReadEntireResponse. If this property is set to true, the service response is read in its entirety before being processed.
bool ReadEntireResponse { get; }
Property Value
RegionEndpoint
Gets the RegionEndpoint property. The region constant to use that determines the endpoint to use. If this is not set then the client will fallback to the value of ServiceURL.
RegionEndpoint RegionEndpoint { get; }
Property Value
RegionEndpointServiceName
The constant used to lookup in the region hash the endpoint.
string RegionEndpointServiceName { get; }
Property Value
ResignRetries
Flag on whether to resign requests on retry or not.
bool ResignRetries { get; }
Property Value
RetryMode
Returns the flag indicating the current mode in use for request retries and influences the value returned from MaxErrorRetry. The default value is RequestRetryMode.Legacy. This flag can be configured by using the AWS_RETRY_MODE environment variable, retry_mode in the shared configuration file, or by setting this value directly.
RequestRetryMode RetryMode { get; }
Property Value
ServiceURL
Gets and sets of the ServiceURL property. This is an optional property if you need to set a specific service URL instead setting the region with the RegionEndpoint property.
string ServiceURL { get; }
Property Value
ServiceVersion
Gets Service Version
string ServiceVersion { get; }
Property Value
SignatureMethod
Gets the signatureMethod property.
SigningAlgorithm SignatureMethod { get; }
Property Value
SignatureVersion
Gets the SignatureVersion property.
Note: This property exists for backward compatibility but is no longer used by any service other than S3.
string SignatureVersion { get; }
Property Value
ThrottleRetries
Configures a flag enabling to either opt in or opt out of the retry throttling service. Note: set value to true to enable retry throttling feature. The Default value for this flag is false.
bool ThrottleRetries { get; }
Property Value
Timeout
Gets the default request timeout value.
TimeSpan? Timeout { get; }
Property Value
Remarks
If the value is set, the value is assigned to the Timeout property of the HTTPWebRequest/HttpClient object used to send requests.
Please specify a timeout value only if the operation will not complete within the default intervals specified for an HttpWebRequest/HttpClient.
UseAlternateUserAgentHeader
When set to true, the service client will use the x-amz-user-agent header instead of the User-Agent header to report version and environment information to the AWS service.
Note: This is especially useful when using a platform like WebAssembly which doesn't allow to specify the User-Agent header.
bool UseAlternateUserAgentHeader { get; }
Property Value
UseDualstackEndpoint
Configures the endpoint calculation for a service to go to a dual stack (ipv6 enabled) endpoint for the configured region.
bool UseDualstackEndpoint { get; }
Property Value
Remarks
Note: AWS services are enabling dualstack endpoints over time. It is your responsibility to check that the service actually supports a dualstack endpoint in the configured region before enabling this option for a service.
UseFIPSEndpoint
Configures the endpoint calculation to go to a FIPS (https://aws.amazon.com/compliance/fips/) endpoint for the configured region.
bool UseFIPSEndpoint { get; }
Property Value
UseHttp
Gets the UseHttp property. If this property is set to true, the client attempts to use HTTP protocol. By default, this property is set to false.
bool UseHttp { get; }
Property Value
UserAgent
Gets the UserAgent property.
string UserAgent { get; }
Property Value
Methods
DetermineDnsSuffix()
Given this client configuration, return a DNS suffix for service endpoint url.
[Obsolete("This operation is obsoleted because as of version 3.7.100 endpoint is resolved using a newer system that uses request level parameters to resolve the endpoint.")]
string DetermineDnsSuffix()
Returns
DetermineServiceURL()
Using either the RegionEndpoint or the ServiceURL determine what the URL to the service is.
[Obsolete("This operation is obsoleted because as of version 3.7.100 endpoint is resolved using a newer system that uses request level parameters to resolve the endpoint.")]
string DetermineServiceURL()
Returns
- string
The URL to the service.
GetWebProxy()
Returns a WebProxy instance configured to match the proxy settings in the client configuration.
IWebProxy GetWebProxy()
Returns
Validate()
Performs validation on this config object. Throws exception if any of the required values are missing/invalid.
void Validate()
Exceptions
- AmazonClientException
The timeout specified is null.