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.
Returns credentials that remain valid for at least minimumLifetime when the credential
provider can supply them, regenerating the current credentials if they would expire sooner. This lets callers
such as the RDS and DSQL auth-token generators ensure the generated token stays valid for its full lifetime.
If the regenerated credentials still expire within minimumLifetime (for example, the
requested lifetime exceeds the provider's maximum session duration), they are returned anyway and an
informational message is logged. Exceptions thrown while regenerating the credentials propagate to the caller.
Namespace: Amazon.Runtime
Assembly: AWSSDK.Core.dll
Version: 3.x.y.z
public ImmutableCredentials GetCredentials(
TimeSpan minimumLifetime
)
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.7.2 and newer