AWS SDK Version 2 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.

.NET Framework 4.5
 
Configuration options that apply to the entire SDK.

Inheritance Hierarchy

System.Object
  Amazon.AWSConfigs

Namespace: Amazon
Assembly: AWSSDK.dll
Version: 0.0.3.0

Syntax

C#
public static class AWSConfigs : Object

The AWSConfigs type exposes the following members

Properties

  Name Description
Public Property Static Property AWSProfileName 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.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="development"/>
    </appSettings>
</configuration>
            

Public Property Static Property AWSProfilesLocation 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.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfilesLocation" value="c:\config"/>
    </appSettings>
</configuration>
            

Public Property Static Property AWSRegion 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:
<configSections>
  <section name="aws" type="Amazon.AWSSection, AWSSDK"/>
</configSections>
<aws region="us-west-2" />
            
Public Property Static Property DynamoDBConfig Configuration for the DynamoDB section of AWS configuration. Changes to some settings may not take effect until a new client or context is constructed. Example section:
<configSections>
  <section name="aws" type="Amazon.AWSSection, AWSSDK"/>
</configSections>
<aws>
  <dynamoDB>
    <dynamoDBContext tableNamePrefix="Prod-">
            
      <tableAliases>
        <alias fromTable="FakeTable" toTable="People" />
        <alias fromTable="Persons" toTable="People" />
      </tableAliases>
            
      <mappings>
        <map type="Sample.Tests.Author, SampleDLL" targetTable="People" />
        <map type="Sample.Tests.Editor, SampleDLL" targetTable="People">
          <property name="FullName" attribute="Name" />
          <property name="EmployeeId" attribute="Id" />
          <property name="ComplexData" converter="Sample.Tests.ComplexDataConverter, SampleDLL" />
          <property name="Version" version="true" />
          <property name="Password" ignore="true" />
        </map>
      </mappings>
            
    </dynamoDBContext>
  </dynamoDB>
</aws>
            
Public Property Static Property DynamoDBContextTableNamePrefix Configures the default TableNamePrefix that the DynamoDBContext will use if not manually configured. Changes to this setting will only take effect in newly-constructed instances of DynamoDBContextConfig and DynamoDBContext. The setting can be configured through App.config, for example:
<appSettings>
  <add key="AWS.DynamoDBContext.TableNamePrefix" value="Test-"/>
</appSettings>
            
Public Property Static Property EC2Config Configuration for the EC2 section of AWS configuration. Changes to some settings may not take effect until a new client is constructed. Example section:
<configSections>
  <section name="aws" type="Amazon.AWSSection, AWSSDK"/>
</configSections>
<aws>
  <ec2 useSignatureVersion4="true" />
</aws>
            
Public Property Static Property EC2UseSignatureVersion4 Configures if the EC2 client should use Signature Version 4 signing with requests. By default, this setting is false, though Signature Version 4 may be used by default in some cases or with some regions. When the setting is true, Signature Version 4 will be used for all requests. Changes to this setting will only take effect in newly-constructed clients. The setting can be configured through App.config, for example:
<appSettings>
  <add key="AWS.EC2.UseSignatureVersion4" value="true"/>
</appSettings>
            
Public Property Static Property EndpointDefinition Configures if the SDK should use a custom configuration file that defines the regions and endpoints.
<configSections>
  <section name="aws" type="Amazon.AWSSection, AWSSDK"/>
</configSections>
<aws endpointDefinition="c:\config\endpoints.xml" />
            
Public Property Static Property Logging 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:
<appSettings>
  <add key="AWSLogging" value="log4net"/>
</appSettings>
            
Public Property Static Property 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:
<configSections>
  <section name="aws" type="Amazon.AWSSection, AWSSDK"/>
</configSections>
<aws>
  <logging logTo="Log4Net, SystemDiagnostics" logResponses="Always" logMetrics="true" />
</aws>
            
Public Property Static Property LogMetrics 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:
<appSettings>
  <add key="AWSLogMetrics" value="true"/>
</appSettings>
            
Public Property Static Property 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:
<configSections>
  <section name="aws" type="Amazon.AWSSection, AWSSDK"/>
</configSections>
<aws>
  <proxy host="localhost" port="8888" username="1" password="1" />
</aws>
            
Public Property Static Property RegionEndpoint Configuration for the region endpoint section of AWS configuration. Changes may not take effect until a new client is constructed. Example section:
<configSections>
  <section name="aws" type="Amazon.AWSSection, AWSSDK"/>
</configSections>
<aws region="us-west-2" />
            
Public Property Static Property ResponseLogging 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:
<appSettings>
  <add key="AWSResponseLogging" value="OnError"/>
</appSettings>
            
Public Property Static Property S3Config Configuration for the S3 section of AWS configuration. Changes to some settings may not take effect until a new client is constructed. Example section:
<configSections>
  <section name="aws" type="Amazon.AWSSection, AWSSDK"/>
</configSections>
<aws>
  <s3 useSignatureVersion4="true" />
</aws>
            
Public Property Static Property S3UseSignatureVersion4 Configures if the S3 client should use Signature Version 4 signing with requests. By default, this setting is false, though Signature Version 4 may be used by default in some cases or with some regions. When the setting is true, Signature Version 4 will be used for all requests. Changes to this setting will only take effect in newly-constructed clients. The setting can be configured through App.config, for example:
<appSettings>
  <add key="AWS.S3.UseSignatureVersion4" value="true"/>
</appSettings>
            

Methods

  Name Description
Public Method Static Method AddTraceListener(string, TraceListener) Add a listener for SDK logging.
Public Method Static Method RemoveTraceListener(string, string) Remove a trace listener from SDK logging.

Fields

  Name Description
Field Static Field AWSProfileNameKey Key for the AWSProfileName property. Amazon.AWSConfigs.AWSProfileName
Field Static Field AWSProfilesLocationKey Key for the AWSProfilesLocation property. Amazon.AWSConfigs.LogMetrics
Field Static Field AWSRegionKey Key for the AWSRegion property. Amazon.AWSConfigs.AWSRegion
Field Static Field DynamoDBContextTableNamePrefixKey Key for the DynamoDBContextTableNamePrefix property. Amazon.AWSConfigs.DynamoDBContextTableNamePrefix
Field Static Field EC2UseSignatureVersion4Key Key for the EC2UseSignatureVersion4 property. Amazon.AWSConfigs.EC2UseSignatureVersion4
Field Static Field EndpointDefinitionKey Key for the EndpointDefinition property. Amazon.AWSConfigs.LogMetrics
Field Static Field LoggingKey Key for the Logging property. Amazon.AWSConfigs.Logging
Field Static Field LogMetricsKey Key for the LogMetrics property. Amazon.AWSConfigs.LogMetrics
Field Static Field ResponseLoggingKey Key for the ResponseLogging property. Amazon.AWSConfigs.ResponseLogging
Field Static Field S3UseSignatureVersion4Key Key for the S3UseSignatureVersion4 property. Amazon.AWSConfigs.S3UseSignatureVersion4

Version Information

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

.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8

.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8