Domain name for API request: alb.intl.tencentcloudapi.com.
This API is used to modify forwarding rule attributes. This is an async API. After the API return succeeds, you can call the DescribeAsyncJobs API with the returned RequestID as an input parameter to check whether this task is successful.
A rule supports up to 10 forward Conditions and 5 forward Actions.
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: ModifyRulesAttributes. |
| Version | Yes | String | Common Params. The value used for this API: 2025-10-30. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| ListenerId | Yes | String | Listener ID, format: lst- followed by 8 alphanumeric characters. |
| LoadBalancerId | Yes | String | Cloud Load Balancer instance ID, in the format of "alb-" followed by 8 alphanumeric characters. |
| Rules.N | Yes | Array of RuleModify | Forwarding rule list. |
| DryRun | No | Boolean | Whether it is pre-check only for this request. |
| 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. |
POST / HTTP/1.1
Host: alb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyRulesAttributes
<Common request parameters>
{
"ListenerId": "lst-d9p3k7wa",
"LoadBalancerId": "alb-f8q2xk9m",
"Rules": [
{
"Actions": [
{
"FixedResponseConfig": {
"Content": "OK",
"ContentType": "text/html",
"HttpCode": 200
},
"InsertHeaderConfig": {
"Key": "ClientVer",
"Value": "1.0",
"ValueType": "UserDefined"
},
"Order": 1,
"RedirectConfig": {
"Host": "www.redirect.com",
"HttpCode": 301,
"Path": "/redirecturl",
"Port": "443",
"Protocol": "HTTPS",
"Query": "${query}"
},
"RemoveHeaderConfig": {
"Key": "ClientVer"
},
"RewriteConfig": {
"Host": "www.myhost.com",
"Path": "/redirecturl",
"Query": "${query}"
},
"TargetGroupConfig": {
"TargetGroupStickySession": {
"Enabled": false,
"Timeout": 1000
},
"TargetGroups": [
{
"TargetGroupId": "lbtg-0zrnc9qa",
"Weight": 10
}
]
},
"Type": "TargetGroup"
}
],
"Conditions": [
{
"CookieConfig": [
{
"Key": "ClientId",
"Value": "xea4cd"
}
],
"HeaderConfig": {
"Key": "ClientVer",
"Values": [
"1.0",
"1.1"
]
},
"HostConfig": [
"www.myhost.com"
],
"MethodConfig": [
"GET"
],
"PathConfig": [
"/url"
],
"QueryStringConfig": [
{
"Key": "ClientVer",
"Value": "1.1"
}
],
"SourceIpConfig": [
"192.168.1.3/32"
],
"Type": "Host"
}
],
"Priority": 100,
"RuleId": "rule-h8cy5gwl",
"RuleName": "newName"
}
]
}
{
"Response": {
"RequestId": "3b848733-70e5-4558-ae39-4b9938eb7609"
}
}
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 |
|---|---|
| AuthFailure | CAM signature/authentication error. |
| DryRunOperation | DryRun operation means the request will be successful, but the DryRun parameter is passed. |
| FailedOperation | Operation failed. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameter.InvalidClientToken | Invalid ClientToken format. |
| InvalidParameter.InvalidFieldType | Field type error. |
| InvalidParameter.InvalidFieldValue | Field value is incorrect. |
| InvalidParameter.InvalidQuotaCheckRequest | Quota check request is invalid. |
| InvalidParameter.MissingAction | Action parameter is missing. |
| InvalidParameter.MissingField | Please enter the required parameter. |
| InvalidParameterValue | Parameter value error. |
| LimitExceeded | The quota limit is exceeded. |
| MissingParameter | Parameters are missing. |
| OperationDenied | Operation denied. |
| RegionError | Region error |
| RequestLimitExceeded | Number of requests exceeds the frequency limit. |
| ResourceInUse | The resource is occupied. |
| ResourceNotFound | The resource does not exist. |
| ResourceNotFound.Listener | Listener not found. |
| ResourceNotFound.LoadBalancer | The CLB resource does not exist. |
| ResourceNotFound.Rule | Forwarding rule not found |
| ResourceUnavailable | Resources are unavailable. |
| ResourceUnavailable.Listener | Listener is in unavailable status. |
| ResourceUnavailable.LoadBalancer | ALB status is unavailable. |
| ResourceUnavailable.Rule | Rule status unavailable. |
| ResourceUnavailable.TargetGroup | Target group is in unavailable status |
| UnauthorizedOperation | Unauthorized operation. |
| UnknownParameter | Unknown parameter error. |
| UnsupportedOperation | The operation is not supported. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários