Available in VPC
Create a network interface.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
GET | POST | /vserver/v2/createNetworkInterface |
Note
This guide is based on the GET method. POST method call tests can be performed through Swagger in the API Gateway service of the NAVER Cloud Platform console.
Request headers
For information about the headers common to all Server APIs, see Server request headers.
Request query parameters
You can use the following query parameters with your request:
Field | Type | Required | Description |
---|---|---|---|
regionCode |
String | Optional | Region code
|
vpcNo |
String | Required | VPC number
|
subnetNo |
String | Required | Subnet number
|
networkInterfaceName |
String | Optional | Network interface name
|
accessControlGroupNoList.N |
Array | Required | ACG number list
|
serverInstanceNo |
String | Optional | Server instance number
|
ip |
String | Optional | Primary IP address
|
isBareMetal |
Boolean | Optional | Whether it is a network interface for bare metal servers
|
secondaryIpList.N |
Array | Optional | Secondary IP list
|
secondaryIpCount |
Integer | Optional | Number of auto-assigned secondary IPs
|
networkInterfaceDescription |
String | Optional | Network interface description (byte)
|
responseFormatType |
String | Optional | Format of the response data
|
Request example
The request example is as follows:
curl --location --request GET 'https://ncloud.apigw.ntruss.com/vserver/v2/createNetworkInterface
?regionCode=KR
&vpcNo=4**5
&subnetNo=3***5
&networkInterfaceName=mynic
&accessControlGroupNoList.1=1***1
&isBareMetal=false
&secondaryIpCount=0
&responseFormatType=json' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
createNetworkInterfaceResponse |
Object | - | Response result
|
createNetworkInterfaceResponse.requestId |
String | - | ID for the request
|
createNetworkInterfaceResponse.returnCode |
String | - | Response code |
createNetworkInterfaceResponse.returnMessage |
String | - | Response message |
Response status codes
For information about the response status codes common to all Server APIs, see Server response status codes.
Response example
The response example is as follows:
{
"createNetworkInterfaceResponse": {
"totalRows": 1,
"networkInterfaceList": [
{
"networkInterfaceNo": "70***0",
"networkInterfaceName": "mynic",
"subnetNo": "3***5",
"deleteOnTermination": false,
"isDefault": false,
"deviceName": "",
"networkInterfaceStatus": {
"code": "NOTUSED",
"codeName": "Not used"
},
"ip": "10.0.20.6",
"macAddress": "F2:**:**:**:**:A3",
"enableFlowLog": false,
"accessControlGroupNoList": [
"1***1"
],
"networkInterfaceDescription": "",
"secondaryIpList": []
}
],
"requestId": "b201fd9f-****-****-****-7610442de046",
"returnCode": "0",
"returnMessage": "success"
}
}