Table of Contents

Class StoredProfileCredentials

Namespace
Amazon.Runtime
Assembly
AWSSDK.Core.dll

Helper routiners for AWS and Federated credential profiles. Probes the profile type for the supplied profile name and returns the appropriate profile instance.

[Obsolete("This class is obsolete and will be removed in a future release. Please use Amazon.Runtime.CredentialManagement.NetSDKCredentialsFile or SharedCredentialsFile.  Visit http://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-config-creds.html for further details.")]
public abstract class StoredProfileCredentials
Inheritance
StoredProfileCredentials
Inherited Members

Constructors

StoredProfileCredentials()

protected StoredProfileCredentials()

Fields

DEFAULT_PROFILE_NAME

public const string DEFAULT_PROFILE_NAME = "default"

Field Value

string

DefaultSharedCredentialFilename

public const string DefaultSharedCredentialFilename = "credentials"

Field Value

string

DefaultSharedCredentialLocation

public const string DefaultSharedCredentialLocation = ".aws/credentials"

Field Value

string

SHARED_CREDENTIALS_FILE_ENVVAR

public const string SHARED_CREDENTIALS_FILE_ENVVAR = "AWS_SHARED_CREDENTIALS_FILE"

Field Value

string

Methods

GetProfile(string)

Determines the type of the requested profile and returns the appropriate profile instance.

public static AWSCredentials GetProfile(string profileName)

Parameters

profileName string

The name of the profile (AWS or federated) to be loaded.

Returns

AWSCredentials

Instantiated profile type.

GetProfile(string, string)

Determines the type of the requested profile and returns the appropriate profile instance.

public static AWSCredentials GetProfile(string profileName, string profileLocation)

Parameters

profileName string

The name of the profile (AWS or federated) to be loaded.

profileLocation string

The location of the shared credentials (.ini) file, for profiles that are not stored in the SDK credential store.

Returns

AWSCredentials

Instantiated profile type.

ResolveSharedCredentialFileLocation(string)

Probes for and returns the fully qualified name of the shared ini-format credentials file.

public static string ResolveSharedCredentialFileLocation(string profileLocation)

Parameters

profileLocation string

Contains the file or folder name of the credential file. If not specified, the routine will first check the application configuration file for a setting indicating the file location or filename. If the configuration file does not yield a credential file location then an environment variable is examined. Finally the routine will inspect the fallback default location beneath the user's home folder location.

Returns

string

The fully qualified name to the credential file that was located, or null if no credential file could be found.