Scalr\Service\Aws\S3\Handler\BucketHandler::deleteObject PHP Method

deleteObject() public method

The DELETE operation removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn't a null version, Amazon S3 does not remove any objects To remove a specific version, you must be the bucket owner and you must use the versionId subresource. Using this subresource permanently deletes the version. If the object deleted is a Delete Marker, Amazon S3 sets the response header, x-amz-delete-marker, to true. If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the x-amz-mfa request header in the DELETE versionId request. Requests that include x-amz-mfa must use HTTPS.
public deleteObject ( BucketData | string $bucketName, string $objectName, string $versionId = null, string $xAmfMfa = null ) : Scalr\Service\Aws\Client\ClientResponseInterface
$bucketName Scalr\Service\Aws\S3\DataType\BucketData | string A bucket name.
$objectName string A object name.
$versionId string optional To remove a specific version of the object it must be used.
$xAmfMfa string optional The value is the concatenation of the authentication device's serial number, a space, and the value displayed on your authentication device.
return Scalr\Service\Aws\Client\ClientResponseInterface Returns response on success or throws an exception
    public function deleteObject($bucketName, $objectName, $versionId = null, $xAmfMfa = null)
    {
        return $this->getS3()->object->delete($bucketName, $objectName, $versionId, $xAmfMfa);
    }