Problem description
The destination bucket is missing from the XML body of the PutBucketLogging request.
Causes
The required TargetBucket parameter in the LoggingEnabled child node of the BucketLoggingStatus node is missing from the XML body of the PutBucketLogging request.
Examples
For example, you initiate the following request:
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>
<TargetPrefix>TargetPrefix</TargetPrefix>
</LoggingEnabled>
</BucketLoggingStatus>The error is returned for the sample request because the TargetBucket child node is missing from the LoggingEnabled node in the XML request body.
Solutions
Make sure that the request body uses a valid XML structure and the TargetBucket node is correctly configured:
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>