All Products
Search
Document Center

Object Storage Service:PutBucketDataAccelerator

Last Updated:Jun 22, 2026

Creates an OSS accelerator or modifies its configuration.

Usage notes

The OSS accelerator API can be called only from an internal network in the same region as OSS, and you must use the corresponding accelerator domain name. For example, you can call the API from an ECS instance in the Ulanqab region. The following table lists the supported zones and OSS accelerator domain names for each region.

Region

Zone

OSS accelerator domain name

Beijing

cn-beijing-h

cn-beijing-h-internal.oss-data-acc.aliyuncs.com

Shanghai

cn-shanghai-g

cn-shanghai-g-internal.oss-data-acc.aliyuncs.com

Shenzhen

cn-shenzhen-c

cn-shenzhen-c-internal.oss-data-acc.aliyuncs.com

Hangzhou

cn-hangzhou-j

cn-hangzhou-j-internal.oss-data-acc.aliyuncs.com

Ulanqab

cn-wulanchabu-b

cn-wulanchabu-b-internal.oss-data-acc.aliyuncs.com

Singapore

ap-southeast-1c

ap-southeast-1c-internal.oss-data-acc.aliyuncs.com

Permissions

By default, an Alibaba Cloud account has full permissions. RAM users or RAM roles under an Alibaba Cloud account do not have any permissions by default. The Alibaba Cloud account or account administrator must grant operation permissions through RAM policies or Bucket Policy.

API

Action

Description

PutBucketDataAccelerator

oss:PutBucketDataAccelerator

Creates a bucket accelerator or modifies its configuration.

Request syntax

PUT /?dataAccelerator HTTP/1.1
Date: GMT Date
Content-Length:ContentLength
Content-Type: application/xml
Authorization: SignatureValue 
Host: BUCKETNAME.cn-wulanchabu-b-internal.oss-data-acc.aliyuncs.com

<DataAcceleratorConfiguration>
  <AvailableZone>cn-wulanchabu-b</AvailableZone>
  <Quota>200</Quota>
  <AcceleratePaths>
    <DefaultCachePolicy>write-back</DefaultCachePolicy>
    <Path>
      <Name>AccelerationPath</Name>
      <CachePolicy>sync-warmup</CachePolicy>
    </Path>
  </AcceleratePaths>
</DataAcceleratorConfiguration>

Request headers

This operation uses common request headers. For more information, see Common Request Headers.

Request parameters

Name

Type

Required

Example

Description

dataAccelerator

string

Yes

None

Identifier parameter for OSS accelerator API operations. Can be set to any value.

Request body

Name

Type

Required

Example

Description

DataAcceleratorConfiguration

Container

Yes

N/A

Container for the accelerator configuration.

Child nodes:

AvailableZone

Quota

AcceleratePaths

Parent node: None

AvailableZone

string

Yes

cn-wulanchabu-b

Zone of the accelerator. Supported zones:

cn-beijing-h (Beijing)

cn-shanghai-g (Shanghai)

cn-shenzhen-c (Shenzhen)

cn-hangzhou-j (Hangzhou)

cn-wulanchabu-b (Ulanqab)

ap-southeast-1c (Singapore)

Quota

Positive integer

Yes

100

Capacity of the accelerator, in GB.

The capacity cannot be modified again within one hour after creation or modification.

AcceleratePaths

Container

Yes

N/A

Container for the acceleration policy configuration.

Child nodes:

DefaultCachePolicy

Path

Parent node:

DataAcceleratorConfiguration

Path

Container

No

N/A

Container for the acceleration path configuration.

Child nodes:

Name

CachePolicy

Parent node:

AcceleratePaths

Name

string

Yes

test/dir/

Acceleration path prefix.

Child nodes: None

Parent node: Path

CachePolicy

string

Yes

sync-warmup, write-back

Acceleration policy for the path. Valid values:

sync-warmup (synchronous warm-up when writing)

write-back (warm-up when reading)

Child nodes: None

Parent node: Path

DefaultCachePolicy

string

Yes

sync-warmup, write-back

Default acceleration policy for the entire bucket. Takes effect only when no Path is configured. Valid values:

sync-warmup (synchronous warm-up when writing)

write-back (warm-up when reading)

Child nodes: None

Parent node: AcceleratePaths

Response headers

This operation uses common response headers. For more information, see Common Response Headers.

Examples

Create an OSS accelerator

  • Request example

    PUT /?dataAccelerator= HTTP/1.1
    Date: Sun, 05 Sep 2021 23:00:00 GMT
    Content-Length: 556
    Content-Type: application/xml
    Authorization: OSS4-HMAC-SHA256 Credential=****
    Host: http://BUCKETNAME.cn-wulanchabu-b-internal.oss-data-acc.aliyuncs.com
    
    <DataAcceleratorConfiguration>
      <AvailableZone>cn-wulanchabu-b</AvailableZone>
      <Quota>200</Quota>
      <AcceleratePaths>
        <DefaultCachePolicy>write-back</DefaultCachePolicy>
        <Path>
          <Name>AccelerationPath</Name>
          <CachePolicy>sync-warmup</CachePolicy>
        </Path>
      </AcceleratePaths>
    </DataAcceleratorConfiguration>
  • Response example

    HTTP/1.1 200 OK
    Server: AliyunOSS
    Date: Fri, 27 Jun 2025 02:19:45 GMT
    Content-Length: 0
    Connection: keep-alive
    x-oss-request-id: 685DFFC18AB8A63132C65285

Error codes

Error code

HTTP status code

Description

TooManyAccelerationPolicyPaths

400

The number of configured acceleration paths exceeds the limit.

InvalidCachePathPolicy

400

The specified acceleration policy is invalid.

InvalidQuota

400

The specified accelerator capacity is invalid.

DataAcceleratorQuotaFrozen

403

The accelerator capacity is frozen and cannot be modified.

DataAcceleratorAvailableZoneNotSupported

400

The specified zone does not support the accelerator.