Class AssumeRoleAwsConfiguration
Represents the configuration for assuming a role in AWS.
Inherited Members
Namespace: Innovt.Cloud.AWS.Configuration
Assembly: Innovt.Cloud.AWS.dll
Syntax
[CLSCompliant(false)]
public class AssumeRoleAwsConfiguration : IAssumeRoleAwsConfiguration, IAwsConfiguration, IConfiguration
Constructors
| Edit this page View SourceAssumeRoleAwsConfiguration(IAwsConfiguration, string, string, string)
Initializes a new instance of the AssumeRoleAwsConfiguration class.
Declaration
public AssumeRoleAwsConfiguration(IAwsConfiguration configuration, string roleArn, string roleSessionName = null, string roleExternalId = null)
Parameters
Type | Name | Description |
---|---|---|
IAwsConfiguration | configuration | The AWS configuration. |
string | roleArn | The Amazon Resource Name (ARN) of the role to assume. |
string | roleSessionName | The name to use for the assumed role session. |
string | roleExternalId | An external ID to use when assuming the role. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
Properties
| Edit this page View SourceAccessKey
Gets or sets the AWS access key.
Declaration
public string AccessKey { get; set; }
Property Value
Type | Description |
---|---|
string |
AccountNumber
Gets or sets the AWS account number.
Declaration
public string AccountNumber { get; set; }
Property Value
Type | Description |
---|---|
string |
ExternalId
Gets or sets the external ID to use when assuming the role.
Declaration
public string ExternalId { get; set; }
Property Value
Type | Description |
---|---|
string |
Profile
Gets or sets the AWS profile.
Declaration
public string Profile { get; set; }
Property Value
Type | Description |
---|---|
string |
Region
Gets or sets the AWS region.
Declaration
public string Region { get; set; }
Property Value
Type | Description |
---|---|
string |
RoleArn
Gets or sets the Amazon Resource Name (ARN) of the role to assume.
Declaration
public string RoleArn { get; set; }
Property Value
Type | Description |
---|---|
string |
RoleSessionName
Gets or sets the name to use for the assumed role session.
Declaration
public string RoleSessionName { get; set; }
Property Value
Type | Description |
---|---|
string |
SecretKey
Gets or sets the AWS secret key.
Declaration
public string SecretKey { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceGetCredential()
Gets the AWS credentials for assuming the specified role.
Declaration
public AWSCredentials GetCredential()
Returns
Type | Description |
---|---|
AWSCredentials | The AWS credentials for assuming the role. |
Exceptions
Type | Condition |
---|---|
ConfigurationException | Thrown when the source credentials are invalid. |