0012-00000004

更新时间:
复制 MD 格式

Problem description

The value of the Status parameter in the PutBucketVersioning request is invalid.

Causes

You sent a PutBucketVersioning request with an invalid value for the Status parameter.

Examples

In the following example, the Status parameter is set to Stop. The request fails because Stop is an invalid value.

PUT /?versioning HTTP/1.1
Host: bucket-versioning.oss-cn-hangzhou.aliyuncs.com
Date: Tue, 09 Apr 2019 02:20:12 GMT
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="UTF-8"?>
<VersioningConfiguration>
    <Status>Stop</Status>
</VersioningConfiguration>

Solutions

The Status parameter specifies the versioning state. Valid values are:

  • Enabled: indicates that versioning is enabled for the bucket.

  • Suspended: indicates that versioning is suspended for the bucket.

The following code provides an example of a valid request:

PUT /?versioning HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
<?xml version="1.0" encoding="UTF-8"?>
<VersioningConfiguration>
    <Status>Enabled</Status>
</VersioningConfiguration>

References

PutBucketVersioning