Class AWSCredentialsProfile
The persisted data for a set of AWS credentials. At a minimum this is access key and secret key data.
[Obsolete("This class is obsolete and will be removed in a future release. Please use Amazon.Runtime.CredentialManagement.CredentialProfile. Visit http://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-config-creds.html for further details.")]
public class AWSCredentialsProfile : ProfileSettingsBase
- Inheritance
-
AWSCredentialsProfile
- Inherited Members
Properties
Credentials
public BasicAWSCredentials Credentials { get; }
Property Value
Methods
CanCreateFrom(ObjectSettings)
Tests if an AWSCredentialsProfile instance could be instantiated from the persisted settings data.
public static bool CanCreateFrom(SettingsCollection.ObjectSettings os)
Parameters
os
SettingsCollection.ObjectSettingsThe persisted settings.
Returns
- bool
True if the settings are compatible with an AWSCredentialsProfile type.
CanCreateFrom(string)
Tests if an AWSCredentialsProfile instance could be instantiated from the persisted settings data.
public static bool CanCreateFrom(string profileName)
Parameters
profileName
stringThe name given to the persisted settings (previously verified as existing).
Returns
- bool
True if the settings are compatible with an AWSCredentialsProfile type.
LoadFrom(ObjectSettings)
Instantiates an AWSCredentialsProfile instance from the supplied settings collection.
public static AWSCredentialsProfile LoadFrom(SettingsCollection.ObjectSettings os)
Parameters
os
SettingsCollection.ObjectSettingsThe settings representing the stored profile.
Returns
- AWSCredentialsProfile
New credentials profile instance. An exception is thrown if the profile data is invalid.
LoadFrom(string)
Instantiates an AWSCredentialsProfile instance from the specified profile name.
public static AWSCredentialsProfile LoadFrom(string profileName)
Parameters
profileName
stringThe name of the profile holding the settings.
Returns
- AWSCredentialsProfile
New credentials profile instance. An exception is thrown if the profile data is invalid.
Persist()
Persists the profile data to the store file.
public override string Persist()
Returns
- string
The unique ID assigned to the settings.
Persist(string, string, string)
Creates or updates the profile data in the store file.
public static string Persist(string profileName, string accessKeyId, string secretKey)
Parameters
Returns
- string
The unique ID assigned to the settings.
Validate(string)
Validates the contents of the specified profile.
public static void Validate(string profileName)
Parameters
profileName
stringThe name of the AWS credentials profile to validate.
Exceptions
- InvalidDataException
Thrown if the profile settings fail to validate.