Table of Contents

Class AWSCredentialsFactory

Namespace
Amazon.Runtime.CredentialManagement
Assembly
AWSSDK.Core.dll

Factory to construct different types of AWSCredentials based on a profile.

public static class AWSCredentialsFactory
Inheritance
AWSCredentialsFactory
Inherited Members

Methods

GetAWSCredentials(CredentialProfile, ICredentialProfileSource)

Gets the AWSCredentials for this profile if CanCreateAWSCredentials is true and AWSCredentials can be created. Throws an exception otherwise.

See CredentialProfileOptions for a list of AWSCredentials returned by this method.

public static AWSCredentials GetAWSCredentials(CredentialProfile profile, ICredentialProfileSource profileSource)

Parameters

profile CredentialProfile

The profile to get AWSCredentials for.

profileSource ICredentialProfileSource

The profile source, for profiles that reference other profiles.

Returns

AWSCredentials

AWSCredentials for this profile.

GetAWSCredentials(CredentialProfile, ICredentialProfileSource, bool)

Gets the AWSCredentials for this profile if CanCreateAWSCredentials is true and AWSCredentials can be created. Throws an exception otherwise.

See CredentialProfileOptions for a list of AWSCredentials returned by this method.

public static AWSCredentials GetAWSCredentials(CredentialProfile profile, ICredentialProfileSource profileSource, bool nonCallbackOnly)

Parameters

profile CredentialProfile

The profile to get AWSCredentials for.

profileSource ICredentialProfileSource

The profile source, for profiles that reference other profiles.

nonCallbackOnly bool

If true, throw a descriptive exception for any credentials that would not operate as-is. In other words, any credentials that require programmatic callbacks at runtime.

Returns

AWSCredentials

AWSCredentials for this profile.

GetAWSCredentials(CredentialProfileOptions, ICredentialProfileSource)

Gets the AWSCredentials for this profile if CanCreateAWSCredentials is true and AWSCredentials can be created. Throws an exception otherwise.

See CredentialProfileOptions for a list of AWSCredentials returned by this method.

public static AWSCredentials GetAWSCredentials(CredentialProfileOptions options, ICredentialProfileSource profileSource)

Parameters

options CredentialProfileOptions

The options to get AWSCredentials for.

profileSource ICredentialProfileSource

The profile source, for options that reference other profiles.

Returns

AWSCredentials

AWSCredentials for the options given.

GetAWSCredentials(CredentialProfileOptions, ICredentialProfileSource, bool)

Gets the AWSCredentials for this profile if CanCreateAWSCredentials is true and AWSCredentials can be created. Throws an exception otherwise.

See CredentialProfileOptions for a list of AWSCredentials returned by this method.

public static AWSCredentials GetAWSCredentials(CredentialProfileOptions options, ICredentialProfileSource profileSource, bool nonCallbackOnly)

Parameters

options CredentialProfileOptions

The options to get AWSCredentials for.

profileSource ICredentialProfileSource

The profile source, for options that reference other profiles.

nonCallbackOnly bool

If true, throw a descriptive exception for any credentials that would not operate as-is. In other words, any credentials that require programmatic callbacks at runtime.

Returns

AWSCredentials

AWSCredentials for the options given.

TryGetAWSCredentials(CredentialProfile, ICredentialProfileSource, out AWSCredentials)

Return the credentials for the profile if valid credentials can created.

public static bool TryGetAWSCredentials(CredentialProfile profile, ICredentialProfileSource profileSource, out AWSCredentials credentials)

Parameters

profile CredentialProfile

The profile to create credentials with.

profileSource ICredentialProfileSource

The profile source, for profiles that reference other profiles.

credentials AWSCredentials

The credentials for the profile.

Returns

bool

True if credentials can be created from the profile, false otherwise.

TryGetAWSCredentials(CredentialProfileOptions, ICredentialProfileSource, out AWSCredentials)

Return the credentials for the profile if valid credentials can created.

public static bool TryGetAWSCredentials(CredentialProfileOptions options, ICredentialProfileSource profileSource, out AWSCredentials credentials)

Parameters

options CredentialProfileOptions

The options to get AWSCredentials for.

profileSource ICredentialProfileSource

The profile source, for profiles that reference other profiles.

credentials AWSCredentials

The credentials for the profile.

Returns

bool

True if credentials can be created from the profile, false otherwise.