docs
api
Private Network(UVPC)
CreateNetworkInterface

Create Virtual Network Card - CreateNetworkInterface

Overview

Create Virtual Network Card

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateNetworkInterface.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 List of Regions and Availability ZonesYes
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.Yes
VPCIdstringBelonging VPCIDYes
SubnetIdstringSubnet IDYes
NamestringName of the virtual network card, default is NetworkInterfaceNo
PrivateIp.NstringSpecify the private network IP. Currently, a network card only supports binding to one private network IP.No
SecurityGroupIdstringFirewall GroupId, default: Web recommended firewall
Can be obtained from GroupId in DescribeSecurityGroupResponse
No
TagstringBusiness GroupNo
RemarkstringNoteNo

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
NetworkInterfaceNetworkInterfaceInfoIf creation is successful, the information of the virtual network card will be returned. If creation fails, this parameter does not exist.No

Data Model

NetworkInterfaceInfo

Field NameTypeDescription InformationRequired
InterfaceIdstringVirtual Network Card Resource IDYes
VPCIdstringBelonging VPCYes
SubnetIdstringSubnet OwnershipYes
PrivateIpSetarray[string]Associate with the internal network IP. Currently, a network card only supports binding with one internal network IP.Yes
MacAddressstringAssociate MacYes
StatusintBinding StatusYes
NamestringVirtual Network Card NameNo
NetmaskstringPrivate Network IP MaskNo
GatewaystringDefault GatewayNo
AttachInstanceIdstringBind Instance Resource IDNo
DefaultbooleanIs it the default network card bound to the instance? false: No true: YesNo
CreateTimeintCreation TimeNo
RemarkstringNoteNo
TagstringBusiness GroupNo

Example

Request Example

{
	"Action": "CreateNetworkInterface",
        "Region": "cn-bj2",
	"ProjectId": "org-test",
	"VPCId": "uvnet-331hnn",
	"SubnetId": "subnet-hlfs4x",
	"Name": "helloucloud",
	"Tag": "test",
	"Remark": "test",
	"PrivateIp.0": "10.21.11.11",
	"SecurityGroupId": "0"
}

Response Example

{
  "Action": "CreateNetworkInterfaceResponse",
  "NetworkInterface": {
    "AttachInstanceId": "",
    "CreateTime": 1513745006,
    "Default": false,
    "Gateway": "10.99.2.1",
    "InterfaceId": "uni-wbybfs",
    "MacAddress": "52:54:00:1F:A7:F7",
    "Name": "helloucloud",
    "Netmask": "255.255.255.0",
    "PrivateIpSet": [
      "10.99.2.81"
    ],
    "Remark": "test",
    "Status": 0,
    "SubnetId": "subnet-hlfs4x",
    "Tag": "test",
    "VPCId": "uvnet-331hnn"
  },
  "RetCode": 0
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved