AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Configuration options that apply to the entire SDK. These settings can be configured through app.config or web.config. Below is a full sample configuration that illustrates all the possible options.


  

Inheritance Hierarchy

System.Object
  Amazon.AWSConfigs

Namespace: Amazon
Assembly: AWSSDK.Core.dll
Version: 3.x.y.z

Syntax

C#
public static class AWSConfigs

The AWSConfigs type exposes the following members

Properties

NameTypeDescription
Public Property Static Property ApplicationName System.String

The unique application name for the current application. This values is currently used by high level APIs (Mobile Analytics Manager and Cognito Sync Manager) to create a unique file path to store local database files. Changes to this setting will only take effect in newly-constructed objects using this property.


  

Public Property Static Property AWSProfileName System.String

Profile name for stored AWS credentials that will be used to make service calls. Changes to this setting will only take effect in newly-constructed clients.

To reference the account from an application's App.config or Web.config use the AWSProfileName setting.



    
        
    

            

Public Property Static Property AWSProfilesLocation System.String

Location of the credentials file shared with other AWS SDKs. By default, the credentials file is stored in the .aws directory in the current user's home directory. Changes to this setting will only take effect in newly-constructed clients.

To reference the profile from an application's App.config or Web.config use the AWSProfileName setting.



    
        
    

            

Public Property Static Property AWSRegion System.String

Configures the default AWS region for clients which have not explicitly specified a region. Changes to this setting will only take effect for newly constructed instances of AWS clients. This setting can be configured through the App.config. For example:


  

Public Property Static Property ClockOffset System.TimeSpan

The calculated clock skew correction, if there is one. This field will be set if a service call resulted in an exception and the SDK has determined that there is a difference between local and server times. If Amazon.AWSConfigs.CorrectForClockSkew is set to true, this value will be set to the correction, but it will not be used by the SDK and clock skew errors will not be retried.

Public Property Static Property CorrectForClockSkew System.Boolean

Determines if the SDK should correct for client clock skew by determining the correct server time and reissuing the request with the correct time. Default value of this field is True. Amazon.AWSConfigs.ClockOffset will be updated with the calculated offset even if this field is set to false, though requests will not be corrected or retried. Ignored if Amazon.AWSConfigs.ManualClockCorrection is set.

Public Property Static Property EndpointDefinition System.String

Configures if the SDK should use a custom configuration file that defines the regions and endpoints.


  

Public Property Static Property Logging Amazon.LoggingOptions

Configures how the SDK should log events, if at all. Changes to this setting will only take effect in newly-constructed clients. The setting can be configured through App.config, for example:


  

            

Public Property Static Property LoggingConfig Amazon.Util.LoggingConfig

Configuration for the Logging section of AWS configuration. Changes to some settings may not take effect until a new client is constructed. Example section:


  

Public Property Static Property LogMetrics System.Boolean

Configures if the SDK should log performance metrics. This setting configures the default LogMetrics property for all clients/configs. Changes to this setting will only take effect in newly-constructed clients. The setting can be configured through App.config, for example:


  

            

Public Property Static Property ManualClockCorrection System.Nullable<System.TimeSpan>

Manual offset to apply to client clock.

Public Property Static Property ProxyConfig Amazon.Util.ProxyConfig

Configuration for the Proxy section of AWS configuration. Changes to some settings may not take effect until a new client is constructed. Example section:


  

Public Property Static Property RegionEndpoint Amazon.RegionEndpoint

Configuration for the region endpoint section of AWS configuration. Changes may not take effect until a new client is constructed. Example section:


  

Public Property Static Property ResponseLogging Amazon.ResponseLoggingOption

Configures when the SDK should log service responses. Changes to this setting will take effect immediately. The setting can be configured through App.config, for example:


  

            

Public Property Static Property UseSdkCache System.Boolean

Configures if the SDK Cache should be used, the default value is true.


  

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method Static Method AddTraceListener(string, TraceListener)

Add a listener for SDK logging.

Public Method Static Method GenerateConfigTemplate()

Generates a sample XML representation of the SDK configuration section.

Public Method Static Method GetConfig(string)
Public Method Static Method RemoveTraceListener(string, string)

Remove a trace listener from SDK logging.

Fields

NameTypeDescription
Field Static Field AWSProfileNameKey System.String

Key for the AWSProfileName property. Amazon.AWSConfigs.AWSProfileName

Field Static Field AWSProfilesLocationKey System.String

Key for the AWSProfilesLocation property. Amazon.AWSConfigs.LogMetrics

Field Static Field AWSRegionKey System.String

Key for the AWSRegion property. Amazon.AWSConfigs.AWSRegion

Field Static Field EndpointDefinitionKey System.String

Key for the EndpointDefinition property. Amazon.AWSConfigs.EndpointDefinition

Field Static Field LoggingKey System.String

Key for the Logging property. Amazon.AWSConfigs.Logging

Field Static Field LogMetricsKey System.String

Key for the LogMetrics property. Amazon.AWSConfigs.LogMetrics

Field Static Field ResponseLoggingKey System.String

Key for the ResponseLogging property. Amazon.AWSConfigs.ResponseLogging

Field Static Field UseSdkCacheKey System.String

Key for the UseSdkCache property. Amazon.AWSConfigs.UseSdkCache

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

Unity:
Supported Versions: 4.6 and above
Supported Platforms: Android, iOS, Standalone