Class DeleteObjectRequest

    • Constructor Detail

      • DeleteObjectRequest

        public DeleteObjectRequest​(String bucketName,
                                   String key)
        Constructs a new DeleteObjectRequest, specifying the object's bucket name and key.
        Parameters:
        bucketName - The name of the Amazon S3 bucket containing the object to delete.
        key - The key of the object to delete.
    • Method Detail

      • getBucketName

        public String getBucketName()
        Gets the name of the Amazon S3 bucket containing the object to delete.
        Returns:
        The name of the Amazon S3 bucket containing the object to delete.
        See Also:
        setBucketName(String)
      • setBucketName

        public void setBucketName​(String bucketName)
        Sets the name of the Amazon S3 bucket containing the object to delete.
        Parameters:
        bucketName - The name of the Amazon S3 bucket containing the object to delete.
        See Also:
        getBucketName()
      • withBucketName

        public DeleteObjectRequest withBucketName​(String bucketName)
        Sets the name of the Amazon S3 bucket containing the object to delete and returns this object, enabling additional method calls to be chained together.
        Parameters:
        bucketName - The name of the Amazon S3 bucket containing the object to delete.
        Returns:
        The updated DeleteObjectRequest object, enabling additional method calls to be chained together.
      • getKey

        public String getKey()
        Gets the key of the object to delete.
        Returns:
        The key of the object to delete.
        See Also:
        setKey(String)
      • setKey

        public void setKey​(String key)
        Sets the key of the object to delete.
        Parameters:
        key - The key of the object to delete.
        See Also:
        getKey()
      • withKey

        public DeleteObjectRequest withKey​(String key)
        Sets the key of the object to delete and returns this object, enabling additional method calls to be chained together.
        Parameters:
        key - The key of the object to delete.
        Returns:
        The updated DeleteObjectRequest object, enabling additional method calls to chained together.
      • 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 DeleteObjectRequest 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 DeleteObjectRequest 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 DeleteObjectRequest object.