Class PresignedRequest

java.lang.Object
software.amazon.awssdk.awscore.presigner.PresignedRequest
Direct Known Subclasses:
PresignedAbortMultipartUploadRequest, PresignedCompleteMultipartUploadRequest, PresignedCreateMultipartUploadRequest, PresignedDeleteObjectRequest, PresignedGetObjectRequest, PresignedPutObjectRequest, PresignedSynthesizeSpeechRequest, PresignedUploadPartRequest

public abstract class PresignedRequest extends Object
The base class for all presigned requests.

The isBrowserExecutable method can be used to determine whether this request can be executed by a web browser.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    The exact SERVICE time that the request will expire.
    int
     
    The entire SigV4 query-parameter signed request (minus the payload), that can be transmitted as-is to a service using any HTTP client that implement the SDK's HTTP client SPI.
    boolean
    Whether the url returned by the url method can be executed in a browser.
    Returns the subset of headers that were signed, and MUST be included in the presigned request to prevent the request from failing.
    Returns the payload that was signed, or Optional.empty() if there is no signed payload with this request.
    url()
    The URL that the presigned request will execute against.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • url

      public URL url()
      The URL that the presigned request will execute against. The isBrowserExecutable method can be used to determine whether this request will work in a browser.
    • expiration

      public Instant expiration()
      The exact SERVICE time that the request will expire. After this time, attempting to execute the request will fail.

      This may differ from the local clock, based on the skew between the local and AWS service clocks.

    • isBrowserExecutable

      public boolean isBrowserExecutable()
      Whether the url returned by the url method can be executed in a browser.

      This is true when the HTTP request method is GET and all data included in the signature will be sent by a standard web browser.

    • signedHeaders

      public Map<String,List<String>> signedHeaders()
      Returns the subset of headers that were signed, and MUST be included in the presigned request to prevent the request from failing.
    • signedPayload

      public Optional<SdkBytes> signedPayload()
      Returns the payload that was signed, or Optional.empty() if there is no signed payload with this request.
    • httpRequest

      public SdkHttpRequest httpRequest()
      The entire SigV4 query-parameter signed request (minus the payload), that can be transmitted as-is to a service using any HTTP client that implement the SDK's HTTP client SPI.

      This request includes signed AND unsigned headers.

    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object