docs
api
Load Balance(ULB)
UpdateTargetsAttribute

Update the backend service node attributes of the application type load balancer - UpdateTargetsAttribute

Overview

Update the properties of the backend service node of the application type load balancer listener

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is UpdateTargetsAttribute.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
Targets.N.IdstringThe identification ID of the service node. Limited enumeration values: "UHost" / "UNI"/"UPM"/"IP"; The length of the Targets array to be updated should be at least 1, and no more than 20.No
Targets.N.WeightintThe weight of the service node. Limited value range: [1-100], default value is 1; only effective when using the weighted round-robin algorithm; the length of the Targets array to be updated should be at least 1, and no more than 20.No
Targets.N.EnabledbooleanWhether the service node is enabled. The default value is true; the length of the Targets array to be updated should be at least 1, and no more than 20.No
Targets.N.IsBackupbooleanWhether the service node is a standby node. The default value is false; The length of the Targets array to be updated should be at least 1, and no more than 20.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=UpdateTargetsAttribute
&Region=cn-zj
&ProjectId=atxiqBNn
&LoadBalancerId=fixtpRiU
&ListenerId=ERzAPtnL
&Targets.n.Id=TTwZsppm
&Targets.n.Weight=8
&Targets.n.Enabled=true
&Targets.n.IsBackup=true

Response Example

{
  "Action": "UpdateTargetsAttributeResponse",
  "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.