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
profileCredentialProfileThe profile to get AWSCredentials for.
profileSourceICredentialProfileSourceThe 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
profileCredentialProfileThe profile to get AWSCredentials for.
profileSourceICredentialProfileSourceThe profile source, for profiles that reference other profiles.
nonCallbackOnlyboolIf 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
optionsCredentialProfileOptionsThe options to get AWSCredentials for.
profileSourceICredentialProfileSourceThe 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
optionsCredentialProfileOptionsThe options to get AWSCredentials for.
profileSourceICredentialProfileSourceThe profile source, for options that reference other profiles.
nonCallbackOnlyboolIf 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
profileCredentialProfileThe profile to create credentials with.
profileSourceICredentialProfileSourceThe profile source, for profiles that reference other profiles.
credentialsAWSCredentialsThe 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
optionsCredentialProfileOptionsThe options to get AWSCredentials for.
profileSourceICredentialProfileSourceThe profile source, for profiles that reference other profiles.
credentialsAWSCredentialsThe credentials for the profile.
Returns
- bool
True if credentials can be created from the profile, false otherwise.