AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Immutable representation of AWS credentials.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.ImmutableCredentials

Namespace: Amazon.Runtime
Assembly: AWSSDK.Core.dll
Version: 3.x.y.z

Syntax

C#
public class ImmutableCredentials

The ImmutableCredentials type exposes the following members

Constructors

NameDescription
Public Method ImmutableCredentials(string, string, string)

Constructs an ImmutableCredentials object with supplied accessKey, secretKey.

Public Method ImmutableCredentials(string, string, string, string)

Constructs an ImmutableCredentials object with supplied accessKey, secretKey, and aws account id. When the account id is set and the service supports account id based endpoints, AWS will send the request using the account-based endpoint rather than the regional endpount. Account-based endpoints take the form https://accountId.ddb.region.amazonaws.com

Properties

NameTypeDescription
Public Property AccessKey System.String

Gets the AccessKey property for the current credentials.

Public Property AccountId System.String

Gets the AccountId property for the current credentials. The account id is your 12 digit account number with no hypens. For example: 123456789012. When the account id is set and the service supports account id based endpoints, AWS will send the request using the account-based endpoint rather than the regional endpount. Account-based endpoints take the form https://accountid.ddb.region.amazonaws.com

Public Property SecretKey System.String

Gets the SecretKey property for the current credentials.

Public Property Token System.String

Gets the Token property for the current credentials.

Public Property UseToken System.Boolean

Gets the UseToken property for the current credentials. Specifies if Token property is non-empty.

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.7.2 or higher.

NameDescription
Public Method Copy()

Returns a copy of the current credentials.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer