docs
api
Load Balance(ULB)
UpdateRuleAttribute

Update the forwarding rule properties of the application load balancer - UpdateRuleAttribute

Overview

Update the attributes of a forwarding rule for the application type load balancer listener

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is UpdateRuleAttribute.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
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
LoadBalancerIdstringID of the Load Balancing InstanceYes
ListenerIdstringListener's IDYes
RuleIdstringID of the forwarding ruleYes
RuleConditions.N.TypestringMatching condition type. Limited enumeration values: "Host"/"Path"; Must be filled in when the length of the RuleConditions array is not 0.No
RuleConditions.N.HostConfig.MatchModestringMatching method. Limited enumeration values: 'Regular'/'Wildcard', default value: 'Regular'.No
Values.NstringValue. Currently only supports an array length of 1; the value must comply with the conditions of the relevant matching method; it is required when modifying the domain name match.No
Values.NstringValue. Temporarily only supports an array length of 1; the value must meet the relevant conditions; it is required when modifying the path match.No
RuleActions.N.TypestringAction Type. Limited enumeration value: "Forward"; Must be filled in when the length of the RuleActions array is not 0.No
Targets.N.IdstringThe identifier ID of the backend service node being forwarded. It is limited to the service node pool of the listener; the array length can be 0; when the array length of the configured forwarding service node is not 0, the ID is required.No
Targets.N.WeightintThe weight of the backend service node being forwarded. Only valid when the load balancing algorithm of the listener is weighted round robin.No
PassbooleanWhether the rule is ignored when the service node to be forwarded is empty. The default forwarding rule cannot be changed.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.surfercloud.com/?Action=UpdateRuleAttribute
&Region=cn-zj
&ProjectId=fMqGeCGY
&LoadBalancerId=PEmbuMhD
&ListenerId=eudxefBy
&RuleId=uOPZrous
&RuleConditions.n.Type=XPnIhJcD
&RuleConditions.n.HostConfig.MatchMode=pcWuiASR
&RuleConditions.n.HostConfig.Values.n=NbTJIuXo
&RuleConditions.n.PathConfig.Values.n=vXMMFKpU
&RuleActions.n.Type=sCUpJcAT
&RuleActions.n.ForwardConfig.Targets.n.Id=ejIILinH
&RuleActions.n.ForwardConfig.Targets.n.Weight=6
&Pass=true

Response Example

{
  "Action": "UpdateRuleAttributeResponse",
  "RetCode": 0
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved
  • Contact our sales to help your business.
  • Contact our sales to help your business.