docs
api
Network Load Balance(NLB)
AddNLBTargets

AddNLBTargets - AddNLBTargets

Overview

add NLB targets

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is AddNLBTargets.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 Region and Zone ListYes
ProjectIdstringProject ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the GetProjectList APINo
NLBIdstringID of the load balancing instance.Yes
ListenerIdstringThe ID of the listener.Yes
Targets.N.ResourceTypestringThe type of service node. Limited enumeration values: "UHost" / "UNI"/"UPM"/"IP", default value: "UHost";No
Targets.N.ResourceIdstringResource ID of the service node. Must be passed when not of IP type.No
Targets.N.ResourceNamestringResource name of the service nodeNo
Targets.N.VPCIdstringThe VPC resource ID of the service node. Must be passed when the IP type is used.No
Targets.N.SubnetIdstringThe resource ID of the service node's subnet. It is required when the IP type is used.No
Targets.N.ResourceIPstringIP of the service node. Must be passed when the IP type is set.No
Targets.N.PortintPort of the service nodeNo
Targets.N.WeightintWeight of the service node. Support for updates.No
Targets.N.EnabledbooleanIs the node enabled?No
Targets.N.RegionstringService Node LocationNo

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
Targetsarray[Target]Yes

Data Model

Target

Field NameTypeDescription InformationRequired
RegionstringService Node LocationNo
ResourceTypestringType of service nodeNo
ResourceIdstringResource ID of the service node. Must be passed when not of IP type.No
ResourceNamestringResource Name of Service NodeNo
VPCIdstringThe VPC resource ID of the service node. It is required when the IP type is passed.No
SubnetIdstringThe subnet resource ID of the service node. Must be passed when the IP type is used.No
ResourceIPstringIP of the service node. Must be provided when the IP type is set.No
PortintPort of the service nodeNo
WeightintThe weight of the service node. Support for updates.No
EnabledbooleanIs the service node enabled?No
IdstringService node identification ID
Description:
No need to pass when adding a service node
Must pass when updating service node attributes
No
StatestringHealth check status of the service node
Note:
Displayed when describing service node information
Limited enumeration values: "Healthy"/"Unhealthy".
No

Example

Request Example

https://api.surfercloud.com/?Action=AddNLBTargets
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=uxOCbBUU
&NLBId=UnhYzuYf
&ListenerId=IShmtmhn
&Targets=pGKemNMo
&Targets.n.ResourceId=lTXwhUoW
&Targets.n.ResourceName=RSMxnGlA
&Targets.n.VPCId=IvTAXOkH
&Targets.n.SubnetId=XyBZrEjL
&Targets.n.ResourceIP=zsAVZQWG
&Targets.n.Port=thIdtrsC
&Targets.n.Weight=gHrJImio
&Targets.n.Enabled=true
&Targets.n.Region=wHRTiRhi

Response Example

{
  "Action": "AddNLBTargetsResponse",
  "RetCode": 0,
  "Targets": [
    {
      "Id": "LMVtHghN",
      "Port": 1,
      "ResourceIP": "kQHmnadz",
      "ResourceId": "aEEHbHSB",
      "ResourceName": "LwwGwBev",
      "ResourceType": "RwgIAUHV",
      "State": "kvujNDos",
      "SubnetId": "PuxrjzqU",
      "VPCId": "WZFfrwoe",
      "Weight": 7
    }
  ]
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved