Scalr\Service\Aws\S3\DataType\BucketData::deleteObject PHP Метод

deleteObject() публичный Метод

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 ( string $objectName, string $versionId = null, string $xAmfMfa = null ) : ClientResponseInterface
$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.
Результат ClientResponseInterface Returns response on success or throws an exception
    public function deleteObject($objectName, $versionId = null, $xAmfMfa = null)
    {
        $this->throwExceptionIfNotInitialized();
        return $this->getS3()->object->delete($this->bucketName, $objectName, $versionId, $xAmfMfa);
    }