# Batch attach network instances - AttachUGNNetworks

## Overview

Batch attach network instances






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `AttachUGNNetworks`.                      | **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 |
|:---|:---|:---|:---|
| **ProjectId** | string | Project ID. If left blank, the default project will be used. Sub-accounts must fill in this field. Please refer to the [GetProjectList](/docs/api/summary/get_project_list) |**Yes**|
| **UGNID** | string | UGN ID |**Yes**|
| **Networks.N.NetworkID** | string | representing the network instance ID, such as uvnet-xxxx |**Yes**|
| **Networks.N.Type** | string | indicating the network instance type, with enumerated values like VPC/UCVR/… |**Yes**|
| **Networks.N.Region** | string | denoting the region where the network instance belongs, for example, cn-sh2 |**Yes**|
| **Networks.N.OrgName** | string | specifying the project name to which the network instance belongs, such as org-xxx. |**Yes**|

### 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|
| **Networks** | array[[*Network*](#network)] | Array, with each element containing the following fields: NetworkID: string, network instance ID, such as uvnet-xxxx; Type: string, network instance type, enumeration values: VPC/UCVR/...; Region: string, region where the network instance is located, such as cn-sh2; OrgName: string, project name to which the network instance belongs, such as org-xxx |**Yes**|

#### Data Model


#### Network

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region of the Network Instance |**Yes**|
| **NetworkID** | string | ID of the network instance, such as vnet-xxxxx |**Yes**|
| **Name** | string | Network Instance Name |**Yes**|
| **Type** | string | Network Instance Type: VPC/UCVR/... |**Yes**|
| **OrgName** | string | Project name where the network instance is located |**Yes**|
| **CompanyID** | int | The company ID of the network instance |**Yes**|
| **RegionID** | int | Region ID of the network instance |No|
| **OrgID** | int | ID of the project where the network instance is located |No|
| **VNI** | int | The unique identifier of the network instance, such as the tunnel_id of vpc |No|
| **InsertTime** | int | Creation Time |No|

## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=AttachUGNNetworks
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=OvrPyXtA
&UGNID=hEUWUHZz
&Networks.N=FOqETOhP
&ProjectId=EoFSIcPY
&Networks.N.Type=gcifhYYR
&Networks.N.Region=fOrhjoMb
&Networks.N.OrgName=iqRxHPLI
```

### Response Example
    
```json
{
  "Action": "AttachUGNNetworksResponse",
  "Message": "NZDutucr",
  "Networks": [
    {
      "CreateTime": "nHkzkLLW",
      "Name": "sXKmMQrv",
      "NetworkID": "aTTLUmtn",
      "RegionID": "cn-zj",
      "Type": "LGChldgl",
      "VNI": 7
    }
  ],
  "RetCode": 0
}
```





