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.

Retrieves a set of temporary credentials for the specified role, valid for the specified timespan. If the SAML authentication data yield more than one role, a valid role name must be specified.

Namespace: Amazon.SecurityToken.SAML
Assembly: AWSSDK.SecurityToken.dll
Version: 3.x.y.z


public SAMLImmutableCredentials GetRoleCredentials(
         IAmazonSecurityTokenService stsClient,
         String principalAndRoleArns,
         TimeSpan duration
Type: Amazon.SecurityToken.IAmazonSecurityTokenService

The STS client to use when making the AssumeRoleWithSAML request.

Type: System.String

The arns of the principal and role as returned in the SAML assertion.

Type: System.TimeSpan

The valid timespan for the credentials.

Return Value
Temporary session credentials for the specified or default role for the user.

Version Information

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