Domain name for API request: teo.intl.tencentcloudapi.com.
This API is on an earlier version for modifying rule engine APIs. EdgeOne comprehensively upgraded rule engine-related APIs on January 21, 2025. For details on the new version API for modifying layer-7 acceleration rules, refer to ModifyL7AccRule.
Note: Starting from January 21, 2025, the legacy version API will stop update and iteration. New features will only be provided in the latest version API. The existing capacity supported by the legacy version API will not be affected. To avoid data field conflict when using the legacy version API, migrate to the latest version rule engine API as soon as possible.
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: ModifyRule. |
| 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 | Zone ID. |
| RuleName | Yes | String | Rule name. The string name can contain 1–255 characters. |
| Rules.N | Yes | Array of Rule | Rule content. |
| RuleId | Yes | String | Rule ID. |
| Status | Yes | String | Rule status. Valid values: |
| Tags.N | No | Array of String | Rule tag. |
| Parameter Name | Type | Description |
|---|---|---|
| RuleId | String | Rule ID. |
| 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. |
The following example shows common modifications.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyRule
<Common request parameters>
{
"Status": "disable",
"Rules": [
{
"Actions": [
{
"NormalAction": {
"Action": "RangeOriginPull",
"Parameters": [
{
"Name": "Switch",
"Values": [
"on"
]
}
]
}
},
{
"CodeAction": {
"Action": "StatusCodeCache",
"Parameters": [
{
"Name": "CacheTime",
"StatusCode": 200,
"Values": [
"20"
]
}
]
}
},
{
"RewriteAction": {
"Action": "ResponseHeader",
"Parameters": [
{
"Action": "set",
"Name": "Foo",
"Values": [
"Bar"
]
},
{
"Action": "add",
"Name": "Hello",
"Values": [
"World"
]
},
{
"Action": "del",
"Name": "Foo2",
"Values": []
}
]
}
}
],
"Conditions": [
{
"Conditions": [
{
"Operator": "equal",
"Target": "host",
"Values": [
"www.shawndai.cn"
]
}
]
}
]
}
],
"RuleName": "new_rule02",
"ZoneId": "zone-26r78x31ny86",
"RuleId": "rule-djuqmq"
}
{
"Response": {
"RequestId": "811d2583-310c-41f4-b5e7-abe4074047d4",
"RuleId": "rule-djuqmq"
}
}
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.ConfigLocked | The configuration has been locked. Unlock it and retry. |
| InternalError.SystemError | Internal error. System error. |
| InvalidParameter.CacheKeyQueryStringTooManyValue | Query string rule exceeds the limit. |
| InvalidParameter.CertSystemError | Internal error. |
| InvalidParameter.CompressionInvalidAlgorithms | Invalid compression algorithm. |
| InvalidParameter.ErrActionUnsupportTarget | The operation does not support conditions. |
| InvalidParameter.ErrInvalidAction | Unauthorized operation. |
| InvalidParameter.ErrInvalidActionDuplicateAction | Unauthorized operations - duplicate operation configuration. |
| InvalidParameter.ErrInvalidActionParam | Unauthorized operations - Illegal parameters. |
| InvalidParameter.ErrInvalidActionParamAction | Unauthorized operations - Illegal parameters - Invalid action. |
| InvalidParameter.ErrInvalidActionParamDuplicateName | Unauthorized operations - illegal parameters - duplicate parameter name. |
| InvalidParameter.ErrInvalidActionParamName | Unauthorized operations - illegal parameters - invalid parameter value type. |
| InvalidParameter.ErrInvalidActionParamTooManyValues | Illegal operation - Illegal parameter - Number of parameter values exceeds the limit. |
| InvalidParameter.ErrInvalidActionParamValue | Unauthorized operations - Illegal parameters - Invalid parameter value. |
| InvalidParameter.ErrInvalidActionType | Unauthorized operation - illegal type. |
| InvalidParameter.ErrInvalidConditionHostTooManyWhenModifyOriginActionConfigured | The operation of modifying the origin server only supports configuring one host match type. |
| InvalidParameter.ErrInvalidConditionIgnoreCase | Invalid condition - illegal ignore case. |
| InvalidParameter.ErrInvalidConditionNameBadName | Invalid condition - Illegal parameter name - Invalid parameter name. |
| InvalidParameter.ErrInvalidConditionNameTargetNotSupportName | Invalid condition - Invalid parameter name - The match type does not support the parameter name. |
| InvalidParameter.ErrInvalidConditionValueBadRegular | Invalid condition - Illegal parameter value - Invalid regular expression. |
| InvalidParameter.ErrInvalidConditionValueBadUrl | Invalid condition - Illegal parameter value - Invalid url. |
| InvalidParameter.ErrInvalidConditionValueBadValue | Invalid condition - Illegal parameter value - Invalid parameter value. |
| InvalidParameter.ErrInvalidConditionValueBadValueContainFileNameExtension | Invalid condition - illegal parameter value - invalid parameter value - file name should not include a file suffix. |
| InvalidParameter.ErrInvalidConditionValueTooLongValue | Invalid condition - illegal parameter value - parameter value length exceeds the limit. |
| InvalidParameter.ErrInvalidConditionValueTooManyValues | Invalid condition - illegal parameter value - the number of parameter values exceeds the limit. |
| InvalidParameter.ErrInvalidConditionValueTooManyWildcard | Invalid condition - illegal parameter value - the number of wildcards exceeds the limit. |
| InvalidParameter.ErrInvalidElseWhenModifyOriginActionConfigured | The operation of modifying the origin server does not support ELSE. |
| InvalidParameter.ErrNilCondition | Condition is empty. |
| InvalidParameter.GrpcRequireHttp2 | Enabling Grpc protocol support requires enabling HTTP/2 protocol support simultaneously. |
| InvalidParameter.HostNotFound | The domain name does not exist. |
| InvalidParameter.InvalidAuthenticationTypeSecretKey | Invalid token authentication key. |
| InvalidParameter.InvalidAuthenticationTypeSignParam | Invalid token authentication parameter. |
| InvalidParameter.InvalidAuthenticationTypeTimeFormat | Invalid token authentication time format. |
| InvalidParameter.InvalidAuthenticationTypeTimeParam | Invalid token authentication time parameter. |
| InvalidParameter.InvalidAwsRegion | Fill in the region correctly as a private network access parameter for third-party object storage. |
| InvalidParameter.InvalidBackupServerName | Invalid backup origin-pull Host. |
| InvalidParameter.InvalidCacheKey | Invalid cache key. |
| InvalidParameter.InvalidCacheKeyCookie | Invalid custom Cache Key Cookie. |
| InvalidParameter.InvalidCacheKeyIgnoreCase | Invalid cache key. Ignore case. |
| InvalidParameter.InvalidCacheKeyScheme | Invalid custom Cache Key Scheme. |
| InvalidParameter.InvalidCacheTime | Invalid node cache time. |
| InvalidParameter.InvalidClientIpHeaderName | Invalid client IP request header. |
| InvalidParameter.InvalidCosDomain | Invalid origin-pull configuration. When the origin server type is COS, the origin server address must be a COS domain name. |
| InvalidParameter.InvalidErrorPageRedirectUrl | Invalid custom error page. |
| InvalidParameter.InvalidHttpsCipherSuiteAndTlsVersion | Encryption suite and TLS version mismatch. |
| InvalidParameter.InvalidHttpsHstsMaxAge | Invalid HTTPS HSTS. |
| InvalidParameter.InvalidIpv6Switch | Invalid Ipv6 switch configuration. |
| InvalidParameter.InvalidMaxAgeTime | Invalid browser cache. |
| InvalidParameter.InvalidOrigin | Invalid origin server. |
| InvalidParameter.InvalidParameter | Parameter error. |
| InvalidParameter.InvalidRangeOriginPull | Invalid range-based origin pull. |
| InvalidParameter.InvalidRequestHeaderName | Invalid request header. |
| InvalidParameter.InvalidRequestHeaderNameXff | Invalid x-forwarded-for request header configuration |
| InvalidParameter.InvalidRequestHeaderValue | Invalid request header. |
| InvalidParameter.InvalidResponseHeaderName | Invalid response header. |
| InvalidParameter.InvalidResponseHeaderValue | Invalid response header. |
| InvalidParameter.InvalidRuleEngineAction | Invalid rule engine operation. |
| InvalidParameter.InvalidRuleEngineNotFound | Rule does not exist. |
| InvalidParameter.InvalidRuleEngineTarget | Invalid rule engine condition. |
| InvalidParameter.InvalidRuleEngineTargetsExtension | Invalid rule engine file suffix condition. |
| InvalidParameter.InvalidRuleEngineTargetsUrl | Invalid rule engine URL condition. |
| InvalidParameter.InvalidServerName | Invalid origin-pull Host. |
| InvalidParameter.InvalidUpstreamRequestQueryStringValue | Invalid origin-pull request parameter setting - invalid query string value. |
| InvalidParameter.InvalidUrlRedirectHost | The target HOST for URL rewrite is invalid. |
| InvalidParameter.InvalidUrlRedirectUrl | Invalid target URL for URL rewrite. |
| InvalidParameter.KeyRulesInvalidQueryStringValue | Invalid cache key. |
| InvalidParameter.LoadBalanceInstanceIdIsRequired | Load balancing instance Id is required in the operation of modifying the origin server. |
| InvalidParameter.NotSupportThisPreset | The operation configuration contains unsupported preset variables. |
| InvalidParameter.OriginOriginGroupIdIsRequired | Origin server group Id is required in the operation of modifying the origin server. |
| InvalidParameter.OriginPullProtocolIsRequired | Return protocol is required when modifying the origin server. |
| InvalidParameter.PostMaxSizeLimitExceeded | Maximum upload size exceeds limit |
| InvalidParameter.ResponseHeaderCacheControlNotAllowDelete | Invalid response header. |
| InvalidParameter.StatusCodeCacheInvalidStatusCode | The status code in the status code cache is invalid. |
| InvalidParameter.TlsVersionNotInSequence | The HTTPS TLS version is not continuous. |
| InvalidParameterValue.FormatMismatch | Format mismatch. |
| InvalidParameterValue.GeneralMismatch | Configuration parameter format mismatch. |
| InvalidParameterValue.IncludeInvalidValue | Contains invalid value. |
| InvalidParameterValue.MissingNecessaryParam | Missing required configuration parameters. |
| InvalidParameterValue.NotInEnumeration | The value is not within the required collection. |
| InvalidParameterValue.NotWithinRange | The value is not within the specified range. |
| InvalidParameterValue.RegExMismatch | Does not match the specified regular expression. |
| InvalidParameterValue.TrialPlanResponsePage | Custom pages in the trial plan cannot be referenced. |
| InvalidParameterValue.UnrecognizableValue | Configuration item error. |
| LimitExceeded | The quota limit is exceeded. |
| OperationDenied | Operation denied. |
| OperationDenied.ConfigLocked | The configuration has been locked. Unlock it and retry. |
| OperationDenied.ErrZoneIsAlreadyPaused | Site disabled. Turn it on and try again. |
| OperationDenied.InvalidAdvancedDefenseSecurityType | To enable Anti-DDoS, security must be enabled. |
| ResourceInUse | The resource is occupied. |
| UnauthorizedOperation.CamUnauthorized | Unauthorized Cam operation. |
| UnauthorizedOperation.Unknown | Unknown error occurs on the real server. |
피드백