The PUT Bucket versioning API is used to enable or suspend versioning for a bucket.
PUT /?versioning HTTP 1.1
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
Date: GMT date
Authorization: Auth String
Authorization: Auth String (see Request Signature for more information).
This API only uses common request headers. For more information on common request headers, see Common Request Headers.
<VersioningConfiguration>
<Status></Status>
</VersioningConfiguration>
Please find the details below:
Node Name (Keyword) | Parent Node | Description | Type |
---|---|---|---|
VersioningConfiguration | None | Describes the detailed information on versioning | Container |
Status | VersioningConfiguration | Indicates whether versioning is enabled; enumerators: Suspended, Enabled | Enum |
This API only uses common response headers. For more information on common request headers, see Common Response Headers.
This response body is empty.
This API uses standardized error responses and error codes. For more information, see Error Codes .
PUT /?versioning HTTP/1.1
Host: examplebucket-1250000000.cos.ap-chengdu.myqcloud.com
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.12.4
Content-Type: application/xml
Authorization: q-sign-algorithm=sha1&q-ak=AKID15IsskiBQKTZbAo6WhgcBqVls9Sm****&q-sign-time=1480932292;1981012292&q-key-time=1480932292;1981012292&q-url-param-list=versioning&q-header-list=host&q-signature=47ec2b80c73788ecd394d3b9ad90e120a32f****
Content-Length: 83
<VersioningConfiguration>
<Status>Enabled</Status>
</VersioningConfiguration>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 0
Connection: keep-alive
Date: Wed, 23 Aug 2017 08:14:53 GMT
Server: tencent-cos
x-cos-request-id: NTk5ZDM5N2RfMjNiMjM1MGFfMmRiX2Y0****
Was this page helpful?