Class AwsResponseMetadata

java.lang.Object
software.amazon.awssdk.awscore.AwsResponseMetadata
Direct Known Subclasses:
DefaultAwsResponseMetadata

@SdkProtectedApi public abstract class AwsResponseMetadata extends Object
Represents additional metadata included with a response from a service. Response metadata varies by service, but all services return an AWS request ID that can be used in the event a service call isn't working as expected and you need to work with AWS support to debug an issue.
  • Constructor Details

    • AwsResponseMetadata

      protected AwsResponseMetadata(Map<String,String> metadata)
      Creates a new ResponseMetadata object from a specified map of raw metadata information.
      Parameters:
      metadata - The raw metadata for the new ResponseMetadata object.
    • AwsResponseMetadata

      protected AwsResponseMetadata(AwsResponseMetadata responseMetadata)
  • Method Details

    • requestId

      public String requestId()
      Returns the AWS request ID contained in this response metadata object. AWS request IDs can be used in the event a service call isn't working as expected and you need to work with AWS support to debug an issue.

      Can be overriden by subclasses to provide service specific requestId

      Returns:
      The AWS request ID contained in this response metadata object.
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getValue

      protected final String getValue(String key)
      Get the value based on the key, returning UNKNOWN if the value is null.
      Parameters:
      key - the key of the value
      Returns:
      the value or UNKNOWN if not present.