PUT Bucket Version

Last updated:2021-09-14 16:18:08

Description

This PUT operation uses the version resource to set the multi version settings of user space.
If you use this interface, you need to be the owner of this space.
Users can open or close multiple versions through this interface:

  • Open status: all files uploaded to the storage space will be identified with a unique version ID.

  • Closed status: all files uploaded to the storage space will identify a version ID with a value of null.

Request

Grammar

PUT /?versioning HTTP/1.1
Host: {BucketName}.{endpoint}
Date: {date}
Authorization: {SignatureValue}

<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <Status>string</Status>
</VersioningConfiguration>.

Note:

Request parameters

The interface does not use request parameters.

Request header

This interface only uses common request headers. For more information, please click Public request headers.

Request content

Name Description
Status The multi version state of the storage space.
Type: String
Valid value: Enabled Suspended

Response

Response header

This interface can use all common response headers. For more information, please click Public response headers.

Response content

The interface does not return the corresponding content.

Special errors

The interface does not return any special errors.

Example

Example of opening a multi version request

PUT /?versioning HTTP/1.1
Host: ks3-example.ks3-cn-beijing.ksyuncs.com
Date: Fri, 26 Dec 2014 06:38:43 GMT
Authorization: authorization string
Content-Type: text/plain
Content-Length: 124

<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> 
  <Status>Enabled</Status> 
</VersioningConfiguration>

Response example

HTTP/1.1 200 OK
Date: Fri, 26 Dec 2014 06:38:43 GMT
Server: Tengine

Example of closing a multi version request

PUT /?versioning HTTP/1.1
Host: ks3-example.ks3-cn-beijing.ksyuncs.com
Date: Fri, 26 Dec 2014 06:38:43 GMT
Authorization: authorization string
Content-Type: text/plain
Content-Length: 124

<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> 
  <Status>Suspended</Status> 
</VersioningConfiguration>

Example of a response to closing a log

HTTP/1.1 200 OK
Date: Fri, 26 Dec 2014 06:38:43 GMT
Server: Tengine

Did you find the above information helpful?

Unhelpful
Mostly Unhelpful
A little helpful
Helpful
Very helpful

What might be the problems?

Insufficient
Outdated
Unclear or awkward
Redundant or clumsy
Lack of context for the complex system or functionality

More suggestions

0/200

Please give us your feedback.

Submitted

Thank you for your feedback.

问题反馈