Distributed Virtual Switch Create DV Portgroup Task

Distributed Virtual Switch Create DV Portgroup Task

Creates a single DistributedVirtualPortgroup and adds it to the distributed virtual switch.

Required privileges: DVPortgroup.Create

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/DistributedVirtualSwitch/{moId}/CreateDVPortgroup_Task
COPY
Path Parameters
string
moId
Required

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}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.


Request Body
CreateDVPortgroupRequestType of type(s) application/json
Required

Show optional properties

{
    "spec": {}
}
{
    "spec": {
        "_typeName": "string",
        "dynamicProperty": [
            {
                "_typeName": "string",
                "name": "string",
                "val": {
                    "_typeName": "string"
                }
            }
        ],
        "configVersion": "string",
        "name": "string",
        "numPorts": 0,
        "portNameFormat": "string",
        "defaultPortConfig": {
            "_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"
                    }
                ]
            }
        },
        "description": "string",
        "type": "string",
        "backingType": "string",
        "scope": [
            {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            }
        ],
        "policy": {
            "_typeName": "string",
            "blockOverrideAllowed": false,
            "shapingOverrideAllowed": false,
            "vendorConfigOverrideAllowed": false,
            "livePortMovingAllowed": false,
            "portConfigResetAtDisconnect": false,
            "networkResourcePoolOverrideAllowed": false,
            "trafficFilterOverrideAllowed": false
        },
        "vendorSpecificConfig": [
            {
                "_typeName": "string",
                "key": "string",
                "opaqueData": "string"
            }
        ],
        "autoExpand": false,
        "vmVnicNetworkResourcePoolKey": "string",
        "transportZoneUuid": "string",
        "transportZoneName": "string",
        "logicalSwitchUuid": "string",
        "segmentId": "string"
    }
}
spec
Required

The DVPortgroupConfigSpec data object contains configuration data for a DistributedVirtualPortgroup.

Use the ReconfigureDVPortgroup_Task method to apply the configuration to the portgroup.

Authentication
This operation uses the following authentication methods.
Responses
200

Returns a Task object. The Task.info.result property contains a managed object reference to the new portgroup. The portgroup property also contains the reference.

Returns MoRefTask of type(s) application/json
This response body class contains all of the following: MoRefExtensibleManagedObject
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}

500

DuplicateName: if a portgroup with the same name already exists

DvsFault: if operation fails on any host or if there are other update failures.

InvalidName: if name of the portgroup is invalid

Returns VimFault of type(s) application/json
This response body class contains all of the following: MethodFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}

Virtual Infrastructure Operations
POST
Distributed Virtual Switch Add DV Portgroup Task
POST
Distributed Virtual Switch Add Network Resource Pool
POST
Distributed Virtual Switch Create DV Portgroup Task
POST
Distributed Virtual Switch Destroy Task
POST
Distributed Virtual Switch Dvs Reconfigure Vm Vnic Network Resource Pool Task
POST
Distributed Virtual Switch DVS Rollback Task
POST
Distributed Virtual Switch Enable Network Resource Management
POST
Distributed Virtual Switch Fetch DV Port Keys
POST
Distributed Virtual Switch Fetch DV Ports
GET
Distributed Virtual Switch Get Alarm Actions Enabled
GET
Distributed Virtual Switch Get Available Field
GET
Distributed Virtual Switch Get Capability
GET
Distributed Virtual Switch Get Config
GET
Distributed Virtual Switch Get Config Issue
GET
Distributed Virtual Switch Get Config Status
GET
Distributed Virtual Switch Get Custom Value
GET
Distributed Virtual Switch Get Declared Alarm State
GET
Distributed Virtual Switch Get Disabled Method
GET
Distributed Virtual Switch Get Effective Role
GET
Distributed Virtual Switch Get Name
GET
Distributed Virtual Switch Get Network Resource Pool
GET
Distributed Virtual Switch Get Overall Status
GET
Distributed Virtual Switch Get Parent
GET
Distributed Virtual Switch Get Permission
GET
Distributed Virtual Switch Get Portgroup
GET
Distributed Virtual Switch Get Recent Task
GET
Distributed Virtual Switch Get Runtime
GET
Distributed Virtual Switch Get Summary
GET
Distributed Virtual Switch Get Tag
GET
Distributed Virtual Switch Get Triggered Alarm State
GET
Distributed Virtual Switch Get Uuid
GET
Distributed Virtual Switch Get Value
POST
Distributed Virtual Switch Lookup Dv Port Group
POST
Distributed Virtual Switch Merge Dvs Task
POST
Distributed Virtual Switch Move DV Port Task
POST
Distributed Virtual Switch Perform Dvs Product Spec Operation Task
POST
Distributed Virtual Switch Query Used Vlan Id In Dvs
POST
Distributed Virtual Switch Reconfigure DV Port Task
POST
Distributed Virtual Switch Reconfigure Dvs Task
POST
Distributed Virtual Switch Rectify Dvs Host Task
POST
Distributed Virtual Switch Refresh DV Port State
POST
Distributed Virtual Switch Reload
POST
Distributed Virtual Switch Remove Network Resource Pool
POST
Distributed Virtual Switch Rename Task
POST
Distributed Virtual Switch Set Custom Value
POST
Distributed Virtual Switch Update Dvs Capability
POST
Distributed Virtual Switch Update DVS Health Check Config Task
POST
Distributed Virtual Switch Update Network Resource Pool