Class DefaultAwsConfiguration
Represents the default AWS configuration used for AWS authentication and credentials.
Inherited Members
Namespace: Innovt.Cloud.AWS.Configuration
Assembly: Innovt.Cloud.AWS.dll
Syntax
[CLSCompliant(false)]
public class DefaultAwsConfiguration : IAwsConfiguration, IConfiguration
Constructors
| Edit this page View SourceDefaultAwsConfiguration()
Initializes a new instance of the DefaultAwsConfiguration class.
Declaration
public DefaultAwsConfiguration()
DefaultAwsConfiguration(IConfiguration, string)
This Constructor will use the Autobind from GetSection.
Declaration
public DefaultAwsConfiguration(IConfiguration configuration, string sectionName = "AWS")
Parameters
Type | Name | Description |
---|---|---|
IConfiguration | configuration | IConfiguration from .Net Core |
string | sectionName | The default is AWS. |
DefaultAwsConfiguration(string, string?)
The default profile name
Declaration
public DefaultAwsConfiguration(string profileName, string? region = null)
Parameters
Type | Name | Description |
---|---|---|
string | profileName | |
string | region |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
DefaultAwsConfiguration(string, string, string, string, string)
Initializes a new instance of the DefaultAwsConfiguration class with provided credentials.
Declaration
public DefaultAwsConfiguration(string accessKey, string secretKey, string region, string accountNumber = null, string sessionToken = null)
Parameters
Type | Name | Description |
---|---|---|
string | accessKey | The AWS access key. |
string | secretKey | The AWS secret key. |
string | region | The AWS region. |
string | accountNumber | The AWS account number. |
string | sessionToken | The AWS session token (optional). |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
Properties
| Edit this page View SourceAccessKey
Gets or sets the AWS access key for authentication.
Declaration
public string AccessKey { get; set; }
Property Value
Type | Description |
---|---|
string |
AccountNumber
Gets or sets the AWS account number associated with the AWS credentials.
Declaration
public string AccountNumber { get; set; }
Property Value
Type | Description |
---|---|
string |
Profile
Gets or sets the AWS named profile to be used for AWS credentials. If set, other credentials will be ignored.
Declaration
public string Profile { get; set; }
Property Value
Type | Description |
---|---|
string |
Region
Gets or sets the AWS region for AWS service requests.
Declaration
public string Region { get; set; }
Property Value
Type | Description |
---|---|
string |
SecretKey
Gets or sets the AWS secret key for authentication.
Declaration
public string SecretKey { get; set; }
Property Value
Type | Description |
---|---|
string |
SessionToken
Gets or sets the AWS session token for temporary credentials.
Declaration
public string SessionToken { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceGetCredential()
Gets the AWS credentials based on the configured profile or provided access and secret keys.
Declaration
public AWSCredentials GetCredential()
Returns
Type | Description |
---|---|
AWSCredentials | The AWS credentials. |