Class Credentials

    • Constructor Detail

      • Credentials

        public Credentials()
        Default constructor for Credentials object. Callers should use the setter or fluent setter (with...) methods to initialize the 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 - 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

      • setAccessKeyId

        public void setAccessKeyId​(String accessKeyId)

        The access key ID that identifies the temporary security credentials.

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

        public String getAccessKeyId()

        The access key ID that identifies the temporary security credentials.

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

        public Credentials withAccessKeyId​(String accessKeyId)

        The access key ID that identifies the temporary security credentials.

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

        public void setSecretAccessKey​(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.
      • getSecretAccessKey

        public 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.
      • withSecretAccessKey

        public Credentials withSecretAccessKey​(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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setSessionToken

        public void setSessionToken​(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.
      • getSessionToken

        public 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.
      • withSessionToken

        public Credentials withSessionToken​(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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setExpiration

        public void setExpiration​(Date expiration)

        The date on which the current credentials expire.

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

        public Date getExpiration()

        The date on which the current credentials expire.

        Returns:
        The date on which the current credentials expire.
      • withExpiration

        public Credentials withExpiration​(Date expiration)

        The date on which the current credentials expire.

        Parameters:
        expiration - The date on which the current credentials expire.
        Returns:
        Returns a reference to this 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