# ModifyPrivateConnectsAttribute

## 1. API Description

This API is used to modify information of one or more Layer 2 private connects, including names.

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

<mark style="color:blue;">If any of the private connect IDs does not exist, the operation will fail immediately.</mark> <mark style="color:blue;">Information of other private connects will not be modified.</mark>
{% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

<table><thead><tr><th width="218.3165783220618">Parameter Name</th><th width="114.875">Required</th><th width="102">Type</th><th>Description</th></tr></thead><tbody><tr><td>privateConnectIds</td><td>Yes</td><td>Array of String</td><td>Private connect ID list.<br>You can query up to 100 IDs in each request.</td></tr><tr><td>privateConnectName</td><td>Yes</td><td>String</td><td><p>Private connect name.</p><p>Up to 255 characters in length are allowed.</p></td></tr></tbody></table>

## 3. Output Parameters

<table><thead><tr><th width="194.74083601286173">Parameter Name</th><th width="99">Type</th><th>Description</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td>The unique request ID, which is returned for each request. RequestId is required for locating a problem.</td></tr></tbody></table>

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Modify names of private connects.**

```json
POST /api/v2/sdn HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: ModifyPrivateConnectsAttribute
<Common Request Params>

Request：
{
    "privateConnectIds": ["your-private-connect-id"],
    "privateConnectName": "Seoul-Singapore-Connect"
}

Response：
{   
  "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E",
  "response": {
     "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E"，
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/api-reference/api-introduction/toolkit/api-sdk) to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/commonerrorcode).​

<table><thead><tr><th width="202.2962962962963">HTTP Status Code</th><th width="258">Error Code</th><th>Description</th></tr></thead><tbody><tr><td>404</td><td>INVALID_PRIVATE_CONNECT_NOT_FOUND</td><td>Private connect does not exist.</td></tr></tbody></table>
