Distributed Virtual Switch Fetch DV Ports
Return the ports that meet the criteria.
Required privileges: System.Read
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case DistributedVirtualSwitch/{moId}.
The vSphere release schema. The current specification covers vSphere 9.1.0.0 APIs.
{
"criteria": {
"_typeName": "string",
"dynamicProperty": [
{
"_typeName": "string",
"name": "string",
"val": {
"_typeName": "string"
}
}
],
"connected": false,
"active": false,
"uplinkPort": false,
"nsxPort": false,
"scope": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"portgroupKey": [
"string"
],
"inside": false,
"portKey": [
"string"
],
"host": [
{
"_typeName": "string",
"type": "string",
"value": "string"
}
]
}
}
The port selection criteria. If unset, the operation returns the keys of all the ports in the portgroup.
OK
[
{
"_typeName": "string",
"key": "string",
"config": {
"_typeName": "string",
"name": "string",
"scope": [
{
"_typeName": "string",
"type": "string",
"value": "string"
}
],
"description": "string",
"setting": {
"_typeName": "string",
"blocked": {
"_typeName": "string",
"inherited": false,
"value": false
},
"vmDirectPathGen2Allowed": {
"_typeName": "string",
"inherited": false,
"value": false
},
"inShapingPolicy": {
"_typeName": "string",
"inherited": false,
"enabled": {
"_typeName": "string",
"inherited": false,
"value": false
},
"averageBandwidth": {
"_typeName": "string",
"inherited": false,
"value": 0
},
"peakBandwidth": {
"_typeName": "string",
"inherited": false,
"value": 0
},
"burstSize": {
"_typeName": "string",
"inherited": false,
"value": 0
}
},
"outShapingPolicy": {
"_typeName": "string",
"inherited": false,
"enabled": {
"_typeName": "string",
"inherited": false,
"value": false
},
"averageBandwidth": {
"_typeName": "string",
"inherited": false,
"value": 0
},
"peakBandwidth": {
"_typeName": "string",
"inherited": false,
"value": 0
},
"burstSize": {
"_typeName": "string",
"inherited": false,
"value": 0
}
},
"vendorSpecificConfig": {
"_typeName": "string",
"inherited": false,
"keyValue": [
{
"_typeName": "string",
"key": "string",
"opaqueData": "string"
}
]
},
"networkResourcePoolKey": {
"_typeName": "string",
"inherited": false,
"value": "string"
},
"filterPolicy": {
"_typeName": "string",
"inherited": false,
"filterConfig": [
{
"_typeName": "string",
"inherited": false,
"key": "string",
"agentName": "string",
"slotNumber": "string",
"parameters": {
"_typeName": "string",
"parameters": [
"string"
]
},
"onFailure": "string"
}
]
}
},
"configVersion": "string"
},
"dvsUuid": "string",
"portgroupKey": "string",
"proxyHost": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"connectee": {
"_typeName": "string",
"connectedEntity": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"nicKey": "string",
"type": "string",
"addressHint": "string"
},
"conflict": false,
"conflictPortKey": "string",
"state": {
"_typeName": "string",
"runtimeInfo": {
"_typeName": "string",
"linkUp": false,
"blocked": false,
"vlanIds": [
{
"_typeName": "string",
"start": 0,
"end": 0
}
],
"trunkingMode": false,
"mtu": 0,
"linkPeer": "string",
"macAddress": "string",
"statusDetail": "string",
"vmDirectPathGen2Active": false,
"vmDirectPathGen2InactiveReasonNetwork": [
"string"
],
"vmDirectPathGen2InactiveReasonOther": [
"string"
],
"vmDirectPathGen2InactiveReasonExtended": "string"
},
"stats": {
"_typeName": "string",
"packetsInMulticast": 0,
"packetsOutMulticast": 0,
"bytesInMulticast": 0,
"bytesOutMulticast": 0,
"packetsInUnicast": 0,
"packetsOutUnicast": 0,
"bytesInUnicast": 0,
"bytesOutUnicast": 0,
"packetsInBroadcast": 0,
"packetsOutBroadcast": 0,
"bytesInBroadcast": 0,
"bytesOutBroadcast": 0,
"packetsInDropped": 0,
"packetsOutDropped": 0,
"packetsInException": 0,
"packetsOutException": 0,
"bytesInFromPnic": 0,
"bytesOutToPnic": 0
},
"vendorSpecificState": [
{
"_typeName": "string",
"key": "string",
"opaqueData": "string"
}
]
},
"connectionCookie": 0,
"lastStatusChange": "string",
"hostLocalPort": false,
"externalId": "string",
"segmentPortId": "string"
}
]
The DistributedVirtualPort data object represents a port in a DistributedVirtualSwitch.
Virtual ports are part of a distributed virtual portgroup. Servers create virtual ports according to the portgroup type (DistributedVirtualPortgroup.config.type). See DistributedVirtualPortgroupPortgroupTypeEnum.
- To configure host network access by port, set the distributed virtual port in the host virtual NIC specification (HostVirtualNicSpec.distributedVirtualPort.portKey).
- To configure virtual machine network access by port, set the port in the virtual Ethernet card backing (VirtualEthernetCard.backing.port.portKey).
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/sdk/vim25/{release}/DistributedVirtualSwitch/{moId}/FetchDVPorts