최신 업데이트:2025-08-18 15:52:00
여러 파일을 한 번에 삭제하려면 IAM wos:DeleteObject 권한이 필요합니다.
POST /?delete HTTP/1.1
Host: Bucket.Endpoint
x-amz-mfa: MFA
x-amz-request-payer: RequestPayer
x-amz-bypass-governance-retention: BypassGovernanceRetention
<?xml version="1.0" encoding="UTF-8"?>
<Delete xmlns=" http://wcs.chinanetcenter.com/document ">
<Object>
<Key>string</Key>
</Object>
...
<Quiet>boolean</Quiet>
</Delete>
없음
common request headers 만 사용하세요.
요청 본문에는 아래와 같은 XML 정보가 포함됩니다.
| 요소명 | 요소 설명 | 필수 여부 |
|---|---|---|
| Delete | 삭제 정보를 정의합니다. 타입: XML 자식 노드: Object, Quiet 부모 노드: 없음 |
예 |
| Object | 특정 삭제 객체 정보를 정의합니다. 타입: XML 부모 노드: Delete 자식 노드: Key |
예 |
| Key | 삭제할 객체의 이름을 지정합니다. 타입: String 부모 노드: Object 자식 노드: 없음 |
예 |
| Quiet | 조용 모드(quiet mode) 사용 여부를 정의합니다. 값: true, false 타입: Boolean 부모 노드: Delete 자식 노드: 없음 |
아니오 |
HTTP/1.1 200 OK
x-amz-request-id: request id
Connection: close
Content-Type: application/xml
Content-Length: 206
Date: date
Server: WS-web-server
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DeleteResult xmlns="http://wcs.chinanetcenter.com/document">
<Deleted>
<Key>string</Key>
</Deleted>
<Deleted>
<Key>string</Key>
</Deleted>
<Error>
<Code>string</Code>
<Key>string</Key>
<Message>string</Message>
</Error>
<Error>
<Code>string</Code>
<Key>string</Key>
<Message>string</Message>
</Error>
</DeleteResult>
common response headers 만 사용하세요.
| 요소명 | 요소 설명 |
|---|---|
| Deleted | 삭제된 객체의 정보입니다. 타입: XML 자식 노드: Key 부모 노드: 없음 |
| Key | 삭제된 객체의 이름입니다. 타입: String 부모 노드: Deleted, Error 자식 노드: 없음 |
| Error | 삭제 실패 객체의 정보입니다. 타입: XML 부모 노드: 없음 자식 노드: Code, Key, Message |
| Code | 삭제 실패 코드입니다. 타입: String 부모 노드: Error 자식 노드: 없음 |
| Message | 삭제 실패 메시지입니다. 타입: String 부모 노드: Error 자식 노드: 없음 |
POST /?delete HTTP/1.1
Host: bucket.s3-cn-east-1.wcsapi.com
Accept-Encoding: identity
User-Agent: aws-cli/1.17.17 Python/3.8.0 Windows/10 botocore/1.14.17
Content-MD5: mno5HqDRSTJY/yusgaPLeQ==
X-Amz-Date: 20200331T055821Z
X-Amz-Content-SHA256: f33ffe2a28873df81b0fac7f39344fbc12127e7b3641b3c9e83346147a694c16
Authorization: AWS4-HMAC-SHA256 Credential=L18Gy5jN4fChwat419iDc0i8divP8nVwQahS/20200331/region98/s3/aws4_request, SignedHeaders=content-md5;host;x-amz-content-sha256;x-amz-date, Signature=3dd0861c930fbdecedfdd764c4f4d322c321ab2738ef7d9dd5a3dec908a7391f
Content-Length: 156
<Delete xmlns="http://wcs.chinanetcenter.com/document">
<Object>
<Key>10Mfile</Key>
</Object>
<Object>
<Key>100Mfile</Key>
</Object>
<Quiet>false</Quiet>
</Delete>
HTTP/1.1 200 OK
x-amz-request-id: 209822119924133820200331135846tM1lmMCvsampled
Connection: close
Content-Type: application/xml
Content-Length: 206
Date: Tue, 31 Mar 2020 05:58:51 GMT
Server: WS-web-server
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DeleteResult xmlns="http://wcs.chinanetcenter.com/document">
<Deleted>
<Key>100Mfile</Key>
</Deleted>
<Deleted>
<Key>10Mfile</Key>
</Deleted>
</DeleteResult>