com.amazonaws.services.securitytoken.model
Class Credentials

java.lang.Object
  extended by com.amazonaws.services.securitytoken.model.Credentials

public class Credentials
extends Object

AWS credentials for API authentication.


Constructor Summary
Credentials()
          Default constructor for a new Credentials object.
Credentials(String accessKeyId, String secretAccessKey, String sessionToken, Date expiration)
          Constructs a new Credentials object.
 
Method Summary
 boolean equals(Object obj)
           
 String getAccessKeyId()
          AccessKeyId ID that identifies the temporary credentials.
 Date getExpiration()
          The date on which these credentials expire.
 String getSecretAccessKey()
          The Secret Access Key to sign requests.
 String getSessionToken()
          The security token that users must pass to the service API to use the temporary credentials.
 int hashCode()
           
 void setAccessKeyId(String accessKeyId)
          AccessKeyId ID that identifies the temporary credentials.
 void setExpiration(Date expiration)
          The date on which these credentials expire.
 void setSecretAccessKey(String secretAccessKey)
          The Secret Access Key to sign requests.
 void setSessionToken(String sessionToken)
          The security token that users must pass to the service API to use the temporary credentials.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 Credentials withAccessKeyId(String accessKeyId)
          AccessKeyId ID that identifies the temporary credentials.
 Credentials withExpiration(Date expiration)
          The date on which these credentials expire.
 Credentials withSecretAccessKey(String secretAccessKey)
          The Secret Access Key to sign requests.
 Credentials withSessionToken(String sessionToken)
          The security token that users must pass to the service API to use the temporary credentials.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Credentials

public Credentials()
Default constructor for a new Credentials object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


Credentials

public Credentials(String accessKeyId,
                   String secretAccessKey,
                   String sessionToken,
                   Date expiration)
Constructs a new Credentials object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
accessKeyId - AccessKeyId ID that identifies the temporary credentials.
secretAccessKey - The Secret Access Key to sign requests.
sessionToken - The security token that users must pass to the service API to use the temporary credentials.
expiration - The date on which these credentials expire.
Method Detail

getAccessKeyId

public String getAccessKeyId()
AccessKeyId ID that identifies the temporary credentials.

Constraints:
Length: 16 - 32
Pattern: [\w]*

Returns:
AccessKeyId ID that identifies the temporary credentials.

setAccessKeyId

public void setAccessKeyId(String accessKeyId)
AccessKeyId ID that identifies the temporary credentials.

Constraints:
Length: 16 - 32
Pattern: [\w]*

Parameters:
accessKeyId - AccessKeyId ID that identifies the temporary credentials.

withAccessKeyId

public Credentials withAccessKeyId(String accessKeyId)
AccessKeyId ID that identifies the temporary credentials.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 16 - 32
Pattern: [\w]*

Parameters:
accessKeyId - AccessKeyId ID that identifies the temporary credentials.
Returns:
A reference to this updated object so that method calls can be chained together.

getSecretAccessKey

public String getSecretAccessKey()
The Secret Access Key to sign requests.

Returns:
The Secret Access Key to sign requests.

setSecretAccessKey

public void setSecretAccessKey(String secretAccessKey)
The Secret Access Key to sign requests.

Parameters:
secretAccessKey - The Secret Access Key to sign requests.

withSecretAccessKey

public Credentials withSecretAccessKey(String secretAccessKey)
The Secret Access Key to sign requests.

Returns a reference to this object so that method calls can be chained together.

Parameters:
secretAccessKey - The Secret Access Key to sign requests.
Returns:
A reference to this updated object so that method calls can be chained together.

getSessionToken

public String getSessionToken()
The security token that users must pass to the service API to use the temporary credentials.

Returns:
The security token that users must pass to the service API to use the temporary credentials.

setSessionToken

public void setSessionToken(String sessionToken)
The security token that users must pass to the service API to use the temporary credentials.

Parameters:
sessionToken - The security token that users must pass to the service API to use the temporary credentials.

withSessionToken

public Credentials withSessionToken(String sessionToken)
The security token that users must pass to the service API to use the temporary credentials.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sessionToken - The security token that users must pass to the service API to use the temporary credentials.
Returns:
A reference to this updated object so that method calls can be chained together.

getExpiration

public Date getExpiration()
The date on which these credentials expire.

Returns:
The date on which these credentials expire.

setExpiration

public void setExpiration(Date expiration)
The date on which these credentials expire.

Parameters:
expiration - The date on which these credentials expire.

withExpiration

public Credentials withExpiration(Date expiration)
The date on which these credentials expire.

Returns a reference to this object so that method calls can be chained together.

Parameters:
expiration - The date on which these credentials expire.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.