Table of Contents

Class InstanceProfileAWSCredentials

Namespace
Amazon.Runtime
Assembly
AWSSDK.Core.dll

Credentials that are retrieved from the Instance Profile service on an EC2 instance

public class InstanceProfileAWSCredentials : URIBasedRefreshingCredentialHelper, IDisposable
Inheritance
InstanceProfileAWSCredentials
Implements
Inherited Members

Remarks

This is meant to be used when building a AmazonServiceClient, as opposed to DefaultInstanceProfileAWSCredentials, which is part of the FallbackCredentialsFactory chain.

Constructors

InstanceProfileAWSCredentials()

Constructs a InstanceProfileAWSCredentials object for the first found role

public InstanceProfileAWSCredentials()

InstanceProfileAWSCredentials(IWebProxy)

Constructs a InstanceProfileAWSCredentials object for the first found role

public InstanceProfileAWSCredentials(IWebProxy proxy)

Parameters

proxy IWebProxy

InstanceProfileAWSCredentials(string)

Constructs a InstanceProfileAWSCredentials object for specific role

public InstanceProfileAWSCredentials(string role)

Parameters

role string

Role to use

InstanceProfileAWSCredentials(string, IWebProxy)

Constructs a InstanceProfileAWSCredentials object for specific role

public InstanceProfileAWSCredentials(string role, IWebProxy proxy)

Parameters

role string

Role to use

proxy IWebProxy

Properties

Role

Role for which the credentials are retrieved

public string Role { get; set; }

Property Value

string

Methods

GenerateNewCredentials()

protected override RefreshingAWSCredentials.CredentialsRefreshState GenerateNewCredentials()

Returns

RefreshingAWSCredentials.CredentialsRefreshState

GetAvailableRoles()

Retrieves a list of all roles available through current InstanceProfile service

public static IEnumerable<string> GetAvailableRoles()

Returns

IEnumerable<string>

GetAvailableRoles(IWebProxy)

Retrieves a list of all roles available through current InstanceProfile service

public static IEnumerable<string> GetAvailableRoles(IWebProxy proxy)

Parameters

proxy IWebProxy

Returns

IEnumerable<string>