# 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 Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `UpdateTargetsAttribute`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.scloudsg.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](/docs/api/summary/regionlist) |**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](/docs/api/summary/get_project_list). |**Yes**|
| **LoadBalancerId** | string | ID of the Load Balancing Instance |**Yes**|
| **ListenerId** | string | Listener's ID |**Yes**|
| **Targets.N.Id** | string | The 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.Weight** | int | The 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.Enabled** | boolean | Whether 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.IsBackup** | boolean | Whether 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 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.scloudsg.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
    
```json
{
  "Action": "UpdateTargetsAttributeResponse",
  "RetCode": 0
}
```





