AWS SDK Version 3 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.

This class allows profiles supporting AWS credentials and SAML-based authentication to be registered with the SDK so that they can later be reference by a profile name. The credential profiles will be available for use in the AWS Toolkit for Visual Studio and the AWS Tools for Windows PowerShell.

The credentials are stored under the current users AppData folder encrypted using Windows Data Protection API.

To reference a profile from an application's App.config or Web.config use the AWSProfileName setting.



    
        
    

            

Inheritance Hierarchy

System.Object
  Amazon.Util.ProfileManager

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

Syntax

C#
public static class ProfileManager

The ProfileManager type exposes the following members

Properties

NameTypeDescription
Public Property Static Property IsAvailable System.Boolean

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method Static Method CopyProfileSettings(string, string)

Copies the contents of the source profile to the destination. If the destination profile does not exist a new profile is created. Note that if the destination profile exists, all keys it contains are removed and replaced with keys from the source profile.

Public Method Static Method CopyProfileSettings(SettingsCollection.ObjectSettings, string)

Copies the contents of the source profile to the destination. If the destination profile does not exist a new profile is created. Note that if the destination profile exists, all keys it contains are removed and replaced with keys from the source profile.

Public Method Static Method GetAWSCredentials(string)

Gets the AWS credentials from a profile in the SDK account store.

Public Method Static Method GetProfile(string)

Returns the profile with the specified name, if it has been registered in the SDK store.

Public Method Static Method GetProfile(string)

Returns the persisted data in the SDK store as a profile of the specified type T.

Public Method Static Method GetSAMLEndpoint(string)

Loads the settings defining a SAML endpoint.

Public Method Static Method IsProfileKnown(string)

Checks if a given profile is known in the SDK credential store.

Public Method Static Method ListProfileNames()

Lists all profile names registered with the SDK account store.

Public Method Static Method ListProfiles()

Loads and returns all available credential profiles registered in the store.

Public Method Static Method RegisterProfile(string, string, string)

Registers an AWS credentials profile that can later be referenced by the profileName. This profile will only be visible for the current user.

Public Method Static Method RegisterSAMLEndpoint(string, Uri, string)

Registers an endpoint to be used in conjunction with SAML role profiles. The role profiles reference the endpoint settings to obtain the actual endpoint and any customization settings needed to perform authentication.

Public Method Static Method RegisterSAMLRoleProfile(string, string, string, string)

Registers a role-based profile to be used with SAML authentication. The profile contains details of the role to be assumed when AWS credentials are requested based on the role and a reference to a SAML endpoint profile containing details of the endpoint to be called to authenticate the user.

If user identity information is not supplied then the identity of the logged-in user will be used when authenticaton is performed against the endpoint referenced in the SAML endpoint profile. If identity is provided, no password information is stored in the role profile and the user must supply the password for the identity prior to authentication with the endpoint.

Public Method Static Method RegisterSAMLRoleProfile(string, string, string, string, string)

Registers a role-based profile to be used with SAML authentication. The profile contains details of the role to be assumed when AWS credentials are requested based on the role and a reference to a SAML endpoint profile containing details of the endpoint to be called to authenticate the user.

If user identity information is not supplied then the identity of the logged-in user will be used when authenticaton is performed against the endpoint referenced in the SAML endpoint profile. If identity is provided, no password information is stored in the role profile and the user must supply the password for the identity prior to authentication with the endpoint.

Public Method Static Method TryGetAWSCredentials(string, out AWSCredentials)

Tries to get the AWS credentials from a profile in the SDK account store.

Public Method Static Method TryGetProfile(string, out T)

Tries to load the specified profile data corresponding to profile type T from a named profile in the SDK account store.

Public Method Static Method TryGetSAMLEndpoint(string, out SAMLEndpointSettings)

Attempts to load the settings defining a SAML endpoint.

Public Method Static Method UnregisterProfile(string)

Deletes the settings for an AWS credentials or SAML role profile from the SDK account store.

Fields

NameTypeDescription
Field Static Field AWSCredentialsProfileType System.String
Field Static Field SAMLRoleProfileType System.String

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5