Table of Contents

Class DefaultAWSTokenProviderChain

Namespace
Amazon.Runtime
Assembly
AWSSDK.Core.dll

Combines the recommended IAWSTokenProvider into a AWSTokenProviderChain.

Configuration parameters for each IAWSTokenProvider are exposed here to simplify configuration. Example below demonstrates how to build a custom DefaultAWSTokenProviderChain in a AWSTokenProvider. NOTE: The below example requires .NET 4.5 or above.
var exampleServiceClientConfig = new ExampleServiceClientConfig
{
   AWSTokenProvider = new DefaultAWSTokenProviderChain
   {
      ProfileName = "my-sso-profile"
   }
}
public class DefaultAWSTokenProviderChain : IAWSTokenProvider
Inheritance
DefaultAWSTokenProviderChain
Implements
Inherited Members

Constructors

DefaultAWSTokenProviderChain()

public DefaultAWSTokenProviderChain()

Properties

ProfileName

Used to initialize ProfileTokenProvider.

public string ProfileName { get; set; }

Property Value

string

Methods

TryResolveTokenAsync(CancellationToken)

Attempts to load an AWSToken.

NOTE: In some extreme circumstances, providers may throw an exception.
public Task<TryResponse<AWSToken>> TryResolveTokenAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<TryResponse<AWSToken>>