Docs
api
Load Balance(ULB)
UpdatePolicy

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 NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is UpdatePolicy.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.Yes
ULBIdstringID of the traditional load balancing instance that requires adding content forwarding strategyYes
VServerIdstringThe VServer instance ID that requires adding content forwarding strategy, only supports under the CLB of HTTP or HTTPS protocol in request proxy mode.Yes
MatchstringContent Forwarding Matching FieldYes
PolicyPriorityintPolicy priority, 1-9999; Only effective for path rules.No
DomainMatchModestringThe 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
PolicyIdstringThe ID of traditional load balancing forwarding rules, which can be omitted or left blank when the Type is Default.No
BackendId.NstringThe 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
TypestringThe 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 NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No

Example

Request Example

https://api.dezai.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
}