> 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/zec/vpc-network/cross-region-bandwidth/inquirypricemodifycrossregionbandwidth.md).

# InquiryPriceModifyCrossRegionBandwidth

## 1. API Description

This API (InquiryPriceModifyCrossRegionBandwidth) is used to inquire the price after adjusting the VPC cross-region bandwidth. The currently effective price of each billing item before the change is also returned through previousPrices, so that you can compare which billing items have price changes.

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

<mark style="color:blue;">When the network billing model is</mark> <mark style="color:blue;">`ByInstanceBandwidth95`</mark><mark style="color:blue;">, modifying the burst bandwidth does not involve a billing change.</mark>
{% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name         | Required | Type    | Description                                                                                                                                                                                                                       |
| ---------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| crossRegionBandwidthId | Yes      | String  | <p>ID of the VPC cross-region bandwidth to be modified.</p><p>It can be obtained by calling <a href="/api-reference/zec/vpc-network/cross-region-bandwidth/describecrossregionbandwidth.md">DescribeCrossRegionBandwidth</a>.</p> |
| bandwidth              | Yes      | Integer | <p>Bandwidth cap.</p><p>Value range: \[1, +)</p>                                                                                                                                                                                  |

## 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>                                                                                                             |
| crossRegionBandwidthPrice | [PriceItem](/api-reference/zec/datastructure.md#priceitem)                                                   | Price of the VPC cross-region bandwidth.                                                                                                                                                                                          |
| previousPrices            | [CrossRegionBandwidthPreviousPrices](/api-reference/zec/datastructure.md#crossregionbandwidthpreviousprices) | <p>Currently effective price of each billing item before the change. The fields correspond one by one to those above and are used to compare which billing items have price changes.</p><p>It is null when there is no order.</p> |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Inquire the price of adjusting a VPC cross-region bandwidth whose billing type is `ByBandwidth`, with the bandwidth changed to 500 Mbps.**

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

Request：
{
  "crossRegionBandwidthId": "<your cross id>",
  "bandwidth": 500
}

Response：
{
  "requestId": "TF84F83D3-8F9B-4F49-952E-A7278F7C1183",
  "response": {
    "crossRegionBandwidthPrice": {
      "discount": 100.0,
      "discountPrice": 2000.0,
      "originalPrice": 2000.0,
      "unitPrice": null,
      "discountUnitPrice": null,
      "chargeUnit": null,
      "stepPrices": null
    },
    "previousPrices": {
      "crossRegionBandwidthPrice": {
        "discount": 100.0,
        "discountPrice": 1600.0,
        "originalPrice": 1600.0,
        "unitPrice": null,
        "discountUnitPrice": null,
        "chargeUnit": null,
        "stepPrices": null
      }
    },
    "requestId": "TF84F83D3-8F9B-4F49-952E-A7278F7C1183"
  }
}
```

**2. Inquire the price of adjusting a VPC cross-region bandwidth whose billing type is `ByInstanceBandwidth95`, with the committed bandwidth changed to 500 Mbps.**

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

Request：
{
  "crossRegionBandwidthId": "<your cross id>",
  "bandwidth": 500
}

Response：
{
  "requestId": "TF84F83D3-8F9B-4F49-952E-A7278F7C1183",
  "response": {
    "crossRegionBandwidthPrice": {
      "discount": 100.0,
      "discountPrice": 2000.0,
      "originalPrice": 2000.0,
      "unitPrice": null,
      "discountUnitPrice": null,
      "chargeUnit": null,
      "stepPrices": null
    },
    "previousPrices": {
      "crossRegionBandwidthPrice": {
        "discount": 100.0,
        "discountPrice": 1600.0,
        "originalPrice": 1600.0,
        "unitPrice": null,
        "discountUnitPrice": null,
        "chargeUnit": null,
        "stepPrices": null
      }
    },
    "requestId": "TF84F83D3-8F9B-4F49-952E-A7278F7C1183"
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/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](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code                          | Description                                    |
| ---------------- | ----------------------------------- | ---------------------------------------------- |
| 404              | INVALID\_VPC\_BANDWIDTH\_NOT\_FOUND | The VPC cross-region bandwidth does not exist. |
