0020-00000028

问题描述

PutBucketInventory请求中Destination/OSSBucketDestination/AccountId节点取值不合法。

问题原因

PutBucketInventory请求中Destination/OSSBucketDestination/AccountId节点取值为空,或者与Bucket拥有者授予的账号ID不匹配。

问题示例

以下请求示例中AccountId取值为123456789,与Bucket拥有者授予的账号ID不匹配,导致请求报错。

  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>
     <Destination>
        <OSSBucketDestination>
           <Format>CSV</Format>
           <AccountId>123456789</AccountId>
           <RoleArn>acs:ram::1000000000000000:role/AliyunOSSRole</RoleArn>
           <Bucket>acs:oss:::destination-bucket</Bucket>
           <Prefix>prefix1</Prefix>
           <Encryption>
              <SSE-KMS>
                 <KeyId>keyId</KeyId>
              </SSE-KMS>
           </Encryption>
        </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>
        <Field>EncryptionStatus</Field>
     </OptionalFields>
  </InventoryConfiguration>

解决方案

确保Destination/OSSBucketDestination/AccountId节点取值不能为空,且与Bucket拥有者授予的账号ID一致。

相关文档

PutBucketInventory