Update traditional load balancing content forwarding rules - UpdatePolicy
Overview
Update the content forwarding rules of traditional load balancing, including the service nodes after the forwarding rules.
💡 Specifying forwarding rule priority currently only supports path rules, and does not temporarily support adjustments between domain name rules or between domain name and path rules.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is UpdatePolicy . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | Yes |
ULBId | string | ID of the traditional load balancing instance that requires adding content forwarding strategy | Yes |
VServerId | string | The VServer instance ID that requires adding content forwarding strategy, only supports under the CLB of HTTP or HTTPS protocol in request proxy mode. | Yes |
Match | string | Content Forwarding Matching Field | Yes |
PolicyPriority | int | Policy priority, 1-9999; Only effective for path rules. | No |
DomainMatchMode | string | The matching method of the domain name in the content forwarding rule, by default, is consistent with the original. Enumerated values: Regular, regular expression; Wildcard, wildcard domain name. | No |
PolicyId | string | The ID of traditional load balancing forwarding rules, which can be omitted or left blank when the Type is Default. | No |
BackendId.N | string | The ID of the backend resource instance where the content forwarding strategy is applied (the backend node ID of CLB), which comes from the BackendId returned by AllocateBackend. If not passed, it means the update forwarding node is empty. | No |
Type | string | The type of content forwarding matching field, enumeration values: Domain -> Domain forwarding rule; Path -> Path forwarding rule; Default -> Default forwarding rule, if not passed, the default value is Domain. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Example
Request Example
https://api.ucloud-global.com/?Action=UpdatePolicy
&Region=cn-bj2
&ProjectId=org-XXXXX
&PolicyId=policy-XXXXX
&Match=www.[123].demo.com
&Type=Domain
&ULBId=ulb-XXXX
&VServerId=vserver-XXXX
&BackendId.0=backend-XXXX
&DomainMatchMode=Regular
&PolicyPriority=6
Response Example
{
"Action": "UpdatePolicyResponse",
"RetCode": 0
}