Skip to content

Commit 0fb671b

Browse files
committed
Modify versioning status
1 parent 4778935 commit 0fb671b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qcloud_cos/cos_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ def delete_bucket_lifecycle(self, Bucket, **kwargs):
960960
def put_bucket_versioning(self, Bucket, Status, **kwargs):
961961
"""设置bucket版本控制
962962
:param Bucket(string): 存储桶名称.
963-
:param Status(string): 设置Bucket版本控制的状态,可选值为'Enabled'|'Disabled'.
963+
:param Status(string): 设置Bucket版本控制的状态,可选值为'Enabled'|'Suspended'.
964964
:param kwargs(dict): 设置请求headers.
965965
:return: None.
966966
"""
@@ -969,8 +969,8 @@ def put_bucket_versioning(self, Bucket, Status, **kwargs):
969969
logger.info("put bucket versioning, url=:{url} ,headers=:{headers}".format(
970970
url=url,
971971
headers=headers))
972-
if Status != 'Enabled' and Status != 'Disabled':
973-
raise CosClientError('versioning status must be set to Enabled or Disabled!')
972+
if Status != 'Enabled' and Status != 'Suspended':
973+
raise CosClientError('versioning status must be set to Enabled or Suspended!')
974974
config = dict()
975975
config['Status'] = Status
976976
xml_config = format_xml(data=config, root='VersioningConfiguration')

0 commit comments

Comments
 (0)