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
CredentialProfileThe profile to get AWSCredentials for.
profileSource
ICredentialProfileSourceThe 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
CredentialProfileThe profile to get AWSCredentials for.
profileSource
ICredentialProfileSourceThe profile source, for profiles that reference other profiles.
nonCallbackOnly
boolIf 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
CredentialProfileOptionsThe options to get AWSCredentials for.
profileSource
ICredentialProfileSourceThe 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
CredentialProfileOptionsThe options to get AWSCredentials for.
profileSource
ICredentialProfileSourceThe profile source, for options that reference other profiles.
nonCallbackOnly
boolIf 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
CredentialProfileThe profile to create credentials with.
profileSource
ICredentialProfileSourceThe profile source, for profiles that reference other profiles.
credentials
AWSCredentialsThe 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
CredentialProfileOptionsThe options to get AWSCredentials for.
profileSource
ICredentialProfileSourceThe profile source, for profiles that reference other profiles.
credentials
AWSCredentialsThe credentials for the profile.
Returns
- bool
True if credentials can be created from the profile, false otherwise.