Class RestoreObjectRequest

    • Constructor Detail

      • RestoreObjectRequest

        public RestoreObjectRequest​(String bucketName,
                                    String key)

        Constructs a new RestoreObjectRequest.

        Parameters:
        bucketName - The name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.
        key - The key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.
        See Also:
        RestoreObjectRequest(String, String, int)
      • RestoreObjectRequest

        public RestoreObjectRequest​(String bucketName,
                                    String key,
                                    int expirationInDays)

        Constructs a new RestoreObjectRequest.

        Parameters:
        bucketName - The name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.
        key - The key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.
        expirationInDays - The time, in days, between when an object is restored to the bucket and when it expires
        See Also:
        RestoreObjectRequest(String, String)
    • Method Detail

      • withBucketName

        public RestoreObjectRequest withBucketName​(String bucketName)
        Sets the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier, and returns a reference to this object(RestoreObjectRequest) for method chaining.
        See Also:
        setBucketName(String), getBucketName()
      • setBucketName

        public void setBucketName​(String bucketName)
        Sets the name of the bucket containing the reference to the object to restore which is now stored in Amazon Glacier.
        See Also:
        getBucketName(), withBucketName(String)
      • getKey

        public String getKey()
        Gets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.
        See Also:
        setKey(String), withKey(String)
      • setKey

        public void setKey​(String key)
        Sets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier.
        See Also:
        getKey(), withKey(String)
      • withKey

        public RestoreObjectRequest withKey​(String key)
        Sets the key, the name of the reference to the object to restore, which is now stored in Amazon Glacier. returns a reference to this object(RestoreObjectRequest) for method chaining.
        See Also:
        getKey(), setKey(String)
      • getVersionId

        public String getVersionId()
        Returns the id of the version to be restored.
      • setVersionId

        public void setVersionId​(String versionId)
        Sets the id of the version to be restored.
      • withVersionId

        public RestoreObjectRequest withVersionId​(String versionId)
        Sets the id of the version to be restored and returns a reference to this object for method chaining.
      • setExpirationInDays

        public void setExpirationInDays​(int expirationInDays)
        Sets the time, in days, between when an object is uploaded to the bucket and when it expires.
      • getExpirationInDays

        public int getExpirationInDays()
        Returns the time in days from an object's creation to its expiration.
      • withExpirationInDays

        public RestoreObjectRequest withExpirationInDays​(int expirationInDays)
        Sets the time, in days, between when an object is uploaded to the bucket and when it expires, and returns a reference to this object(RestoreObjectRequest) for method chaining.
      • isRequesterPays

        public boolean isRequesterPays()
        Returns true if the user has enabled Requester Pays option when conducting this operation from Requester Pays Bucket; else false.

        If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.

        Enabling Requester Pays disables the ability to have anonymous access to this bucket

        Returns:
        true if the user has enabled Requester Pays option for conducting this operation from Requester Pays Bucket.
      • setRequesterPays

        public void setRequesterPays​(boolean isRequesterPays)
        Used for conducting this operation from a Requester Pays Bucket. If set the requester is charged for requests from the bucket.

        If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.

        Enabling Requester Pays disables the ability to have anonymous access to this bucket.

        Parameters:
        isRequesterPays - Enable Requester Pays option for the operation.
      • withRequesterPays

        public RestoreObjectRequest withRequesterPays​(boolean isRequesterPays)
        Used for conducting this operation from a Requester Pays Bucket. If set the requester is charged for requests from the bucket. It returns this updated RestoreObjectRequest object so that additional method calls can be chained together.

        If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.

        Enabling Requester Pays disables the ability to have anonymous access to this bucket.

        Parameters:
        isRequesterPays - Enable Requester Pays option for the operation.
        Returns:
        The updated RestoreObjectRequest object.