Package com.mongodb

Class AwsCredential

java.lang.Object
com.mongodb.AwsCredential

@Beta(CLIENT) public final class AwsCredential extends Object
A representation of Amazon Web Services credentials for API authentication.
Since:
4.4
See Also:
  • Constructor Details

    • AwsCredential

      public AwsCredential(String accessKeyId, String secretAccessKey, @Nullable String sessionToken)
      Construct a new instance.
      Parameters:
      accessKeyId - the non-null access key ID that identifies the temporary security credentials.
      secretAccessKey - the non-null secret access key that can be used to sign requests
      sessionToken - the session token, which may be null
  • Method Details

    • getAccessKeyId

      public String getAccessKeyId()
      Gets the access key ID that identifies the temporary security credentials.
      Returns:
      the accessKeyId, which may not be null
    • getSecretAccessKey

      public String getSecretAccessKey()
      Gets the secret access key that can be used to sign requests.
      Returns:
      the secretAccessKey, which may not be null
    • getSessionToken

      @Nullable public String getSessionToken()
      Gets the session token.
      Returns:
      the sessionToken, which may not be null