問題描述
PutBucketInventory請求中OSSBucketDestination節點下的Prefix參數取值不合法。
問題原因
您發起了PutBucketInventory請求,但是OSSBucketDestination節點下的Prefix參數取值包含了特殊字元,導致請求錯誤。
問題樣本
請求中SSBucketDestination節點下的Prefix參數取值包含了特殊字元%&$@i^*!@#$%^&*。
PUT /?inventory&inventoryId=report1 HTTP/1.1
Host: BucketName.oss.aliyuncs.com
Date: Mon, 31 Oct 2016 12:00:00 GMT
Authorization: authorization string
Content-Length: length
<?xml version="1.0" encoding="UTF-8"?>
<InventoryConfiguration>
<Id>report1</Id>
<IsEnabled>true</IsEnabled>
<Filter>
<Prefix>filterPrefix/</Prefix>
<LastModifyBeginTimeStamp>1637883649</LastModifyBeginTimeStamp>
<LastModifyEndTimeStamp>1638347592</LastModifyEndTimeStamp>
<LowerSizeBound>1024</LowerSizeBound>
<UpperSizeBound>2048</UpperSizeBound>
<StorageClass>Standard,IA</StorageClass>
</Filter>
<Destination>
<OSSBucketDestination>
<Format>CSV</Format>
<AccountId>1000000000000000</AccountId>
<RoleArn>acs:ram::1000000000000000:role/AliyunOSSRole</RoleArn>
<Bucket>acs:oss:::destination-bucket</Bucket>
<Prefix>%&$@i^*!@#$%^&*</Prefix>
</OSSBucketDestination>
</Destination>
<Schedule>
<Frequency>Daily</Frequency>
</Schedule>
<IncludedObjectVersions>All</IncludedObjectVersions>
<OptionalFields>
<Field>Size</Field>
<Field>LastModifiedDate</Field>
<Field>ETag</Field>
<Field>StorageClass</Field>
<Field>IsMultipartUploaded</Field>
</OptionalFields>
</InventoryConfiguration>解決方案
確保OSSBucketDestination節點下的Prefix參數取值不超過1023字元且是UTF-8編碼。