Queries the access tracking status of a bucket.
Usage notes
To query the access tracking status of a bucket, you must have the oss:GetBucketAccessMonitor
permission. For more information, see Attach a custom policy to a RAM user.
Request syntax
GET /?accessmonitor HTTP/1.1
Host: BucketName.oss.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
Request headers
This request contains only common request headers. For more information, see Common request headers.
Response headers
This request contains only common response headers. For more information, see Common response headers.
Response elements
Element | Type | Example | Description |
---|---|---|---|
AccessMonitorConfiguration | Container | None | The access tracking configuration of the bucket.
Child nodes: Status |
Status | String | Enabled | The access tracking status of the bucket. Valid values:
Parent nodes: AccessMonitorConfiguration |
Examples
Sample requests
GET /?accessmonitor HTTP/1.1
Host: oss-example.oss.aliyuncs.com
Date: Mon, 26 Jul 2021 13:08:38 GMT
Authorization: OSS qn6qrrqxo2oawuk53otf****:ceOEyZavKY4QcjoUWYSpYbJ3****
Sample responses
HTTP/1.1 200 OK
x-oss-request-id: 5C1B138A109F4E405B2D****
Date: Mon, 26 Jul 2021 13:08:38 GMT
Content-Length: 125
Content-Type: application/xml
Connection: keep-alive
Server: AliyunOSS
<?xml version="1.0" encoding="UTF-8"?>
<AccessMonitorConfiguration>
<Status>Enabled</Status>
</AccessMonitorConfiguration>
Error codes
Error codes | HTTP status code | Description |
---|---|---|
AccessDenied | 403 | The error message returned because you are not authorized to access the bucket. |
NoSuchBucket | 404 | The error message returned because the bucket does not exist. |