ModifyPrefetchOriginLimit

1. API Description

Domain name for API request: teo.intl.tencentcloudapi.com.

This API is used to configure the origin speed limit. This feature is in beta test.
This API is used to create, modify and delete preheating origin speed limit restrictions. Each account supports up to 100 restrictions.

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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: ModifyPrefetchOriginLimit.
VersionYesStringCommon Params. The value used for this API: 2022-09-01.
RegionNoStringCommon Params. This parameter is not required.
ZoneIdYesStringZone ID.
DomainNameYesStringAcceleration domain name.
AreaYesStringSpecifies the acceleration region with origin-pull speed limit.
During preheating, the acceleration region will be subject to the configured Bandwidth value limit. valid values:.
  • Overseas: global availability zone (excluding the chinese mainland);
  • .
  • MainlandChina: chinese mainland availability zone.
  • .
    BandwidthYesIntegerSpecifies the bandwidth limit for origin-pull.
    Specifies the upper limit of bandwidth returning to the origin server during preheating. value ranges from 100 to 100,000 Mbps.
    EnabledYesStringSpecifies the control switch for origin-pull rate limiting.
    Used to enable/delete the origin-pull speed limit. valid values:.
  • on: enablement limit.
  • .
  • off: delete restriction.
  • .

    3. Output Parameters

    Parameter NameTypeDescription
    RequestIdStringThe unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Creating Origin Pull Speed Limit Bandwidth Limit

    This example shows you how to create a preheated origin-pull bandwidth limit for cn2.test-***a.online, configuring the preheated global availability zone (excluding Chinese mainland) acceleration region with an origin-pull bandwidth of 100Mbps.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyPrefetchOriginLimit
    <Common request parameters>
    
    {
        "ZoneId": "zone-3***j8tqd",
        "DomainName": "cn2.test-***a.online",
        "Area": "Overseas",
        "Bandwidth": 100,
        "Enabled": "on"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "591c01a2-af21-4c09-af23-8f7d96832d01"
        }
    }
    

    Example2 Deleting Origin Speed Limit Bandwidth Limit

    Remove the limit for cn2.test-***a.online.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyPrefetchOriginLimit
    <Common request parameters>
    
    {
        "ZoneId": "zone-3***j8tqd",
        "DomainName": "cn2.test-***a.online",
        "Area": "Overseas",
        "Bandwidth": 100,
        "Enabled": "off"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "67a3d9f3-b852-4f6e-af7d-cc66ebc4fb08"
        }
    }
    

    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 CodeDescription
    FailedOperationOperation failed.
    FailedOperation.CreatePrefetchOriginLimitFailedFailed to create the preheating origin speed limit configuration. please retry later or submit a ticket.
    FailedOperation.PrefetchOriginLimitCountExceededExceed the quantity limit, unable to create more, delete unnecessary configuration or submit a request to enhance configuration quantity.
    FailedOperation.PrefetchOriginLimitNotFoundCorresponding preheating origin speed limit configuration not found. confirm whether there is configuration and retry.
    InternalError.BackendErrorServer error.
    InternalError.DomainConfigFailed to get configuration
    InvalidParameterParameter error.
    InvalidParameter.DomainAreaNotSupportPrefetchOriginLimitAreaThe domain name acceleration region does not support the preheating origin rate limiting regional configuration. please adjust and resubmit.
    InvalidParameter.DomainNotFoundThe domain name does not exist or is not belong to this account.
    InvalidParameter.PrefetchOriginLimitAreaInvalidThe preheating origin rate limiting region parameter is invalid. please adjust the region and resubmit.
    InvalidParameter.PrefetchOriginLimitBandwidthTooLargePreheated origin-pull speed limit bandwidth value is too large. adjust and resubmit.
    InvalidParameter.PrefetchOriginLimitBandwidthTooSmallPreheated origin-pull speed limit bandwidth value is too low. adjust and resubmit.
    InvalidParameter.PrefetchOriginLimitEnabledInvalidThe preheating origin rate limiting control switch parameter is invalid. please adjust the region and resubmit.
    InvalidParameter.ZoneAreaNotSupportPrefetchOriginLimitAreaThe site acceleration region does not support the preheating origin rate limiting regional configuration. please adjust and resubmit.
    OperationDenied.NotInPrefetchOriginLimitWhiteListNot in the preheating origin speed limit allowlist. submit a ticket.
    ResourceInUse.PrefetchOriginLimitAlreadyExistsThe preheating origin speed limit configuration already exists and cannot be recreated. please check whether the corresponding configuration has been created.
    UnauthorizedOperation.CamUnauthorizedCAM is not authorized.
    UnauthorizedOperation.NoPermissionThe sub-account is not authorized for the operation. Please get permissions first.
    UnauthorizedOperation.UnknownAn unknown error occurred in the backend server.