versionId
request parameter to specify the ID of the object version/delete marker. In this way, the x-cos-version-id
response header will be returned, indicating the version ID deleted.versionId
is not specified:DELETE
operation will create the latest version of delete marker for this object, and the x-cos-version-id
response header will be returned to indicate the version ID of the delete marker created in this request.DELETE
operation will create a delete marker whose ID is null
as the latest version of the object, and all other versions whose ID is null
(if any) will be deleted.DELETE
operation has successfully created/deleted a delete marker, the x-cos-delete-marker: true
response header will be returned.DELETE /<ObjectKey> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth String
Parameter | Description | Type | Required |
versionId | ID of an object version to delete | string | No |
Parameter | Description | Type |
x-cos-version-id | ID of the object version/delete marker | string |
x-cos-delete-marker | If versionId is specified, the value of this parameter will be true , indicating that the deleted version of object corresponds to a delete marker.If versionId is not specified, and the specified object resides in a versioning-enabled bucket, the value of this parameter will be true , indicating that this request has created the latest version of delete marker for this object. | boolean |
DELETE /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 14 Aug 2019 11:59:40 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1565783980;1565791180&q-key-time=1565783980;1565791180&q-header-list=date;host&q-url-param-list=&q-signature=75ae614a90d55054f7dea2b5cdcfdeaa1f85****Connection: close
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Wed, 14 Aug 2019 11:59:40 GMTServer: tencent-cosx-cos-request-id: NWQ1M2Y3YWNfMzdiMDJhMDlfODA1Yl8xZThj****
DELETE /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 14 Aug 2019 12:00:21 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1565784021;1565791221&q-key-time=1565784021;1565791221&q-header-list=date;host&q-url-param-list=&q-signature=f5ee3ccd55378061f1890b9a2d3dd1af94f6****Connection: close
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Wed, 14 Aug 2019 12:00:21 GMTServer: tencent-cosx-cos-delete-marker: truex-cos-request-id: NWQ1M2Y3ZDVfN2RiNDBiMDlfMmMwNmVfMTc4****x-cos-version-id: MTg0NDUxNzgyODk2ODc1NjY0NzQ
DELETE /exampleobject?versionId=MTg0NDUxNzgyODk3MDgyMzI4NDY HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 14 Aug 2019 12:00:32 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1565784032;1565791232&q-key-time=1565784032;1565791232&q-header-list=date;host&q-url-param-list=versionid&q-signature=9553e1210ba22f0725e5ff7f9bb7c8760c58****Connection: close
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Wed, 14 Aug 2019 12:00:32 GMTServer: tencent-cosx-cos-request-id: NWQ1M2Y3ZTBfODhjMjJhMDlfMWNkOF8xZDZi****x-cos-version-id: MTg0NDUxNzgyODk3MDgyMzI4NDY
DELETE /exampleobject?versionId=MTg0NDUxNzgyODk2ODc1NjY0NzQ HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 14 Aug 2019 12:00:42 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1565784042;1565791242&q-key-time=1565784042;1565791242&q-header-list=date;host&q-url-param-list=versionid&q-signature=14e18786f25e762fb11560ea788d5e07c375****Connection: close
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Wed, 14 Aug 2019 12:00:42 GMTServer: tencent-cosx-cos-delete-marker: truex-cos-request-id: NWQ1M2Y3ZWFfNzljMDBiMDlfMjkyMDJfMWRjNjVm****x-cos-version-id: MTg0NDUxNzgyODk2ODc1NjY0NzQ
Apakah halaman ini membantu?