问题描述
PutBucketLogging请求中的XML配置有误,存储日志的目标Bucket不存在。
问题原因
您发起了PutBucketLogging请求,但是请求体XML配置有误,/BucketLoggingStatus/LoggingEnabled/TargetBucket
节点表示日志转存的目标Bucket,您提供的该参数对应的Bucket不存在。
问题示例
比如您发起了如下请求:
PUT /?logging HTTP/1.1
Date: GMT Date
Content-Length:ContentLength
Content-Type: application/xml
Authorization: SignatureValue
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>Bucket-Not-Exist</TargetBucket>
<TargetPrefix>TargetPrefix</TargetPrefix>
</LoggingEnabled>
</BucketLoggingStatus>
上述请求请求体XML的节点LoggingEnabled
中的TargetBucket
子节点值为Bucket-Not-Exist,如果该Bucket名称对应的Bucket不存在,则会产生该错误。
解决方案
请确保您发起的请求中XML节点TargetBucket
的值正确无误,是真实存在的Bucket:
PUT /?logging HTTP/1.1
Date: GMT Date
Content-Length:ContentLength
Content-Type: application/xml
Authorization: SignatureValue
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>TargetBucket</TargetBucket>
<TargetPrefix>TargetPrefix</TargetPrefix>
</LoggingEnabled>
</BucketLoggingStatus>
相关文档
文档内容是否对您有帮助?