> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/zga/accelerator/modifyacceleratorregion.md). Agents can also search and read this documentation through its [MCP server](https://docs.console.zenlayer.com/api-reference/~gitbook/mcp).

# ModifyAcceleratorAccRegion

## 1. API Description

This API (ModifyAcceleratorAccRegion) is used to modify an accelerator's acceleration region.

#### Preparation

* Query available acceleration regions: Call [`DescribeAccelerateRegions`](https://docs.console.zenlayer.com/api-reference/zga/region/describeaccelerateregions.md) with originRegionId parameter to query available acceleration regions.

{% hint style="info" %}
**Notes**

* When modifying a single acceleration region, you also need to submit information about other acceleration regions. It is recommended to call `DescribeAccelerators` API before modification to obtain acceleration region information.
* This is an asynchronous API. After the API returns successfully, the accelerator modification operation is not immediately completed. During this period, the accelerator status will be `Deploying`. You can query the accelerator status by calling the `DescribeAccelerators` API. If the accelerator status (acceleratorStatus) changes from `Deploying` to `Accelerating`, it indicates successful acceleration. `AccelerateFailure` indicates acceleration failure, and you can call the redeploy API to retry.
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API Input Parameters.

| Parameter Name    | Required | Type                                                                                                               | Description                     |
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------- |
| acceleratorId     | Yes      | String                                                                                                             | Accelerator ID                  |
| accelerateRegions | Yes      | Array of [AccelerateRegion](https://docs.console.zenlayer.com/api-reference/zga/datastructure.md#accelerateregion) | Acceleration region information |

## 3. Output Parameters

| Parameter Name | Type   | Description                                                                                                           |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |

## 4. Code Examples

{% tabs %}
{% tab title="Example" %}

1. **Modify accelerator origin**

```json
POST /api/v2/zga HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: ModifyAcceleratorAccRegion
<Common Request Params>

Request:
{
    "acceleratorId": "acceleratorIdxxxxx",
    "accelerateRegions": [
        {
            "accelerateRegionId": "FR",
        },
        {
            "accelerateRegionId": "SG",
        }
    ],
}


Response:
{
    "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/api-reference/api-introduction/toolkit/api-sdk.md)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code                                | Description                                                                         |
| ---------------- | ----------------------------------------- | ----------------------------------------------------------------------------------- |
| 400              | ACCELERATE\_REGION\_ONLY                  | This region is only available for acceleration regions                              |
| 400              | ANYCAST\_ONLY                             | This region is only available for Anycast                                           |
| 400              | NO\_FIT\_LINE                             | Acceleration region unavailable                                                     |
| 500              | FOUND\_AVAILABLE\_REGION\_ERROR           | Failed to query available regions                                                   |
| 404              | INVALID\_REGION\_NOT\_FOUND               | Specified region not found                                                          |
| 400              | ANYCAST\_NOT\_ALLOW\_WITH\_NORMAL\_REGION | Anycast acceleration cannot be used simultaneously with normal acceleration regions |
| 400              | NORMAL\_ACCELERATOR\_NOT\_ALLOW\_ANYCAST  | Normal acceleration cannot be modified to Anycast acceleration                      |
| 400              | CUSTOMER\_ACCOUNT\_NOT\_AVAILABLE         | Customer account is not available                                                   |
| 400              | TRAFFIC\_PACKAGE\_NOT\_EXIST              | Meteting package does not exist                                                     |
| 400              | TRAFFIC\_PACKAGE\_EXPIRED                 | Meteting package has expired, please renew                                          |
| 400              | LINE\_NOT\_ENOUGH                         | Account ip resources have reached the limit                                         |
| 400              | NO\_ENOUGH\_BANDWIDTH                     | User does not have sufficient bandwidth                                             |
| 400              | ONLY\_ONE\_CN2\_AREA\_CAN\_SELECTED       | Only one CN2 acceleration region can be selected                                    |
| 400              | NOT\_ALLOW\_MODIFY\_BANDWIDTH             | Acceleration region bandwidth modification is not allowed                           |
