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.

Class to abstract the combined use of NetSDKCredentialsFile and SharedCredentialsFile where possible.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.CredentialManagement.CredentialProfileStoreChain

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

Syntax

C#
public class CredentialProfileStoreChain
         ICredentialProfileSource

The CredentialProfileStoreChain type exposes the following members

Constructors

NameDescription
Public Method CredentialProfileStoreChain()

Construct a CredentialProfileChain.

Public Method CredentialProfileStoreChain(string)

Construct a CredentialProfileChain.

Properties

NameTypeDescription
Public Property ProfilesLocation System.String

The location of the shared credentials file, or null to use the default location.

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 ListProfiles()

Get a list of available Amazon.Runtime.CredentialManagement.CredentialProfile objects.

If ProfilesLocation is non-null and non-empty include profiles in the shared credentials file at the disk path in the ProfilesLocation property.

If ProfilesLocation is null or empty and the platform supports the .NET SDK credentials file include profiles from the SDK credentials file and from the shared credentials file in the default location.

If ProfilesLocation is null or empty and the platform doesn't support the .NET SDK credentials file include profiles from the shared credentials file in the default location.

Public Method RegisterProfile(CredentialProfile)

Register a Amazon.Runtime.CredentialManagement.CredentialProfile

If ProfilesLocation is non-null and non-empty register the profile in the shared credentials file at the disk path in the ProfilesLocation property.

If ProfilesLocation is null or empty and the platform supports the .NET SDK credentials file register the profile in the SDK credentials file.

If ProfilesLocation is null or empty and the platform doesn't support the .NET SDK credentials file register the profile in the shared credentials file in the default location.

Public Method TryGetAWSCredentials(string, out AWSCredentials)

Try to get Amazon.Runtime.AWSCredentials from a profile.

If ProfilesLocation is non-null and non-empty search the shared credentials file at the disk path in the ProfilesLocation property.

If ProfilesLocation is null or empty and the platform supports the .NET SDK credentials file search the SDK credentials file. If the profile is not found search the shared credentials file in the default location.

If ProfilesLocation is null or empty and the platform doesn't support the .NET SDK credentials file search the shared credentials file in the default location.

Public Method TryGetProfile(string, out CredentialProfile)

Try to get a Amazon.Runtime.CredentialManagement.CredentialProfile

If ProfilesLocation is non-null and non-empty search the shared credentials file at the disk path in the ProfilesLocation property.

If ProfilesLocation is null or empty and the platform supports the .NET SDK credentials file search the SDK credentials file. If the profile is not found search the shared credentials file in the default location.

If ProfilesLocation is null or empty and the platform doesn't support the .NET SDK credentials file search the shared credentials file in the default location.

Public Method UnregisterProfile(string)

Unregister a Amazon.Runtime.CredentialManagement.CredentialProfile

If ProfilesLocation is non-null and non-empty unregister the profile from the shared credentials file at the disk path in the ProfilesLocation property.

If ProfilesLocation is null or empty and the platform supports the .NET SDK credentials file search the SDK credentials file. If the profile is found there unregister it. If the profile was not found search the shared credentials file in the default location. If the profile is found in the shared credentials file in the default location unregister it.

If ProfilesLocation is null or empty and the platform doesn't support the .NET SDK credentials file search the shared credentials file in the default location. If the profile is found in the shared credentials file in the default location unregister it.

Version Information

.NET Standard:
Supported in: 1.3

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