Enables or disables Archive direct read for a bucket.
Usage notes
-
Requires the
oss:PutBucketArchiveDirectReadpermission. For more information, see Grant a custom policy. -
Each region has its own OSS endpoint. For more information about regions and endpoints, see Regions and Endpoints.
-
With Archive direct read enabled, accessing unrestored Archive objects incurs data retrieval fees (RetrievalDataArchiveDirect) based on the data size. Restored Archive objects incur no retrieval fees. For more information, see Data processing fees.
Request syntax
PUT /?bucketArchiveDirectRead 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"?>
<ArchiveDirectReadConfiguration>
<Enabled>true</Enabled>
</ArchiveDirectReadConfiguration>
Request headers
This operation uses only Common HTTP headers.
Request elements
|
Element |
Type |
Required |
Example |
Description |
|
ArchiveDirectReadConfiguration |
Container |
Yes |
N/A |
Container for the Archive direct read configuration. |
|
Enabled |
Boolean |
Yes |
true |
Specifies whether to enable Archive direct read for the bucket. Valid values:
|
Response headers
This operation returns only Common HTTP headers.
Examples
-
Sample request
PUT /?bucketArchiveDirectRead HTTP/1.1 Date: Mon, 24 Apr 2023 15:56:37 GMT Content-Length: 60 Content-Type: application/xml Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,AdditionalHeaders=content-length,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e Host: oss-example.oss-cn-hangzhou.aliyuncs.com <?xml version="1.0" encoding="UTF-8"?> <ArchiveDirectReadConfiguration> <Enabled>true</Enabled> </ArchiveDirectReadConfiguration> -
Sample response
HTTP/1.1 200 OK x-oss-request-id: 534B371674E88A4D8906**** Date: Mon, 24 Apr 2023 15:56:37 GMT Content-Length: 60 Connection: keep-alive Server: AliyunOSS
ossutil
For information about the ossutil command that corresponds to the PutBucketArchiveDirectRead operation, see put-bucket-archive-direct-read.