Domain name for API request: teo.intl.tencentcloudapi.com.
This API is used to modify the origin protection configuration of a site. The following operations are supported:
Instructions for specified protection mode:
A maximum of 20 requests can be initiated per second for this API.
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: ModifyOriginACL. |
| Version | Yes | String | Common Params. The value used for this API: 2022-09-01. |
| Region | No | String | Common Params. This parameter is not required. |
| ZoneId | Yes | String | Site ID. |
| L7EnableMode | No | String | Origin protection mode for layer-7 accelerated domains. Default value: specific. |
| L4EnableMode | No | String | Origin protection mode for layer-4 proxy instances. Default value: specific. |
| OriginACLEntities.N | No | Array of OriginACLEntity | Instances for which origin-pull from specific origin IP ranges needs to be enabled or disabled. |
| OriginACLFamily | No | String | Origin protection origin-pull ACL control domain. If not filled in, it remains unchanged by default; Control domain information can be obtained through the DescribeAvailableOriginACLFamily API. |
| Parameter Name | Type | Description |
|---|---|---|
| RequestId | String | The 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. |
This example shows you how to specify origin-pull from IP ranges in the gaz control domain for the site with ZoneId 'zone-3ey0mmcs899o'.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyOriginACL
<Common request parameters>
{
"ZoneId": "zone-3ey0mmcs899o",
"OriginACLFamily": "plat-emc"
}
{
"Response": {
"RequestId": "285f505b-ed21-4efb-86e6-5f05cd6c299c"
}
}
This example shows you how to disable origin-pull from specific origin IP ranges for the layer-4 proxy instance 'sid-19389e5dwwxfs' in the site with ZoneId 'zone-276zs184g93m'.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyOriginACL
<Common request parameters>
{
"ZoneId": "zone-276zs184g93m",
"OriginACLEntities": [
{
"OperationMode": "disable",
"Type": "l4",
"Instances": [
"sid-19389e5dwwxfs"
]
}
]
}
{
"Response": {
"RequestId": "7517b2b9-4edd-4f79-baa8-c6938e7f3399"
}
}
This example shows you how to enable origin-pull from specific origin IP ranges for the newly added layer-7 acceleration domain 'www.qq.com' in the site with ZoneId 'zone-276zs184g93m'.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyOriginACL
<Common request parameters>
{
"ZoneId": "zone-276zs184g93m",
"OriginACLEntities": [
{
"OperationMode": "enable",
"Type": "l7",
"Instances": [
"www.qq.com"
]
}
]
}
{
"Response": {
"RequestId": "764fcb13-30a1-4b7c-92a2-f3fa93d5ae3e"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameter.InvalidDomains | Invalid domain name. Check whether the input parameters contain a domain name that does not exist. |
| InvalidParameter.InvalidProxies | Invalid Layer-4 proxy. Check whether the input parameters contain a proxy that does not exist. |
| InvalidParameter.ShieldNotSupportHostOriginWhitelist | The current domain name does not support enabling both EdgeOne Shield and origin protection at the same time. |
| OperationDenied | Operation denied. |
| OperationDenied.UnsupportedPlan | The plan does not support this operation. |
| OperationDenied.UpdateIPWhitelistFirst | Update the IP allowlist first. |
フィードバック