tencent cloud

Feedback

GetCcnRegionBandwidthLimits

Last updated: 2023-08-23 14:11:36

1. API Description

Domain name for API request: vpc.tencentcloudapi.com.

This API is used to query the bandwidth limits of a CCN instance. Monthly-subscribed CCNs only support Inter-region Bandwidth Limits, while the pay-as-you-go CCNs support both the Inter-region Bandwidth Limits and Region Outbound Bandwidth Limits.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: GetCcnRegionBandwidthLimits.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region No String Common Params. This parameter is not required for this API.
CcnId Yes String The CCN instance ID, such as ccn-f49l6u0z.
Filters.N No Array of Filter The filter condition.
  • sregion - String - (Filter condition) Filter by the source region, such as 'ap-guangzhou'.
  • dregion - String - (Filter condition) Filter by the destination region, such as 'ap-shanghai-bm'.
  • SortedBy No String The sorting condition. Valid values: BandwidthLimit and ExpireTime.
    Offset No Integer Offset
    Limit No Integer Quantity of returned items
    OrderBy No String In ascending or descending order. Valid values: 'ASC' and 'DESC'.

    3. Output Parameters

    Parameter Name Type Description
    CcnBandwidthSet Array of CcnBandwidthInfo The outbound bandwidth limits of regions in a CCN instance.
    Note: This field may return null, indicating that no valid values can be obtained.
    TotalCount Integer The number of eligible objects.
    Note: this field may return null, indicating that no valid value was found.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the outbound bandwidth limits of a CCN instance

    This example shows you how to query the outbound bandwidth limits of a pay-as-you-go CCN instance, for which the ExpireTime and RenewFlag parameters can be ignored.

    Input Example

    POST / HTTP/1.1
    Host: vpc.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: GetCcnRegionBandwidthLimits
    <Common request parameters>
    
    {
        "CcnId": "ccn-1pdchck1"
    }
    

    Output Example

    {
        "Response": {
            "CcnBandwidthSet": [
                {
                    "CcnRegionBandwidthLimit": {
                        "Region": "ap-guangzhou",
                        "IsBm": false,
                        "BandwidthLimit": 10
                    },
                    "CcnId": "ccn-1pdchck1",
                    "TagSet": [
                        {
                            "Key": "test",
                            "Value": "123"
                        }
                    ],
                    "RegionFlowControlId": "fcr-krx0mfoi",
                    "CreatedTime": "2020-05-20 16:29:44",
                    "ExpiredTime": "2020-05-20 16:29:44",
                    "MarketId": "abc",
                    "RenewFlag": "NOTIFY_AND_MANUAL_RENEW"
                }
            ],
            "TotalCount": 1,
            "RequestId": "639c4bff-ff57-4734-bd72-f543df3b0771"
        }
    }
    

    Example2 Querying the inter-region bandwidth limits of a CCN

    This example shows you how to query the cross-region outbound bandwidths for monthly-subscribed CCN and obtain two instances with a cross-region bandwidth limit. The fcr-crrnp6w4 instance has NOTIFY_AND_MANUAL_RENEW (no auto-renewal) for the RenewFlag parameter, and the fcr-lnfsgh4y instance has NOTIFY_AND_AUTO_RENEW (auto-renewal) for the RenewFlag parameter.

    Input Example

    POST / HTTP/1.1
    Host: vpc.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: GetCcnRegionBandwidthLimits
    <Common request parameters>
    
    {
        "CcnId": "ccn-2gxeenq2"
    }
    

    Output Example

    {
        "Response": {
            "CcnBandwidthSet": [
                {
                    "CcnRegionBandwidthLimit": {
                        "Region": "ap-guangzhou",
                        "IsBm": false,
                        "BandwidthLimit": 1,
                        "DstRegion": "ap-shanghai",
                        "DstIsBm": false
                    },
                    "CcnId": "ccn-2gxeenq2",
                    "TagSet": [
                        {
                            "Key": "test",
                            "Value": "123"
                        }
                    ],
                    "RegionFlowControlId": "fcr-crrnp6w4",
                    "CreatedTime": "2020-06-10 14:48:13",
                    "ExpiredTime": "2020-07-10 15:47:05",
                    "MarketId": "abc",
                    "RenewFlag": "NOTIFY_AND_MANUAL_RENEW"
                },
                {
                    "CcnRegionBandwidthLimit": {
                        "Region": "ap-nanjing",
                        "IsBm": false,
                        "BandwidthLimit": 1,
                        "DstRegion": "ap-chengdu",
                        "DstIsBm": false
                    },
                    "CcnId": "ccn-2gxeenq2",
                    "TagSet": [
                        {
                            "Key": "test",
                            "Value": "123"
                        }
                    ],
                    "RegionFlowControlId": "fcr-lnfsgh4y",
                    "CreatedTime": "2020-06-10 15:55:29",
                    "ExpiredTime": "2020-07-10 15:55:29",
                    "MarketId": "abc",
                    "RenewFlag": "NOTIFY_AND_AUTO_RENEW"
                }
            ],
            "TotalCount": 2,
            "RequestId": "39db643d-64ba-456b-91c6-279115682ad2"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InvalidParameter A parameter error occurred.
    InvalidParameter.FilterInvalidKey The specified filter condition does not exist.
    InvalidParameterValue.Malformed Invalid input parameter format.
    InvalidParameterValue.Range The parameter value is not in the specified range.
    UnsupportedOperation Unsupported operation.