com.amazonaws.services.securitytoken.model
Class Credentials

java.lang.Object
  extended by com.amazonaws.services.securitytoken.model.Credentials
All Implemented Interfaces:
java.io.Serializable

public class Credentials
extends java.lang.Object
implements java.io.Serializable

AWS credentials for API authentication.

See Also:
Serialized Form

Constructor Summary
Credentials()
          Default constructor for a new Credentials object.
Credentials(java.lang.String accessKeyId, java.lang.String secretAccessKey, java.lang.String sessionToken, java.util.Date expiration)
          Constructs a new Credentials object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAccessKeyId()
          The access key ID that identifies the temporary security credentials.
 java.util.Date getExpiration()
          The date on which the current credentials expire.
 java.lang.String getSecretAccessKey()
          The secret access key that can be used to sign requests.
 java.lang.String getSessionToken()
          The token that users must pass to the service API to use the temporary credentials.
 int hashCode()
           
 void setAccessKeyId(java.lang.String accessKeyId)
          The access key ID that identifies the temporary security credentials.
 void setExpiration(java.util.Date expiration)
          The date on which the current credentials expire.
 void setSecretAccessKey(java.lang.String secretAccessKey)
          The secret access key that can be used to sign requests.
 void setSessionToken(java.lang.String sessionToken)
          The token that users must pass to the service API to use the temporary credentials.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 Credentials withAccessKeyId(java.lang.String accessKeyId)
          The access key ID that identifies the temporary security credentials.
 Credentials withExpiration(java.util.Date expiration)
          The date on which the current credentials expire.
 Credentials withSecretAccessKey(java.lang.String secretAccessKey)
          The secret access key that can be used to sign requests.
 Credentials withSessionToken(java.lang.String sessionToken)
          The 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(java.lang.String accessKeyId,
                   java.lang.String secretAccessKey,
                   java.lang.String sessionToken,
                   java.util.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 - The access key ID that identifies the temporary security credentials.
secretAccessKey - The secret access key that can be used to sign requests.
sessionToken - The token that users must pass to the service API to use the temporary credentials.
expiration - The date on which the current credentials expire.
Method Detail

getAccessKeyId

public java.lang.String getAccessKeyId()
The access key ID that identifies the temporary security credentials.

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

Returns:
The access key ID that identifies the temporary security credentials.

setAccessKeyId

public void setAccessKeyId(java.lang.String accessKeyId)
The access key ID that identifies the temporary security credentials.

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

Parameters:
accessKeyId - The access key ID that identifies the temporary security credentials.

withAccessKeyId

public Credentials withAccessKeyId(java.lang.String accessKeyId)
The access key ID that identifies the temporary security credentials.

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

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

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

getSecretAccessKey

public java.lang.String getSecretAccessKey()
The secret access key that can be used to sign requests.

Returns:
The secret access key that can be used to sign requests.

setSecretAccessKey

public void setSecretAccessKey(java.lang.String secretAccessKey)
The secret access key that can be used to sign requests.

Parameters:
secretAccessKey - The secret access key that can be used to sign requests.

withSecretAccessKey

public Credentials withSecretAccessKey(java.lang.String secretAccessKey)
The secret access key that can be used to sign requests.

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

Parameters:
secretAccessKey - The secret access key that can be used to sign requests.
Returns:
A reference to this updated object so that method calls can be chained together.

getSessionToken

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

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

setSessionToken

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

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

withSessionToken

public Credentials withSessionToken(java.lang.String sessionToken)
The 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 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 java.util.Date getExpiration()
The date on which the current credentials expire.

Returns:
The date on which the current credentials expire.

setExpiration

public void setExpiration(java.util.Date expiration)
The date on which the current credentials expire.

Parameters:
expiration - The date on which the current credentials expire.

withExpiration

public Credentials withExpiration(java.util.Date expiration)
The date on which the current credentials expire.

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

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

toString

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


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