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.

The options that are available for creating AWSCredentials with the AWSCredentialsFactory. The type of AWSCredentials that are created depends on which Options are set. Below are the different types of credentials returned, along with the options that are used to obtain them. ([] denotes options that are not required) BasicAWSCredentials AccessKey SecretKey SessionAWSCredentials AccessKey SecretKey Token AssmeRoleAWSCredentials SourceProfile RoleArn [ExternalID] [MfaSerial] FederatedAWSCredentials EndpointName RoleArn [UserIdentity] SSO SsoAccountId SsoRegion SsoRoleName SsoStartUrl SsoSession (Not supported in .NET Framework 3.5)

Inheritance Hierarchy

System.Object
  Amazon.Runtime.CredentialManagement.CredentialProfileOptions

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

Syntax

C#
public class CredentialProfileOptions

The CredentialProfileOptions type exposes the following members

Constructors

NameDescription
Public Method CredentialProfileOptions()

Properties

NameTypeDescription
Public Property AccessKey System.String

The access key to be used in the AWSCredentials.

Public Property CredentialProcess System.String

Contains the executable information to be used by the process credential retriever to either fetch Basic or Session credentials

Public Property CredentialSource System.String

The source of credentials to be used to obtain AWSCredentials.

Public Property EndpointName System.String

The endpoint name to be used for federated AWSCredentials.

Public Property EndpointUrl System.String

The global endpoint to use for a profile. Service specific endpoints will always override this value.

Public Property ExternalID System.String

The external id to use in assume role AWSCredentials.

Public Property MfaSerial System.String

The serial number of the MFA to use in assume role AWSCredentials.

Public Property RoleArn System.String

The role ARN to use when creating assume role or federated AWSCredentials.

Public Property RoleSessionName System.String

An identifier for the assumed role session.

Public Property SecretKey System.String

The secret key to use when creating AWSCredentials.

Public Property Services System.String

The name of the section which contains the custom endpoints for a service or services. For example: [profile foo] services = bar [services bar] s3 = endpoint_url = https://custom-endpoint-s3:80 ec2 = endpoint_url = https://custome-endpoint_ec2:80 This will tell the SDK to look for custom endpoints in "bar" for the profile "foo. A single Services section can contain configurations for multiple services.

Public Property SourceProfile System.String

When this CredentialProfileOptions object references another CredentialProfile, the name of the referenced CredentialProfile.

Public Property SsoAccountId System.String

The AWS account ID that temporary AWS credentials will be resolved for using AWS SSO.

Public Property SsoRegion System.String

The AWS region where the SSO directory for Amazon.Runtime.CredentialManagement.CredentialProfileOptions.SsoStartUrl is hosted.

Public Property SsoRegistrationScopes System.String

The SSO scopes that are provided for authorization when using AWS SSO.

Public Property SsoRoleName System.String

The corresponding IAM role in the AWS account that temporary AWS credentials will be resolved for using AWS SSO.

Public Property SsoSession System.String

Name of the Sso Session section used to retrieve Amazon.Runtime.CredentialManagement.CredentialProfileOptions.SsoRegion and Amazon.Runtime.CredentialManagement.CredentialProfileOptions.SsoStartUrl.

Public Property SsoStartUrl System.String

The main URL for users to login to their SSO directory. Provided by the SSO service via the web console.

Public Property Token System.String

The session token to be used to create AWSCredentials.

Public Property UserIdentity System.String

The user identity to use when creating federated AWSCredentials. If not set, the user identity that the code is running under will be used.

Public Property WebIdentityTokenFile System.String

Absolute path to the file on disk containing an OIDC token.

Version Information

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

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5