0032-00000014
Updated at:
Problem description
When you call PutBucketLogging to enable logging, OSS returns HTTP status code 400 and error code InvalidArgument. The error message is LoggingRole is invalid.
Causes
Invalid
LoggingRolevalue: TheLoggingRoleelement contains the Alibaba Cloud Resource Name (ARN) of a RAM role instead of the RAM role name.
Examples
The following request sets LoggingRole to a RAM role ARN:
PUT /?logging HTTP/1.1
Host: examplebucket.oss-cn-beijing.aliyuncs.com
Content-Type: application/xml
Authorization: SignatureValue
<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>examplebucket</TargetBucket>
<TargetPrefix>MyLog-</TargetPrefix>
<LoggingRole>acs:ram::1000000000000000:role/AliyunOSSLoggingDefaultRole</LoggingRole>
</LoggingEnabled>
</BucketLoggingStatus>
OSS returns the following error:
HTTP/1.1 400 Bad Request
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>InvalidArgument</Code>
<Message>LoggingRole is invalid.</Message>
<EC>0032-00000014</EC>
</Error>
Solutions
-
Specify the RAM role name: Replace the RAM role ARN in
LoggingRolewith the RAM role name. For example, changeLoggingRolein the preceding request to:<LoggingRole>AliyunOSSLoggingDefaultRole</LoggingRole>
Resend the PutBucketLogging request.
References
Is this page helpful?