Create Networks
Create a vSphere Namespaces network object associated with the given cluster.
Request
URLURL
Path Parameters
Path Parameters
Identifier for the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Information about the network object to be created.
{
"network": "string",
"network_provider": "enum"
}
Identifier of the network. This has DNS_LABEL restrictions as specified in . This must be an alphanumeric (a-z and 0-9) string and with maximum length of 63 characters and with the ‘-’ character allowed anywhere except the first or last character. This name must be unique within a cluster. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.namespace_management.Network. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.namespace_management.Network.
The network provider that will manage the vSphere Namespaces network object.
Possible values are: NSXT_CONTAINER_PLUGIN , VSPHERE_NETWORK
The create spec for a NSXT-backed Namespaces network configuration, supported by NSXT_CONTAINER_PLUGIN network provider. This field is optional and it is only relevant when the value of Networks.CreateSpec.network-provider is NSXT_CONTAINER_PLUGIN.
The create spec for a DVPG-backed Namespaces network object, supported by VSPHERE_NETWORK network provider. This field is optional and it is only relevant when the value of Networks.CreateSpec.network-provider is VSPHERE_NETWORK.
Authentication
Errors
Errors
com.vmware.vapi.std.errors.already_exists : if a network by the name as specified in the Networks.CreateSpec already exists. | com.vmware.vapi.std.errors.invalid_argument : if spec contains any errors. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the associated cluster is being disabled. | com.vmware.vapi.std.errors.unsupported : if spec contains NsxNetworkCreateSpec which is unsupported via create API.
com.vmware.vapi.std.errors.unauthorized : if the user does not have Namespaces.Manage privilege.
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-operation: create