public BasicSessionCredentials(String accessKeyId, String accessKeySecret, String sessionToken,long roleSessionDurationSeconds) {if (accessKeyId == null) {throw new IllegalArgumentException("Access key ID cannot be null.");}if (accessKeySecret == null) {throw new IllegalArgumentException("Access key secret cannot be null.");}this.accessKeyId = accessKeyId;this.accessKeySecret = accessKeySecret;this.sessionToken = sessionToken;this.roleSessionDurationSeconds = roleSessionDurationSeconds;this.sessionStartedTimeInMilliSeconds = System.currentTimeMillis();}

public BasicSessionCredentials ( String accessKeyId , String accessKeySecret , String sessionToken , long roleSessionDurationSeconds ) { if ( accessKeyId == null ) { throw new IllegalArgumentException ( "Access key ID cannot be null." ) ; } if ( accessKeySecret == null ) { throw new IllegalArgumentException ( "Access key secret cannot be null." ) ; } this . accessKeyId = accessKeyId ; this . accessKeySecret = accessKeySecret ; this . sessionToken = sessionToken ; this . roleSessionDurationSeconds = roleSessionDurationSeconds ; this . sessionStartedTimeInMilliSeconds = System . currentTimeMillis ( ) ; }
public BasicSessionCredentials(string accessKeyId, string accessKeySecret,string sessionToken, long roleSessionDurationSeconds = 0){if (accessKeyId == null){throw new ArgumentOutOfRangeException("Access key ID cannot be null.");}if (accessKeySecret == null){throw new ArgumentOutOfRangeException("Access key secret cannot be null.");}this.accessKeyId = accessKeyId;this.accessKeySecret = accessKeySecret;this.sessionToken = sessionToken;this.roleSessionDurationSeconds = roleSessionDurationSeconds;sessionStartedTimeInMilliSeconds = DateTime.UtcNow.currentTimeMillis();}
