History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
["name/cos:DeleteObject","name/cos:DeleteMultipleObjects"]. In non-anonymous scenarios, each deleted object will be checked individually to see if the current account has the cos:DeleteObject permission. View all actions.POST /?delete HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateContent-Type: application/xmlContent-Length: Content LengthContent-MD5: MD5Authorization: Auth String[Request Body]
examplebucket-1250000000 (see Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions), and <Region> is a COS region (see Regions and Access Endpoints).<Delete><Quiet>boolean</Quiet><Object><Key>string</Key></Object><Object><Key>string</Key><VersionId>string</VersionId></Object></Delete>
Node Name (Keyword) | Parent Node | Description | Type | Required |
Delete | None | Stores information about the DELETE Multiple Objects request. | Container | Yes |
Delete:Node Name (Keyword) | Parent Node | Description | Type | Required |
Quiet | Delete | Whether to use the Quiet mode for the response true: yes (returns only information about objects that failed to delete and the error messages) false (default): no (uses the Verbose mode instead, returning the deletion results of all objects)Note: When the specified key is empty or does not exist, COS itself will not return an error message. | boolean | Yes |
Object | Delete | Information about a single object to delete | Container | Yes |
Object:Node Name (Keyword) | Parent Node | Description | Type | Required |
Key | Delete.Object | Key of the object to delete (The key does not need to start with a /) | string | Yes |
VersionId | Delete.Object | Version ID of the object to delete (if versioning is enabled). If versioning is not enabled, or you want to create a delete marker with versioning enabled, you don’t need to specify this node. | string | Yes |
<DeleteResult><Deleted><Key>string</Key><DeleteMarker>boolean</DeleteMarker><DeleteMarkerVersionId>string</DeleteMarkerVersionId></Deleted><Deleted><Key>string</Key><VersionId>string</VersionId></Deleted><Deleted><Key>string</Key><DeleteMarker>boolean</DeleteMarker><DeleteMarkerVersionId>string</DeleteMarkerVersionId><VersionId>string</VersionId></Deleted><Error><Key>string</Key><VersionId>string</VersionId><Code>string</Code><Message>string</Message></Error></DeleteResult>
Node Name (Keyword) | Parent Node | Description | Type |
DeleteResult | None | Stores the results of DELETE Multiple Objects | Container |
DeleteResult:Node Name (Keyword) | Parent Node | Description | Type |
Deleted | DeleteResult | An object entry that is successfully deleted. This node is returned only in Verbose mode. | Container |
Error | DeleteResult | An object entry that failed to delete | Container |
Deleted:Node Name (Keyword) | Parent Node | Description | Type |
Key | DeleteResult.Deleted | Key of the object that is successfully deleted | string |
DeleteMarker | DeleteResult.Deleted | Fixed to true. This node is returned when a delete marker is created or deleted for an object. | boolean |
DeleteMarkerVersionId | DeleteResult.Deleted | ID of the delete marker that is created or deleted. This node is returned only when a delete marker is created or deleted for an object. | string |
VersionId | DeleteResult.Deleted | Version ID of the object that is successfully deleted. This node is returned only when a version ID is specified in the request. | string |
Error:Node Name (Keyword) | Parent Node | Description | Type |
Key | DeleteResult.Error | Key of the object that failed to delete | string |
VersionId | DeleteResult.Error | Version ID of the object that failed to delete. This node is returned only when a version ID is specified in the request. | string |
Code | DeleteResult.Error | Error code for the deletion failure. The error code can be used to locate the error conditions and scenario. | string |
Message | DeleteResult.Error | Error message for the deletion failure | string |
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Tue, 20 Aug 2019 11:59:35 GMTContent-Type: application/xmlContent-Length: 158Content-MD5: zUd/xgzNGDrqJMJUOWV2AQ==Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1566302375;1566309575&q-key-time=1566302375;1566309575&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=****************************************Connection: close<Delete><Quiet>false</Quiet><Object><Key>example-object-1.jpg</Key></Object><Object><Key>example-object-2.jpg</Key></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 144Connection: closeDate: Tue, 20 Aug 2019 11:59:35 GMTServer: tencent-cosx-cos-request-id: NWQ1YmUwYTdfM2FiMDJhMDlfYzczN18zMGM1****<DeleteResult><Deleted><Key>example-object-1.jpg</Key></Deleted><Deleted><Key>example-object-2.jpg</Key></Deleted></DeleteResult>
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Tue, 20 Aug 2019 12:12:26 GMTContent-Type: application/xmlContent-Length: 157Content-MD5: +iI9kJvM2k/y5y3nHcn8BQ==Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1566303146;1566310346&q-key-time=1566303146;1566310346&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=****************************************Connection: close<Delete><Quiet>true</Quiet><Object><Key>example-object-1.jpg</Key></Object><Object><Key>example-object-2.jpg</Key></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 15Connection: closeDate: Tue, 20 Aug 2019 12:12:27 GMTServer: tencent-cosx-cos-request-id: NWQ1YmUzYWFfMTljMDJhMDlfNTg3ZV8zNDI0****<DeleteResult/>
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 21 Aug 2019 12:04:03 GMTContent-Type: application/xmlContent-Length: 100Content-MD5: MowFtlG7iwK7Wmk79IVXFA==Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1566389043;1566396243&q-key-time=1566389043;1566396243&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=****************************************Connection: close<Delete><Quiet>false</Quiet><Object><Key>example-object-1.jpg</Key></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 200Connection: closeDate: Wed, 21 Aug 2019 12:04:03 GMTServer: tencent-cosx-cos-request-id: NWQ1ZDMzMzNfNDhiNDBiMDlfMmIzNzZfMTBh****<DeleteResult><Deleted><Key>example-object-1.jpg</Key><DeleteMarker>true</DeleteMarker><DeleteMarkerVersionId>MTg0NDUxNzc2ODQ2NjU3ODM4NTc</DeleteMarkerVersionId></Deleted></DeleteResult>
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 21 Aug 2019 11:24:43 GMTContent-Type: application/xmlContent-Length: 154Content-MD5: EwFydeQSMzaHWi0qMTOGWw==Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1566386683;1566393883&q-key-time=1566386683;1566393883&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=****************************************Connection: close<Delete><Quiet>false</Quiet><Object><Key>example-object-2.jpg</Key><VersionId>MTg0NDUxNzc2ODcwMjYyNjIwMTM</VersionId></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 140Connection: closeDate: Wed, 21 Aug 2019 11:24:44 GMTServer: tencent-cosx-cos-request-id: NWQ1ZDI5ZmJfNDhiNDBiMDlfMmIzODNfMTA0****<DeleteResult><Deleted><Key>example-object-2.jpg</Key><VersionId>MTg0NDUxNzc2ODcwMjYyNjIwMTM</VersionId></Deleted></DeleteResult>
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 21 Aug 2019 12:04:04 GMTContent-Type: application/xmlContent-Length: 154Content-MD5: EKphCPpHcKiVqJtMqE+DmA==Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1566389044;1566396244&q-key-time=1566389044;1566396244&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=****************************************Connection: close<Delete><Quiet>false</Quiet><Object><Key>example-object-1.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjU3ODM4NTc</VersionId></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 253Connection: closeDate: Wed, 21 Aug 2019 12:04:04 GMTServer: tencent-cosx-cos-request-id: NWQ1ZDMzMzRfYmIwMmEwOV83YTQzXzEyM2Ri****<DeleteResult><Deleted><Key>example-object-1.jpg</Key><DeleteMarker>true</DeleteMarker><DeleteMarkerVersionId>MTg0NDUxNzc2ODQ2NjU3ODM4NTc</DeleteMarkerVersionId><VersionId>MTg0NDUxNzc2ODQ2NjU3ODM4NTc</VersionId></Deleted></DeleteResult>
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 21 Aug 2019 12:04:05 GMTContent-Type: application/xmlContent-Length: 436Content-MD5: ZAbgvje31aO+0j7pkEkYvQ==Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1566389045;1566396245&q-key-time=1566389045;1566396245&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=****************************************Connection: close<Delete><Quiet>false</Quiet><Object><Key>example-object-1.jpg</Key></Object><Object><Key>example-object-2.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjQ1MjM5MTk</VersionId></Object><Object><Key>example-object-3.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjQwMTIwMDI</VersionId></Object><Object><Key>example-object-4.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjQ0NjI0MDQ</VersionId></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 703Connection: closeDate: Wed, 21 Aug 2019 12:04:06 GMTServer: tencent-cosx-cos-request-id: NWQ1ZDMzMzVfOTNjMjJhMDlfMzhiM18xMWY3****<DeleteResult><Deleted><Key>example-object-1.jpg</Key><DeleteMarker>true</DeleteMarker><DeleteMarkerVersionId>MTg0NDUxNzc2ODQ2NjM1NTI2NDY</DeleteMarkerVersionId></Deleted><Deleted><Key>example-object-2.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjQ1MjM5MTk</VersionId></Deleted><Deleted><Key>example-object-3.jpg</Key><DeleteMarker>true</DeleteMarker><DeleteMarkerVersionId>MTg0NDUxNzc2ODQ2NjQwMTIwMDI</DeleteMarkerVersionId><VersionId>MTg0NDUxNzc2ODQ2NjQwMTIwMDI</VersionId></Deleted><Error><Key>example-object-4.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjQ0NjI0MDQ</VersionId><Code>PathConflict</Code><Message>Path conflict.</Message></Error></DeleteResult>
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários